diff --git a/docs/src/devdocs/FEValues.md b/docs/src/devdocs/FEValues.md index e329e25c86..3deb8197dd 100644 --- a/docs/src/devdocs/FEValues.md +++ b/docs/src/devdocs/FEValues.md @@ -22,7 +22,8 @@ Ferrite.BCValues ## Internal utilities ```@docs Ferrite.embedding_det -Ferrite.shape_value_type +Ferrite.shape_value_type(::AbstractValues) +Ferrite.shape_value_type(::FunctionValues) Ferrite.shape_gradient_type Ferrite.ValuesUpdateFlags ``` diff --git a/docs/src/devdocs/interpolations.md b/docs/src/devdocs/interpolations.md index 22c45ac3ef..5859861ed2 100644 --- a/docs/src/devdocs/interpolations.md +++ b/docs/src/devdocs/interpolations.md @@ -19,6 +19,7 @@ Ferrite.reference_shape_values! Ferrite.reference_shape_gradients! Ferrite.reference_shape_gradients_and_values! Ferrite.reference_shape_hessians_gradients_and_values! +Ferrite.shape_value_type ``` ### Required methods to implement for all subtypes of `Interpolation` to define a new finite element diff --git a/src/interpolations.jl b/src/interpolations.jl index daab078a5f..5bed658b22 100644 --- a/src/interpolations.jl +++ b/src/interpolations.jl @@ -57,6 +57,11 @@ n_components(::VectorInterpolation{vdim}) where {vdim} = vdim # Number of components that are allowed to prescribe in e.g. Dirichlet BC n_dbc_components(ip::Interpolation) = n_components(ip) +""" + shape_value_type(ip::Iterpolation, ::Type{T}) where T<:Number + +Return the type of `shape_value(ip::Interpolation, ΞΎ::Vec, ib::Int)` +""" shape_value_type(::ScalarInterpolation, ::Type{T}) where {T <: Number} = T shape_value_type(::VectorInterpolation{vdim}, ::Type{T}) where {vdim, T <: Number} = Vec{vdim, T} #shape_value_type(::MatrixInterpolation, T::Type) = Tensor #958