element domains

This commit is contained in:
Jukka Aho
2016-07-07 18:01:06 +03:00
parent 4a53f8940b
commit e59a8e75b3
+13
View File
@@ -34,6 +34,10 @@ function get_integration_points(element::Poi1, order::Int64)
return [ (1.0, [] ) ]
end
function get_reference_coordinates(::Type{Poi1})
Vector{Float64}[[0.0]]
end
### 1d elements
type Seg2 <: AbstractElement
@@ -576,3 +580,12 @@ end
@create_basis Hex20
@create_basis Hex27
function inside(::Union{Type{Seg2}, Type{Seg3}, Type{Quad4}, Type{Quad8},
Type{Quad9}, Type{Hex8}, Type{Hex20}, Type{Hex27}}, xi)
return all(-1.0 .<= xi .<= 1.0)
end
function inside(::Union{Type{Tri3}, Type{Tri6}, Type{Tet4}, Type{Tet10}}, xi)
return all(xi .>= 0.0) && (sum(xi) <= 1.0)
end