Embedded
This page is still under construction! Please refer to the tutorial for a discussion of functionality.
Non-TET/TRI polytopes are simplexified by GridapEmbedded when cutting. As a result, derivative information from AD will not be correct when using a mesh that isn't made of TRI/TET. Please use a mesh with TRI/TET polytopes to ensure correctness of derivative results.
Isolated volumes
EmbeddedCollection and EmbeddedPDEConstrainedFunctionals
GridapTopOpt.EmbeddedCollection — Type
struct EmbeddedCollection{A<:Union{WithCut,WithoutCut}}
recipes :: Vector{<:Function}
objects :: Dict{Symbol,Any}
bgmodel :: DiscreteModel
endA collection of embedded objects on the same background model. This structure provides a way to update all the stored objects at once.
Constructor
EmbeddedCollection(recipes::Union{<:Function,Vector{<:Function}},bgmodel::DiscreteModel[,φh];compute_cut::Bool=true)
If provided, φh will be used to compute the initial collection of objects. If not provided, the collection will remain empty until update_collection! is called. The compute_cut flag indicates whether to compute cut geometries, if false, the recipes will be called with only φh.
API:
update_collection!(c::EmbeddedCollection,φh): Update the collection of objects using the level set functionφh.add_recipe!(c::EmbeddedCollection,r::Function[,φh]): Add a recipe to the collection. Update the collection ifφhis provided. The reciperis expected to have the signaturer(cutgeo,cutgeo_facet,φh)ifcompute_cut = trueandr(φh)ifcompute_cut = false.
We implement special structures that update the state map etc. on the fly using EmbeddedPDEConstrainedFunctionals:
GridapTopOpt.EmbeddedCollection_in_φh — Function
EmbeddedCollection_in_φh(recipes::Union{<:Function,Vector{<:Function}},bgmodel,φ0)Returns an EmbeddedCollection whoose recipes are only updated using the parameter φ0. This is useful for problems where the recipes are not computed using the cut geometry information.
GridapTopOpt.EmbeddedPDEConstrainedFunctionals — Type
struct EmbeddedPDEConstrainedFunctionals{N,T} <: AbstractPDEConstrainedFunctionals{N}A version of PDEConstrainedFunctionals that has an embedded_collection to allow the state_map to be updated given new FE spaces for the forward problem. This is currently required for unfitted methods.
GridapTopOpt.evaluate_functionals! — Method
evaluate_functionals!(pcf::EmbeddedPDEConstrainedFunctionals,φh;update_space::Bool=true)Evaluate the objective and constraints at φh.
GridapTopOpt.evaluate_derivatives! — Method
evaluate_derivatives!(pcf::EmbeddedPDEConstrainedFunctionals,φh;update_space::Bool=true)Evaluate the derivatives of the objective and constraints at φh.
Gridap.Arrays.evaluate! — Method
Fields.evaluate!(pcf::EmbeddedPDEConstrainedFunctionals,φh;update_space::Bool=true)Evaluate the objective and constraints, and their derivatives at φh.
Automatic shape differentiation
See discussion in PolytopalCutters.