FEValues
Type definitions
AbstractValues
AbstractCellValues
AbstractFacetValues
PointValues
InterfaceValues
Internal types
Ferrite.GeometryMapping
— TypeGeometryMapping{DiffOrder}(::Type{T}, ip_geo, qr::QuadratureRule)
Create a GeometryMapping
object which contains the geometric
- shape values
- gradient values (if DiffOrder ≥ 1)
- hessians values (if DiffOrder ≥ 2)
T<:AbstractFloat
gives the numeric type of the values.
Ferrite.MappingValues
— TypeMappingValues(J, H)
The mapping values are calculated based on a geometric_mapping::GeometryMapping
along with the cell coordinates, and the stored jacobian, J
, and potentially hessian, H
, are used when mapping the FunctionValues
to the current cell during reinit!
.
Ferrite.FunctionValues
— TypeFunctionValues{DiffOrder}(::Type{T}, ip_fun, qr::QuadratureRule, ip_geo::VectorizedInterpolation)
Create a FunctionValues
object containing the shape values and gradients (up to order DiffOrder
) for both the reference cell (precalculated) and the real cell (updated in reinit!
).
Ferrite.BCValues
— TypeBCValues(func_interpol::Interpolation, geom_interpol::Interpolation, boundary_type::Union{Type{<:BoundaryIndex}})
BCValues
stores the shape values at all facet/faces/edges/vertices (depending on boundary_type
) for the geometric interpolation (geom_interpol
), for each dof-position determined by the func_interpol
. Used mainly by the ConstraintHandler
.
Internal utilities
Ferrite.embedding_det
— Functionembedding_det(J::SMatrix{3, 2})
Embedding determinant for surfaces in 3D.
TLDR: "det(J) =" ||∂x/∂ξ₁ × ∂x/∂ξ₂||₂
The transformation theorem for some function f on a 2D surface in 3D space leads to ∫ f ⋅ dS = ∫ f ⋅ (∂x/∂ξ₁ × ∂x/∂ξ₂) dξ₁dξ₂ = ∫ f ⋅ n ||∂x/∂ξ₁ × ∂x/∂ξ₂||₂ dξ₁dξ₂ where ||∂x/∂ξ₁ × ∂x/∂ξ₂||₂ is "detJ" and n is the unit normal. See e.g. https://scicomp.stackexchange.com/questions/41741/integration-of-d-1-dimensional-functions-on-finite-element-surfaces for simple explanation. For more details see e.g. the doctoral thesis by Mirza Cenanovic Tangential Calculus [12].
embedding_det(J::Union{SMatrix{2, 1}, SMatrix{3, 1}})
Embedding determinant for curves in 2D and 3D.
TLDR: "det(J) =" ||∂x/∂ξ||₂
The transformation theorem for some function f on a 1D curve in 2D and 3D space leads to ∫ f ⋅ dE = ∫ f ⋅ ∂x/∂ξ dξ = ∫ f ⋅ t ||∂x/∂ξ||₂ dξ where ||∂x/∂ξ||₂ is "detJ" and t is "the unit tangent". See e.g. https://scicomp.stackexchange.com/questions/41741/integration-of-d-1-dimensional-functions-on-finite-element-surfaces for simple explanation.
Ferrite.shape_value_type
— Methodshape_value_type(fe_v::AbstractValues)
Return the type of shape_value(fe_v, q_point, base_function)
Ferrite.shape_gradient_type
— Functionshape_gradient_type(fe_v::AbstractValues)
Return the type of shape_gradient(fe_v, q_point, base_function)
Ferrite.ValuesUpdateFlags
— TypeValuesUpdateFlags(ip_fun::Interpolation; update_gradients = Val(true), update_hessians = Val(false), update_detJdV = Val(true))
Creates a singleton type for specifying what parts of the AbstractValues should be updated. Note that this is internal API used to get type-stable construction. Keyword arguments in AbstractValues
constructors are forwarded, and the public API is passing these as Bool
, while the ValuesUpdateFlags
method supports both boolean and Val(::Bool)
keyword args.
Custom FEValues
Custom FEValues, fe_v::AbstractValues
, should normally implement the reinit!
method. Subtypes of AbstractValues
have default implementations for some functions, but require some lower-level access functions, specifically
function_value
, requiresfunction_gradient
,function_divergence
,function_symmetric_gradient
, andfunction_curl
requiresspatial_coordinate
, requiresgeometric_value
getngeobasefunctions
getnquadpoints
Array bounds
- Asking for the
n
th quadrature point must be inside array bounds if1 <= n <= getnquadpoints(fe_v)
. (checkquadpoint
can, alternatively, be dispatched to check thatn
is inbounds.) - Asking for the
i
th shape value or gradient must be inside array bounds if1 <= i <= getnbasefunctions(fe_v)
- Asking for the
i
th geometric value must be inside array bounds if1 <= i <= getngeobasefunctions(fe_v)