Geometry
Mantis' Geometry module contains all functionality related to geometry.
Geometry
An
Note that
and we use
Tensor Product Geometry
Given an
and
the tensor product geometry
Specifically, we have
The Jacobian of this geometry
is given by
Evaluation
Given the NTuple ξ of Vectors, element_idx and at the
The output is a matrix, element_idx, and the dimension of the embedding space to where the canonical element is mapped into. Specifically:
where element_idx, and
Jacobian
Given the NTuple ξ of Vectors, element_idx and at the
The output is a matrix, element_idx, the dimension of the embedding space to where the canonical element is mapped into, and the dimension of the canonical element, which is the same as the dimension of the element's manifold). Specifically:
where
All docstrings from Mantis.Geometry
Mantis.Geometry Module
module GeometryContains all geometry structure definitions and related methods.
sourceMantis.Geometry.AbstractEvaluationMask Type
AbstractEvaluationMask{manifold_dim}Supertype for all evaluation maskes. An evaluation mask describes how to map from a set of evaluation points on a manifold to a set of evaluation points on a base mesh. This is useful for example when evaluating a function on a finer mesh than the one used for integration.
sourceMantis.Geometry.AffineEvaluationMask Type
AffineEvaluationMask{manifold_dim, num_elements, num_elements_base, M, T, S}Given an object with d-dimensional elements 1:n, we construct:
A new object with d-dimensional elements 1:m
A function E: {1:m} -> {1:n} such that if E(i) = j, then the i-th element is nested
inside the j-th element
- A data structure F: {1:m} -> (x, c) \in [0,1]^{2d} such that, after rescaling the j-th
element to a unit cell, a point y inside the i-th element can be located inside the j-th element as: x + c * y. The tuple (E, F) defines an evaluation mask.
Fields
element_id_map::M: The mapping from the evaluation elements to the base elements.translations::Vector{T}: The translations from base to evaluation elements.scalings::Vector{S}: The scalings of evalution elements relative to the base elements.
Mantis.Geometry.CartesianGeometry Type
CartesianGeometry{manifold_dim, image_dim, num_patches, T, CI} <: AbstractGeometry{
manifold_dim, image_dim, num_patches
}A structure representing a Cartesian grid geometry in manifold_dim dimensions. Can have multiple patches, even though each patch is still a Cartesian grid. Note that the patches are not required to have a matching grid.
Fields
breakpoints::T: A tuple of vectors defining the grid points in each dimension.cart_num_elements::CI: A (tuple of)CartesianIndicesrepresenting the indices of elements in the grid for each patch.
Constructors
CartesianGeometry( breakpoints::T ) where { manifold_dim, num_patches, NT <: Number, T <: NTuple{num_patches, NTuple{manifold_dim, AbstractVector{NT}}}, }: General constructor.CartesianGeometry( breakpoints::NTuple{manifold_dim, AbstractVector{NT}} ) where {manifold_dim, NT <: Number}: Single-patch convenience constructor.
Mantis.Geometry.DiscreteGeometry Type
DiscreteGeometry{manifold_dim, image_dim, num_patches, F} <: AbstractGeometry{
manifold_dim, image_dim, num_patches
}A geometry defined in terms of an evaluable_function over a given number of elements and manifold dimension.
Fields
evaluable_function::F: Function that, given anelement_idand local coordinatesxi, returns values and derivatives in the same nested format as a finite element space (see FunctionSpaces). In particular, the output structure must be compatible withFunctionSpaces.AbstractFESpaceso that geometry evaluations and Jacobians can be computed element-wise.num_elements::Int: Total number of elements in the discrete geometry.
Type parameters
manifold_dim: Dimension of the reference (parametric) domain.image_dim: Dimension of the physical embedding space.num_patches: Number of patches of the geometry.F: The type of the evaluable function.
Mantis.Geometry.MaskedGeometry Type
MaskedGeometry{manifold_dim, G, M}A masked geometry obtained by a pseudo-refinement of another geometry. The geometry base_geometry is the original geometry and it is composed with the evaluation mask eval_mask.
Fields
base_geometry::G: The base geometry.eval_mask::AbstractEvaluationMask: The evaluation mask.
Mantis.Geometry.TensorProductGeometry Type
TensorProductGeometry{
manifold_dim, image_dim, num_patches, num_geometries, T, CI, LI
} <: AbstractGeometry{manifold_dim, image_dim, num_patches}A geometry build by tensoring multiple constituent geometries.
Fields
geometries::T: Tuple of constituent geometries.cart_num_elements::CI: A collection of Cartesian indices representing the
multi-dimensional positions of each tensor product element. Useful to convert from
linear to Cartesian indexing.lin_num_elements::LI: A collection of linear indices representing the global indexing of
each tensor product element. Useful to convert from Cartesian to linear indexing.num_elements_per_patch::NTuple{num_patches, Int}: The number of elements on each patch.
Mantis.Geometry.UnstructuredGeometry Type
UnstructuredGeometry{manifold_dim, image_dim, num_patches, GP} <: AbstractGeometry{
manifold_dim, image_dim, num_patches
}A geometry consisting of multiple patches, each with its own geometry.
Avoid heterogeneous inputs.
While the constructors allow different types of geometries, it is strongly recommended to use only a few different types. Failing to do so can cause type instabilities and therefore a significant performance penalty.
Fields
geometry_per_patch::NTuple{GP, num_patches}: The geometries for each patch.num_elements::Int: The total number of elements in the geometry.num_elements_per_patch::NTuple{num_patches, Int}: The number of elments per patch.
Mantis.Geometry.compose_evaluation_masks Method
compose_evaluation_masks(
eval_mask_1::AffineEvaluationMask{manifold_dim, num_elements, num_elements_base_1},
eval_mask_2::AffineEvaluationMask{
manifold_dim, num_elements_base_1, num_elements_base_2
},
)Compose two evaluation maskes.
Arguments
eval_mask_1::AffineEvaluationMask: The first evaluation mask.eval_mask_2::AffineEvaluationMask: The second evaluation mask
Returns
eval_mask::AffineEvaluationMask: The composed evaluation mask (E_2\circ E_1), such that
the evaluation elements are nested inside the base elements of the second evaluation mask.
sourceMantis.Geometry.create_cartesian_box Method
create_cartesian_box(
starting_points::NTuple{manifold_dim, Float64},
box_sizes::NTuple{manifold_dim, Float64},
num_elements::NTuple{manifold_dim, Int},
) where {manifold_dim}Create a Cartesian box geometry with manifold_dim dimensions, starting at starting_points and with box_sizes and num_elements defining the size of the box.
Arguments
starting_points::NTuple{manifold_dim, Float64}: The starting points of the box.box_sizes::NTuple{manifold_dim, Float64}: The size of the box.num_elements::NTuple{manifold_dim, Int}: The number of elements in each dimension.
Output
::CartesianGeometry{manifold_dim}: The Cartesian box geometry.
Mantis.Geometry.create_curvilinear_square Method
create_curvilinear_square(
starting_points::NTuple{2, Float64},
box_sizes::NTuple{2, Float64},
num_elements::NTuple{2, Int};
c::Float64=0.1,
)Create a single-patch curvilinear square geometry with num_elements elements in each direction and a c parameter to change the deformation of the mapping. Not that the mapping becomes singular with c = 0.3.
Arguments
num_elements::NTuple{2,Int}: The number of elements in each direction.c::Float64 = 0.1: Thecparameter.
Output
geometry::MappedGeometry{2, 2, 1}: The curvilinear square geometry.
Mantis.Geometry.evaluate Method
evaluate(mapping::Mapping, x::Matrix{Float64})Evaluates the mappping of the points x from the parametric space to physical space.
Arguments
mapping::Mapping: The mapping defining the transformation of the pointsx.x::Matrix{Float64}: The points in parametric space to be mapped.
Returns
::Matrix{Float64}: The mapped points in physical space. The size of the matrix is(num_points, image_dim), wherenum_pointsis the number of rows inxandimage_dimis the dimension of the mapped points.
Mantis.Geometry.evaluate Method
evaluate(
geometry::AbstractGeometry{manifold_dim, image_dim, num_patches},
element_id::Int,
xi::Points.AbstractPoints{manifold_dim},
) where {manifold_dim, image_dim, num_patches}Computes the coordinates of the physical points, given the canonical points xi, on the element identified by element_id of a given geometry.
Arguments
geometry::AbstractGeometry{manifold_dim, image_dim, num_patches}: The geometry being evaluated.element_id::Int: The global element id.xi::Points.AbstractPoints{manifold_dim}: The points in the canonical domain at which to evaluate the geometry.
Returns
::Matrix{Float64}: The physical coordinates ofxion elementelement_id. The size of the matrix is(num_eval_points, image_dim).
Notes
There is no generic fallback for this method. It should be implemented for each concrete geometry type.
sourceMantis.Geometry.get_base_element Method
get_base_element(eval_mask::AffineEvaluationMask, element_id::Int)Get the base element index.
Arguments
eval_mask::AffineEvaluationMask: The evaluation mask.element_id::Int: The element index.
Returns
element_id_base::Int: The base element index.
Mantis.Geometry.get_cart_num_elements Function
get_cart_num_elements(geometry::CartesianGeometry, patch_id::Int=1)Returns a CartesianIndices iterator of all elements in the patch indicated by patch_id.
Mantis.Geometry.get_cart_num_elements Method
get_cart_num_elements(geometry::TensorProductGeometry)Returns a CartesianIndices iterator of all elements in the geometry.
sourceMantis.Geometry.get_element_ids Method
get_element_ids(eval_mask::AffineEvaluationMask, element_id_base::Int)Get the element indices corresponding to a base element.
Arguments
eval_mask::AffineEvaluationMask: The evaluation mask.element_id_base::Int: The base element index.
Returns
element_ids::Vector{Int}: The element indices.
Mantis.Geometry.get_element_lengths Method
get_element_lengths(
geometry::AbstractGeometry{manifold_dim, image_dim, num_patches}, element_id::Int,
) where {manifold_dim, image_dim, num_patches}Computes the length, in each manifold dimension, of the element given by element_id in geometry.
Arguments
'geometry::AbstractGeometry': The geometry being used.
'element_id::Int': Index of the element being considered.
Returns
- '<:NTuple{manifold_dim, Number}': The element's lengths.
Notes
There is no generic fallback for this method. It should be implemented for each concrete geometry type.
sourceMantis.Geometry.get_element_measure Method
get_element_measure(geometry::AbstractGeometry, element_id::Int)Computes the measure of the element given by element_id in geometry.
Arguments
'geometry::AbstractGeometry': The geometry being used.
'element_id::Int': Index of the element being considered.
Returns
- '<:Number': The measure of the element.
Notes
There is no generic fallback for this method. It should be implemented for each concrete geometry type.
sourceMantis.Geometry.get_element_vertices Method
get_element_vertices(
geometry::AbstractGeometry{manifold_dim, image_dim, num_patches}, element_id::Int,
) where {manifold_dim, image_dim, num_patches}Computes the vertices, in each manifold dimension, of the element given by element_id in geometry.
Arguments
'geometry::AbstractGeometry': The geometry being used.
'element_id::Int': Index of the element being considered.
Returns
- '<:NTuple{manifold_dim, NTuple{2, Number}}': The element's vertices per manifold dim. For example, for the unit cube [0.0, 1.0]^3 this will be: ((0.0, 1.0), (0.0, 1.0), (0.0, 1.0)).
Notes
There is no generic fallback for this method. It should be implemented for each concrete geometry type.
sourceMantis.Geometry.get_geometry Method
get_geometry(geometry::AbstractGeometry, patch_id::Int)Get (or create) the physical geometry on a specific patch.
Arguments
geometry::AbstractGeometry: The multi-patch geometry.patch_id::Int: The patch ID.
Returns
<:AbstractGeometry{manifold_dim, image_dim, 1}: The geometry on the specified patch.
Notes
There is no generic fallback for this method. It should be implemented for each concrete geometry type.
sourceMantis.Geometry.get_global_element_id Method
get_global_element_id(geometry::AbstractGeometry, patch_id::Int, local_element_id::Int)Get the global element ID for the specified constituent patch ID and local element ID.
Arguments
geometry::AbstractGeometry: A (multi-)patch geometry.patch_id::Int: The constituent patch ID.local_element_id::Int: The local element ID.
Returns
::Int: The global element ID.
Mantis.Geometry.get_image_dim Method
get_image_dim(::AbstractGeometry{manifold_dim, image_dim, num_patches})Returns the dimensions of the image manifold of a given geometry.
Arguments
::AbstractGeometry{manifold_dim, image_dim, num_patches}: The geometry being used.
Returns
::Int: The image manifold dimension.
Mantis.Geometry.get_image_dim Method
get_image_dim(mapping::Mapping{manifold_dim, image_dim})Returns the dimension of the image manifold of the mapping.
Arguments
::Mapping{manifold_dim, image_dim}: The mapping structure.
Returns
::Int: The dimension of the image manifold.
Mantis.Geometry.get_lin_num_elements Function
get_lin_num_elements(geometry::CartesianGeometry, patch_id::Int=1)Returns a LinearIndices iterator of all elements in the patch indicated by patch_id.
Mantis.Geometry.get_lin_num_elements Method
get_lin_num_elements(geometry::TensorProductGeometry)Returns a LinearIndices iterator of all elements in the geometry.
sourceMantis.Geometry.get_manifold_dim Method
get_manifold_dim(eval_mask::AbstractEvaluationMask)Get the dimension of the manifold.
Arguments
eval_mask::AbstractEvaluationMask: The evaluation mask.
Returns
manifold_dim::Int: The dimension of the manifold.
Mantis.Geometry.get_manifold_dim Method
get_manifold_dim(::AbstractGeometry{manifold_dim, image_dim, num_patches})Returns the dimensions of the domain manifold of a given geometry.
Arguments
::AbstractGeometry{manifold_dim, image_dim, num_patches}: The geometry being used.
Returns
::Int: The domain manifold dimension.
Mantis.Geometry.get_manifold_dim Method
get_manifold_dim(mapping::Mapping{manifold_dim, image_dim})Returns the dimension of the domain manifold of the mapping.
Arguments
::Mapping{manifold_dim, image_dim}: The mapping structure.
Returns
::Int: The dimension of the domain manifold.
Mantis.Geometry.get_measure_scale Method
get_measure_scale(eval_mask::AffineEvaluationMask, element_id::Int)Get the product of the scaling of the element.
Arguments
eval_mask::AffineEvaluationMask: The evaluation mask.element_id::Int: The element index.
Returns
scaling::Float64: The scaling.
Mantis.Geometry.get_num_elements Method
get_num_elements(eval_mask::AbstractEvaluationMask)Get the number of elements in the evaluation mask.
Arguments
eval_mask::AbstractEvaluationMask: The evaluation mask.
Returns
num_elements::Int: The number of elements.
Mantis.Geometry.get_num_elements Method
get_num_elements(geometry::AbstractGeometry)
get_num_elements(geometry::AbstractGeometry, patch_id::Int)Returns the number of elements in geometry. If a patch_id is given, return the number of elements in the patch.
Arguments
geometry::AbstractGeometry: The geometry being used.
Returns
::Int: The number of elements in the geometry.
Notes
This method is used as a fallback and assumes that the number of elements (per patch) are explicitly stored.
Exceptions
Error "no field 'num_elements'": This error is thrown if the number of elements is not stored in a field called
num_elementsand if no specificget_num_elementsmethod is defined for the givengeometry.Error "no field 'num_elements_per_patch'": This error is thrown if the number of elements per patch is not stored in a field called
num_elements_per_patchand if no specificget_num_elements_per_patch- orget_num_elements-method (withpatch_idargument) is defined for the givengeometry.
Mantis.Geometry.get_num_elements_base Method
get_num_elements_base(eval_mask::AbstractEvaluationMask)Get the number of elements in the base mesh.
Arguments
eval_mask::AbstractEvaluationMask: The evaluation mask.
Returns
num_elements_base::Int: The number of elements in the base mesh.
Mantis.Geometry.get_num_elements_per_patch Method
get_num_elements_per_patch(geometry::AbstractGeometry)Returns the number of elements in each patch of geometry.
Arguments
geometry::AbstractGeometry: The geometry being used.
Returns
::NTuple{num_patches, Int}: The number of elements per patch in the geometry.
Notes
This method is used as a fallback if there isn't a more specific method to be used. The latter should only be implemented explicitly if necessary.
Exceptions
- Error "no field 'num_elements_per_patch'": This error is thrown if the number of elements per patch is not stored in a field called
num_elements_per_patchand if no specificget_num_elements_per_patchmethod is defined for the givengeometry.
Mantis.Geometry.get_num_patches Method
get_num_patches(::AbstractGeometry{manifold_dim, image_dim, num_patches})Returns the number of patches in a given geometry.
Arguments
::AbstractGeometry{manifold_dim, image_dim, num_patches}: The geometry being used.
Returns
::Int: The number of patches in the geometry.
Mantis.Geometry.get_parametric_geometry Method
get_parametric_geometry(geometry::AbstractGeometry, patch_id::Int)Finds the parametric geometry of the patch given by patch_id in geometry. If no patch_id is given, the parametric geometry of the whole geometry is returned.
Arguments
'geometry::AbstractGeometry': The (physical) geometry being used.
'patch_id::Int': (Optional) ID of the patch to get the parametric geometry for.
Returns
- '<:CartesianGeometry': The (patch-wise) parametric geometry.
Notes
There is no generic fallback for this method. It should be implemented for each concrete geometry type.
sourceMantis.Geometry.get_patch_and_local_element_id Method
get_patch_and_local_element_id(geometry::AbstractGeometry, element_id::Int)Get the constituent patch ID and local element ID for the specified global element ID.
Arguments
geometry::AbstractGeometry: The multi-patch geometry.element_id::Int: The global element ID.
Returns
patch_id::Int: The patch IDlocal_element_id::Int: The local element ID.
Exceptions
ArgumentError: This error is thrown if the given
element_idis larger than the total number of elements found in thegeometry.Error "no field 'num_elements'": This error is thrown if the number of elements is not stored in a field called
num_elementsand if no specificget_num_elementsmethod is defined for the givengeometry.Error "no field 'num_elements_per_patch'": This error is thrown if the number of elements per patch is not stored in a field called
num_elements_per_patchand if no specificget_num_elements-method (withpatch_idargument) is defined for the givengeometry.
Mantis.Geometry.get_patch_id Method
get_patch_id(geometry::AbstractGeometry, element_id::Int)Get the ID of the patch to which the specified global element belongs.
Arguments
geometry::AbstractGeometry: The (multi-patch) geometry.element_id::Int: The global element ID.
Returns
patch_id::Int: ID of the patch to which the element belongs.
Exceptions
ArgumentError: This error is thrown if the given
element_idis larger than the total number of elements found in thegeometry.Error "no field 'num_elements'": This error is thrown if the number of elements is not stored in a field called
num_elementsand if no specificget_num_elementsmethod is defined for the givengeometry.Error "no field 'num_elements_per_patch'": This error is thrown if the number of elements per patch is not stored in a field called
num_elements_per_patchand if no specificget_num_elements-method (withpatch_idargument) is defined for the givengeometry.
Mantis.Geometry.get_scaling Method
get_scaling(eval_mask::AffineEvaluationMask, element_id::Int)Get the scaling of the element.
Arguments
eval_mask::AffineEvaluationMask: The evaluation mask.element_id::Int: The element index.
Returns
scaling<:NTuple{manifold_dim, Real}: The scaling.
Mantis.Geometry.get_translation Method
get_translation(eval_mask::AffineEvaluationMask, element_id::Int)Get the translation of the element.
Arguments
eval_mask::AffineEvaluationMask: The evaluation mask.element_id::Int: The element index.
Returns
translation<:NTuple{manifold_dim, Real}: The translation.
Mantis.Geometry.hessian Method
hessian(
geometry::AbstractGeometry{manifold_dim, image_dim, num_patches},
element_id::Int,
xi::Points.AbstractPoints{manifold_dim},
) where {manifold_dim, image_dim, num_patches}Computes the hessian at the physical points, given the canonical points xi, on the element identified by element_id of a given geometry.
Arguments
geometry::AbstractGeometry{manifold_dim, image_dim, num_patches}: The geometry being used.element_id::Int: The global element id.xi::Points.AbstractPoints{manifold_dim}: The points in the canonical domain to evaluate the hessian at.
Returns
::Vector{NTuple{image_dim, SMatrix{manifold_dim, manifold_dim}}: The hessian at the physical points corresponding to the canonical pointsxion elementelement_id. The length of the vector equals the number of evaluation points. Per points, there areimage_dimmany hessian metrices, hence the tuple.
Notes
There is no generic fallback for this method. It should be implemented for each concrete geometry type.
sourceMantis.Geometry.inv_metric Method
inv_metric(
geometry::AbstractGeometry{manifold_dim, image_dim, num_patches},
element_id::Int,
xi::Points.AbstractPoints{manifold_dim},
) where {manifold_dim, image_dim, num_patches}Returns the inverse metric, the metric and its determinant.
Arguments
geometry::AbstractGeometry{manifold_dim, image_dim, num_patches}: The geometry.element_id::Int: Global element id.xi::Points.AbstractPoints{manifold_dim}: Evaluation points in the canonical domain.
Returns
::Vector{SMatrix{manifold_dim, manifold_dim}}: Inverse metric tensor per evaluation point.g::Vector{SMatrix{manifold_dim, manifold_dim}}: Metric tensor per evaluation point.sqrt_g::Vector{Float64}: Square-root of the determinant of the metric per evaluation point.
Mantis.Geometry.jacobian Method
jacobian(
geometry::AbstractGeometry{manifold_dim, image_dim, num_patches},
element_id::Int,
xi::Points.AbstractPoints{manifold_dim},
) where {manifold_dim, image_dim, num_patches}Computes the jacobian at the physical points, given the canonical points xi, on the element identified by element_id of a given geometry.
Arguments
geometry::AbstractGeometry{manifold_dim, image_dim, num_patches}: The geometry being used.element_id::Int: The global element id.xi::Points.AbstractPoints{manifold_dim}: The points in the canonical domain to evaluate the jacobian at.
Returns
::Vector{SMatrix{image_dim, manifold_dim, Float64}}: The jacobian at the physical points corresponding to the canonical pointsxion elementelement_id. The length of the vector equals the number of evaluation points.
Notes
There is no generic fallback for this method. It should be implemented for each concrete geometry type.
sourceMantis.Geometry.metric Method
metric(
geometry::AbstractGeometry{manifold_dim, image_dim, num_patches},
element_id::Int,
xi::Points.AbstractPoints{manifold_dim},
) where {manifold_dim, image_dim, num_patches}Returns the metric and its determinant.
Arguments
geometry::AbstractGeometry{manifold_dim, image_dim, num_patches}: The geometry.element_id::Int: Global element id.xi::Points.AbstractPoints{manifold_dim}: Evaluation points in the canonical domain.
Returns
g::Vector{SMatrix{manifold_dim, manifold_dim}}: Metric tensor per evaluation point.sqrt_g::Vector{Float64}: Square-root of the determinant of the metric per evaluation point.
Mantis.Geometry.metric_derivatives Method
metric_derivatives(
geometry::AbstractGeometry{manifold_dim, image_dim, num_patches},
element_id::Int,
xi::Points.AbstractPoints{manifold_dim},
) where {manifold_dim, image_dim, num_patches}Returns the inverse metric, the metric and its determinant.
Arguments
geometry::AbstractGeometry{manifold_dim, image_dim, num_patches}: The geometry.element_id::Int: Global element id.xi::Points.AbstractPoints{manifold_dim}: Evaluation points in the canonical domain.
Returns
J::Vector{SMatrix{image_dim, manifold_dim}}: Jacobian per point.inv_g::Vector{SMatrix{manifold_dim, manifold_dim}}: Inverse metric tensor per point.g::Vector{SMatrix{manifold_dim, manifold_dim}}: Metric tensor per point.sqrt_g::Vector{Float64}: Square-root of the determinant of the metric per point.dgdxs::NTuple{manifold_dim, Vector{SMatrix{manifold_dim, manifold_dim}}}: Derivative of the metric tensor per direction in manifold_dim.dinv_g_dxs::NTuple{manifold_dim, Vector{SMatrix{manifold_dim, manifold_dim}}}: Derivative of the inverse metric tensor per direction in manifold_dim.dsqrt_g_dxs::NTuple{manifold_dim, Vector{Float64}: Derivative of the square-root of the determinant of the metric tensor per direction in manifold_dim.Hs::Vector{NTuple{image_dim, SMatrix{manifold_dim, manifold_dim}}}: Hessians per point.
Mantis.Geometry.subdivide_evaluation_mask Method
subdivide_evaluation_mask(eval_mask, nsubd; elements_to_exclude)Create a hierarchical evaluation mask by subdividing the i-th element of the evaluation mesh into nsubd[i][j] elements in the j-th direction. The elements_to_exclude argument is a vector of element indices to exclude from the mesh.
Arguments
eval_mask::AbstractEvaluationMask: The evaluation mask.nsubd::Vector{NTuple{manifold_dim, Int}}: The number of subdivisions in each direction.elements_to_exclude::AbstractVector{Int}: The elements to exclude.
Returns
subdiv_eval_mask::AbstractEvaluationMask: The subdivided evaluation mask.
Mantis.Geometry.subdivide_evaluation_mask Method
subdivide_evaluation_mask(eval_mask, nsubd; elements_to_exclude)Create a hierarchical evaluation mask by subdividing the i-th element of the evaluation mesh into nsubd[i][j] elements in the j-th direction. The elements_to_exclude argument is a vector of element indices to exclude from the mesh.
Arguments
eval_mask::AbstractEvaluationMask: The evaluation mask.nsubd::Int: The number of subdivisions for each element.elements_to_exclude::AbstractVector{Int}: The elements to exclude.
Returns
subdiv_eval_mask::AbstractEvaluationMask: The subdivided evaluation mask.
Mantis.Geometry.subdivide_evaluation_mask Method
subdivide_evaluation_mask(eval_mask, nsubd; elements_to_exclude)Create a hierarchical evaluation mask by subdividing the i-th element of the evaluation mesh into nsubd[i][j] elements in the j-th direction. The elements_to_exclude argument is a vector of element indices to exclude from the mesh.
Arguments
eval_mask::AbstractEvaluationMask: The evaluation mask.nsubd::Vector{Int}: The number of subdivisions for each element.elements_to_exclude::Vector{Int}: The elements to exclude.
Returns
subdiv_eval_mask::AbstractEvaluationMask: The subdivided evaluation mask.
Mantis.Geometry.transform_element_vertices Method
transform_element_vertices(
eval_mask::AbstractEvaluationMask{manifold_dim},
element_vertices_base::NTuple{T},
element_id::Int,
) where {manifold_dim, T <: AbstractVector}Transforms the element_vertices_base, corresponding to the element vertices at the base element of element_id, according to the transformation of eval_mask.
Arguments
eval_mask::AbstractEvaluationMask{manifold_dim}: The evaluation mask.element_vertices_base::NTuple{T}: The element vertices of the base geometry, evaluated
at the base element corresponding to `element_id`.element_id::Int: The element of evaluation mask.
Returns
element_vertices::NTuple{T}: The transformed element vertices corresponding to
`element_id`.Mantis.Geometry.transform_evaluation_points Method
transform_evaluation_points(
eval_mask::AffineEvaluationMask{manifold_dim, num_elements, num_elements_base},
element_id::Int,
xi::Points.AbstractPoints{manifold_dim}
)Evaluate the mapping from the evaluation mask to the base.
Arguments
eval_mask::AffineEvaluationMask: The evaluation mask.element_id::Int: The evaluation element index.xi::Points.AbstractPoints{manifold_dim}: The canonical points for the evaluation mask.
Returns
element_id_base::Int: The element index in the range geometry.xi_base::NTuple{manifold_dim, T}: The canonical points for the base.scaling::NTuple{manifold_dim, Float64}: The scaling of the element.
Mantis.Geometry.transform_evaluation_points Method
transform_evaluation_points(
eval_mask::AffineEvaluationMask{manifold_dim, num_elements, num_elements_base},
element_id::Int,
xi::Points.AbstractPoints{manifold_dim}
)Evaluate the mapping from the evaluation mask to the base.
Arguments
eval_mask::AffineEvaluationMask: The evaluation mask.element_id::Int: The evaluation element index.xi::Points.AbstractPointsP{manifold_dim}: The canonical points for the evaluation mask.
Returns
element_id_base::Int: The element index in the range geometry.xi_base:Points.AbstractPoints{manifold_dim}: The canonical points for the base.scaling::NTuple{manifold_dim, Float64}: The scaling of the element.
Mantis.Geometry.trim_evaluation_mask Method
trim_evaluation_mask(
eval_mask::AffineEvaluationMask{manifold_dim, num_elements, num_elements_base},
elements_to_exclude::AbstractVector{Int}
)Trim the evaluation mask by excluding elements.
Arguments
eval_mask::AffineEvaluationMask: The evaluation mask.
Returns
eval_mask::AffineEvaluationMask: The trimmed evaluation mask.
Mantis.Geometry.trivial_evaluation_mask Method
trivial_evaluation_mask(manifold_dim::Int, num_elements::Int)Create a trivial evaluation mask.
Arguments
manifold_dim::Int: The dimension of the manifold.num_elements::Int: The number of elements.
Returns
eval_mask::AffineEvaluationMask: The trivial evaluation mask.