diff --git a/CHANGELOG.md b/CHANGELOG.md index 456316478c..5df24694ee 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -317,6 +317,11 @@ more discussion). a given grid (based on its node coordinates), and returns the minimum and maximum vertices of the bounding box. ([#880][github-880]) +- CellValues and FacetValues can now store and map second order gradients (Hessians). The number + of gradients computed in CellValues/FacetValues is specified using the keyword arguments + `update_gradients::Bool` (default true) and `update_hessians::Bool` (default false) in the + constructors, i.e. `CellValues(...; update_hessians=true)`. + ### Changed - `create_sparsity_pattern` now supports cross-element dof coupling by passing kwarg diff --git a/docs/src/topics/FEValues.md b/docs/src/topics/FEValues.md index a6a48c0147..9c6aaee84c 100644 --- a/docs/src/topics/FEValues.md +++ b/docs/src/topics/FEValues.md @@ -65,7 +65,7 @@ Second order gradients of the shape functions are computed as \end{align} ``` - Using the fact that $\frac{\mathrm{d}}{\mathrm{d}x_j} = J^{-1}_{sj}\frac{\mathrm{d}}{\mathrm{d}\xi_s}$, the first term in equation the equation above can be expressed as: + Using the fact that $\frac{\mathrm{d}}{\mathrm{d}x_j} = J^{-1}_{sj}\frac{\mathrm{d}}{\mathrm{d}\xi_s}$, the first term in the equation above can be expressed as: ```math \begin{align*} diff --git a/src/FEValues/GeometryMapping.jl b/src/FEValues/GeometryMapping.jl index 09af19a962..7a711838b1 100644 --- a/src/FEValues/GeometryMapping.jl +++ b/src/FEValues/GeometryMapping.jl @@ -35,7 +35,7 @@ struct GeometryMapping{DiffOrder, IP, M_t, dMdξ_t, d2Mdξ2_t} M::M_t # ::AbstractMatrix{<:Number} Values of geometric shape functions dMdξ::dMdξ_t # ::AbstractMatrix{<:Vec} Gradients of geometric shape functions in ref-domain d2Mdξ2::d2Mdξ2_t # ::AbstractMatrix{<:Tensor{2}} Hessians of geometric shape functions in ref-domain - # ::Nothing When not required + function GeometryMapping( ip::IP, M::M_t, ::Nothing, ::Nothing ) where {IP <: ScalarInterpolation, M_t<:AbstractMatrix{<:Number}} diff --git a/test/runtests.jl b/test/runtests.jl index 665503d941..b5898bbc2f 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -37,7 +37,6 @@ include("test_utils.jl") #include("test_interpolations.jl") include("test_cellvalues.jl") include("test_facevalues.jl") -asdf include("test_interfacevalues.jl") include("test_quadrules.jl") include("test_assemble.jl")