Embedded Interfaces

Domain Nomenclature

Throughout this documentation, many methods accept arguments that select different parts of the cut domain. We split the domain into the following parts:

The background mesh entities (cells, facets, nodes) are classified as IN, OUT or CUT. The IN and OUT background cells are uncut, i.e completely inside or outside the geometry, respectively. These states are internally defined as constants:

  const IN = -1
  const OUT = 1
  const CUT = 0

The CUT background cells are cut by the embedded boundary, and split into subcells/subfacets. The subcells/subfacets are classified as IN or OUT depending on whether they are inside or outside the geometry. CUT_IN and CUT_OUT subentities can be accessed using the CutInOrOut objects:

  struct CutInOrOut
    in_or_out::Int
  end
  const CUT_IN = CutInOrOut(IN)
  const CUT_OUT = CutInOrOut(OUT)

For FEM, we generally want to get sets of uncut and cut cells together, for a given state IN/OUT. These are referred as PHYSICAL parts of the domain. Moreover, FE spaces are generally defined over the background mesh and need to span both IN/OUT and CUT background cells. These are referred as ACTIVE parts of the domain. You can extract the PHYSICAL and ACTIVE parts of the domain using the following constants:

const PHYSICAL_IN = (CUT_IN,IN)
const PHYSICAL_OUT = (CUT_OUT,OUT)
const PHYSICAL = PHYSICAL_IN
struct ActiveInOrOut
  in_or_out::Int
end
const ACTIVE_IN = ActiveInOrOut(IN)
const ACTIVE_OUT = ActiveInOrOut(OUT)
const ACTIVE = ACTIVE_IN

Cutters

Cutters are used to cut the background mesh according to a provided geometry.

GridapEmbedded.Interfaces.CutterType
abstract type Cutter <: GridapType end

Abstract type for all mesh cutters. Has to be paired with a CSG.Geometry to cut the background mesh.

Methods

Generally cut and cut_facets dispatch based on the geometry provided, so it is generally more convennient to call the following methods instead:

source

We provide several types of cutters, including:

  • Level-Set Cutters: Cutters for Level-Set and function-defined geometries. See Level-Set Cutters.
  • STL Cutters: Cutters for STL based geometries. Provided by STLCutters.jl.

Embedded Discretizations

After cutting the background mesh, you will be returned an EmbeddedDiscretization object. These contain all the information you need to generate the integration meshes for embedded methods.

GridapEmbedded.Interfaces.EmbeddedDiscretizationType
struct EmbeddedDiscretization{Dc,T} <: AbstractEmbeddedDiscretization

This structure contains all the required information to build integration Triangulations for a cut model.

Constructors

cut(cutter::Cutter,background,geom)

Properties

  • bgmodel::DiscreteModel: the background mesh
  • geo::CSG.Geometry: the geometry used to cut the background mesh
  • subcells::SubCellData: collection of cut subcells, attached to the background mesh
  • subfacets::SubFacetData: collection of cut facets, attached to the background mesh
  • ls_to_bgcell_to_inoutcut::Vector{Vector{Int8}}: list of IN/OUT/CUT states for each cell in the background mesh, for each node in the geometry tree.
  • ls_to_subcell_to_inoutcut::Vector{Vector{Int8}}: list of IN/OUT/CUT states for each subcell in the cut part of the mesh, for each node in the geometry tree.
  • ls_to_subfacet_to_inoutcut::Vector{Vector{Int8}}: list of IN/OUT/CUT states for each subfacet in the cut part of the mesh, for each node in the geometry tree.

Methods

source
GridapEmbedded.Interfaces.EmbeddedFacetDiscretizationType
struct EmbeddedFacetDiscretization{Dc,Dp,T} <: AbstractEmbeddedDiscretization

This structure contains all the required information to build integration Triangulations for a cut model boundary.

Constructors

cut_facets(cutter::Cutter,background,geom)

Properties

  • bgmodel::DiscreteModel: the background mesh
  • geo::CSG.Geometry: the geometry used to cut the background mesh
  • subfacets::SubFacetData: collection of cut facets, attached to the background mesh
  • ls_to_facet_to_inoutcut::Vector{Vector{Int8}}: list of IN/OUT/CUT states for each facet in the background mesh, for each node in the geometry tree.
  • ls_to_subfacet_to_inoutcut::Vector{Vector{Int8}}: list of IN/OUT/CUT states for each subfacet in the cut part of the mesh, for each node in the geometry tree.

Methods

source

Embedded Triangulations

From EmbeddedDiscretization objects, you can extract all the triangulations you need to perform integration for embedded methods. We currently provide the following methods:

Gridap.Geometry.TriangulationMethod
Triangulation(cut::EmbeddedDiscretization[,in_or_out=PHYSICAL_IN])

Creates a triangulation containing the cell and subcells of the embedded domain selected by in_or_out.

  • If only background cells are selected, the result will be a regular Gridap triangulation.
  • If only subcells are selected, the result will be a SubCellTriangulation.
  • If both background cells and subcells are selected, the result will be an AppendedTriangulation, containing a SubCellTriangulation and a regular Gridap triangulation.
source
GridapEmbedded.Interfaces.GhostSkeletonMethod
GhostSkeleton(cut::EmbeddedDiscretization[,in_or_out=ACTIVE_IN])

Creates a triangulation containing the ghost facets. Ghosts facets are defined as the facets of the background mesh that are adjacent to at least one CUT background cell.

Mostly used for CUT-FEM stabilisation.

source
GridapEmbedded.Interfaces.SubFacetBoundaryTriangulationType
struct SubFacetBoundaryTriangulation{Dc,Dp,T} <: Triangulation{Dc,Dp}

Triangulation of cut facets from the background mesh, i.e each of the facets in this triangulation is part of a background facet that has been cut by the geometry.

This differs from the the SubFacetTriangulation in that the facets in the SubFacetTriangulation are not cut background facets, but rather subfacets on the interior of a background cell.

They result from calling Boundary or Skeleton on an EmbeddedFacetDiscretization object.

BoundaryTriangulation(cut::EmbeddedFacetDiscretization,in_or_out;tags=nothing)
SkeletonTriangulation(cut::EmbeddedFacetDiscretization,in_or_out)
source