From 69ebba5e1142ad34c86304875b6146d24fa3e915 Mon Sep 17 00:00:00 2001 From: Jukka Aho Date: Fri, 5 Feb 2016 22:22:40 +0200 Subject: [PATCH] more integration rules --- src/integrate.jl | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/integrate.jl b/src/integrate.jl index 0601eb0..1a49911 100644 --- a/src/integrate.jl +++ b/src/integrate.jl @@ -119,6 +119,13 @@ function get_integration_points(::Type{Quad4}, ::Type{Val{2}}) ] end +function get_integration_points(::Type{Quad4}, ::Type{Val{3}}) + p = [-sqrt(3/5), 0.0, sqrt(3/5)] + w = [5/9, 8/9, 5/9] + pts = vec([IntegrationPoint([p[i], p[j]], w[i]*w[j]) for i=1:3, j=1:3]) + return pts +end + function get_integration_points(::Type{Quad4}) return get_integration_points(Quad4, Val{2}) end @@ -128,7 +135,7 @@ end function get_integration_points(::Type{Hex8}, ::Type{Val{2}}) p = 1.0/sqrt(3.0)*[-1.0, 1.0] - w = 1.0 + w = [1.0, 1.0] return vec([IntegrationPoint([p[i], p[j], p[k]], w) for i=1:2, j=1:2, k=1:2]) end