![]() |
MFEM v4.8.0
Finite element discretization library
|
Classes | |
struct | UniqueIndexGenerator |
Convenience object to create unique indices. More... | |
Functions | |
template<typename ElementT > | |
bool | ElementHasAttribute (const ElementT &el, const Array< int > &attributes) |
std::tuple< Array< int >, Array< int > > | AddElementsToMesh (const Mesh &parent, Mesh &mesh, const Array< int > &attributes, bool from_boundary=false) |
Given a Mesh parent and another Mesh mesh using the list of attributes in attributes, this function adds matching elements with those attributes from parent to mesh. | |
void | BuildVdofToVdofMap (const FiniteElementSpace &subfes, const FiniteElementSpace &parentfes, const SubMesh::From &from, const Array< int > &parent_element_ids, Array< int > &vdof_to_vdof_map) |
Build the vdof to vdof mapping between two FiniteElementSpace objects. | |
Array< int > | BuildFaceMap (const Mesh &parent, const Mesh &mesh, const Array< int > &parent_element_ids) |
Given two meshes that have a parent to SubMesh relationship create a face map, using a SubMesh to parent Mesh element id map. | |
template<typename SubMeshT > | |
void | AddBoundaryElements (SubMeshT &mesh, const std::unordered_map< int, int > &lface_to_boundary_attribute={}) |
Add boundary elements to the SubMesh. | |
template void | AddBoundaryElements (SubMesh &mesh, const std::unordered_map< int, int > &) |
template void | AddBoundaryElements (ParSubMesh &mesh, const std::unordered_map< int, int > &) |
template<typename NCSubMeshT > | |
void | ConstructFaceTree (NCSubMeshT &submesh, const Array< int > &attributes) |
Construct a nonconformal mesh (serial or parallel) for a surface submesh, from an existing nonconformal volume mesh (serial or parallel). | |
template void | ConstructFaceTree (NCSubMesh &submesh, const Array< int > &attributes) |
template void | ConstructFaceTree (ParNCSubMesh &submesh, const Array< int > &attributes) |
template<typename NCSubMeshT > | |
void | ConstructVolumeTree (NCSubMeshT &submesh, const Array< int > &attributes) |
Construct a nonconformal mesh (serial or parallel) for a volume submesh, from an existing nonconformal volume mesh (serial or parallel). | |
template void | ConstructVolumeTree (NCSubMesh &submesh, const Array< int > &attributes) |
template void | ConstructVolumeTree (ParNCSubMesh &submesh, const Array< int > &attributes) |
template<class T > | |
auto | GetRootParent (const T &m) -> decltype(std::declval< T >().GetParent()) |
Identify the root parent of a given SubMesh. | |
template<typename T > | |
bool | HasAttribute (const T &el, const Array< int > &attributes) |
Helper for checking if an object's attributes match a list. | |
MFEM_DEPRECATED bool | ElementHasAttribute (const Element &el, const Array< int > &attributes) |
Forwarding dispatch to HasAttribute for backwards compatibility. | |
template<typename T1 , typename T2 , typename T3 > | |
void | Permute (const Array< int > &indices, T1 &t1, T2 &t2, T3 &t3) |
Apply permutation to a container type. | |
template<typename T1 , typename T2 , typename T3 > | |
void | Permute (Array< int > &&indices, T1 &t1, T2 &t2, T3 &t3) |
Apply permutation to a container type. | |
template void mfem::SubMeshUtils::AddBoundaryElements | ( | ParSubMesh & | mesh, |
const std::unordered_map< int, int > & | ) |
template void mfem::SubMeshUtils::AddBoundaryElements | ( | SubMesh & | mesh, |
const std::unordered_map< int, int > & | ) |
void mfem::SubMeshUtils::AddBoundaryElements | ( | SubMeshT & | mesh, |
const std::unordered_map< int, int > & | lface_to_boundary_attribute = {} ) |
Add boundary elements to the SubMesh.
An attempt to call this function for anything other than SubMesh or ParSubMesh will result in a linker error as the template is only explicitly instantiated for those types.
mesh | The SubMesh to add boundary elements to. |
lface_to_boundary_attribute | Map from local faces in the submesh to boundary attributes. Only necessary for interior boundary attributes of volume submeshes, where the face owning the attribute might be on a neighboring rank. |
SubMeshT | The SubMesh type, options SubMesh and ParSubMesh. |
Definition at line 257 of file submesh_utils.cpp.
std::tuple< Array< int >, Array< int > > mfem::SubMeshUtils::AddElementsToMesh | ( | const Mesh & | parent, |
Mesh & | mesh, | ||
const Array< int > & | attributes, | ||
bool | from_boundary = false ) |
Given a Mesh parent and another Mesh mesh using the list of attributes in attributes, this function adds matching elements with those attributes from parent to mesh.
It also returns a tuple containing first the parent vertex ids (mapping from mesh vertex ids (index of the array), to the parent vertex ids) and second the parent element ids (mapping from submesh element ids (index of the array), to the parent element ids)
parent | The Mesh where the elements are "extracted" from. |
mesh | The Mesh where the elements are extracted to. |
attributes | The attributes of the desired elements. |
from_boundary | Indication if the desired elements come from the boundary of the parent. |
Definition at line 54 of file submesh_utils.cpp.
Array< int > mfem::SubMeshUtils::BuildFaceMap | ( | const Mesh & | parent, |
const Mesh & | mesh, | ||
const Array< int > & | parent_element_ids ) |
Given two meshes that have a parent to SubMesh relationship create a face map, using a SubMesh to parent Mesh element id map.
parent | The parent Mesh. |
mesh | The Mesh to match its parents faces. |
parent_element_ids | The Mesh element to parent element id map. |
Definition at line 219 of file submesh_utils.cpp.
void mfem::SubMeshUtils::BuildVdofToVdofMap | ( | const FiniteElementSpace & | subfes, |
const FiniteElementSpace & | parentfes, | ||
const SubMesh::From & | from, | ||
const Array< int > & | parent_element_ids, | ||
Array< int > & | vdof_to_vdof_map ) |
Build the vdof to vdof mapping between two FiniteElementSpace objects.
Given two FiniteElementSpace objects and the map parent_element_ids, which maps the element ids of the subfes to elements on the parentfes (or boundary elements depending on the type of transfer, volume or surface), create a vdof to vdof map.
This map is entirely serial and has no knowledge about parallel groups.
[in] | subfes | |
[in] | parentfes | |
[in] | from | |
[in] | parent_element_ids | |
[out] | vdof_to_vdof_map |
Definition at line 93 of file submesh_utils.cpp.
template void mfem::SubMeshUtils::ConstructFaceTree | ( | NCSubMesh & | submesh, |
const Array< int > & | attributes ) |
void mfem::SubMeshUtils::ConstructFaceTree | ( | NCSubMeshT & | submesh, |
const Array< int > & | attributes ) |
Construct a nonconformal mesh (serial or parallel) for a surface submesh, from an existing nonconformal volume mesh (serial or parallel).
This function is only instantiated for NCSubMesh and ParNCSubMesh Attempting to use it with other classes will result in a linker error.
NCSubMeshT | The NCSubMesh type |
[out] | submesh | The surface submesh to be filled. |
attributes | The set of attributes defining the submesh. |
Definition at line 436 of file submesh_utils.cpp.
template void mfem::SubMeshUtils::ConstructFaceTree | ( | ParNCSubMesh & | submesh, |
const Array< int > & | attributes ) |
template void mfem::SubMeshUtils::ConstructVolumeTree | ( | NCSubMesh & | submesh, |
const Array< int > & | attributes ) |
void mfem::SubMeshUtils::ConstructVolumeTree | ( | NCSubMeshT & | submesh, |
const Array< int > & | attributes ) |
Construct a nonconformal mesh (serial or parallel) for a volume submesh, from an existing nonconformal volume mesh (serial or parallel).
This function is only instantiated for NCSubMesh and ParNCSubMesh Attempting to use it with other classes will result in a linker error.
NCSubMeshT | The NCSubMesh type |
[out] | submesh | The volume submesh to be filled from parent. |
attributes | The set of attributes defining the submesh. |
Definition at line 756 of file submesh_utils.cpp.
template void mfem::SubMeshUtils::ConstructVolumeTree | ( | ParNCSubMesh & | submesh, |
const Array< int > & | attributes ) |
|
inline |
Forwarding dispatch to HasAttribute for backwards compatibility.
el | Instance of T, requires method GetAttribute() |
attributes | Set of attributes to match against |
Definition at line 190 of file submesh_utils.hpp.
bool mfem::SubMeshUtils::ElementHasAttribute | ( | const ElementT & | el, |
const Array< int > & | attributes ) |
Definition at line 41 of file submesh_utils.cpp.
auto mfem::SubMeshUtils::GetRootParent | ( | const T & | m | ) | -> decltype(std::declval<T>().GetParent()) |
Identify the root parent of a given SubMesh.
T | The type of the input object which has to fulfill the SubMesh::GetParent() interface. |
Definition at line 109 of file submesh_utils.hpp.
bool mfem::SubMeshUtils::HasAttribute | ( | const T & | el, |
const Array< int > & | attributes ) |
Helper for checking if an object's attributes match a list.
T | Object Type |
el | Instance of T, requires method GetAttribute() |
attributes | Set of attributes to match against |
Definition at line 170 of file submesh_utils.hpp.
void mfem::SubMeshUtils::Permute | ( | Array< int > && | indices, |
T1 & | t1, | ||
T2 & | t2, | ||
T3 & | t3 ) |
Apply permutation to a container type.
Sorts the indices variable in the process, thereby destroying the permutation.
T1 | Container type 1 |
T2 | Container type 2 |
T3 | Container type 3 |
indices | Set of indices that define the permutation |
t1 | First collection to be permuted |
t2 | Second collection to be permuted |
t3 | Third collection to be permuted |
Definition at line 227 of file submesh_utils.hpp.
void mfem::SubMeshUtils::Permute | ( | const Array< int > & | indices, |
T1 & | t1, | ||
T2 & | t2, | ||
T3 & | t3 ) |
Apply permutation to a container type.
T1 | Container type 1 |
T2 | Container type 2 |
T3 | Container type 3 |
indices | Set of indices that define the permutation |
t1 | First collection to be permuted |
t2 | Second collection to be permuted |
t3 | Third collection to be permuted |
Definition at line 208 of file submesh_utils.hpp.