MFEM
v4.6.0
Finite element discretization library
|
Classes | |
struct | UniqueIndexGenerator |
Convenience object to create unique indices. More... | |
Functions | |
bool | ElementHasAttribute (const Element &el, const Array< int > &attributes) |
Given an element el and a list of attributes, determine if that element is in at least one attribute of attributes. More... | |
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. More... | |
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. More... | |
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. More... | |
template<class T , class RT = decltype(std::declval<T>().GetParent())> | |
RT | GetRootParent (const T &m) |
Identify the root parent of a given SubMesh. More... | |
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 47 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 189 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 89 of file submesh_utils.cpp.
bool mfem::SubMeshUtils::ElementHasAttribute | ( | const Element & | el, |
const Array< int > & | attributes | ||
) |
Given an element el and a list of attributes, determine if that element is in at least one attribute of attributes.
el | The element |
attributes | The attributes |
Definition at line 34 of file submesh_utils.cpp.
RT mfem::SubMeshUtils::GetRootParent | ( | const T & | m | ) |
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 115 of file submesh_utils.hpp.