32 Array<int> attributes) : parent_(parent), from_(from), attributes_(attributes)
36 MFEM_ABORT(
"SubMesh does not support non-conforming meshes");
43 std::tie(parent_vertex_ids_,
51 std::tie(parent_vertex_ids_,
90 Array<int> sub_par_vert(sub_vert.Size());
91 for (
int j = 0; j < sub_vert.Size(); j++)
93 sub_par_vert[j] = parent_vertex_ids_[sub_vert[j]];
99 if (par_vert.Size() == 3)
114 parent_element_ids_);
143 Array<int> sub_par_vert(sub_vert.Size());
144 for (
int j = 0; j < sub_vert.Size(); j++)
146 sub_par_vert[j] = parent_vertex_ids_[sub_vert[j]];
163 if (par_vert.Size() == 3)
178 const GridFunction *parent_nodes = parent.
GetNodes();
181 const FiniteElementSpace *parent_fes = parent_nodes->FESpace();
184 parent_fes->FEColl()->GetOrder(),
185 parent_fes->IsDGSpace(),
187 parent_fes->GetOrdering());
201 map.Transfer(src, dst);
T Max() const
Find the maximal element in the array, using the comparison operator < for class T.
void SetSize(int nsize)
Change the logical size of the array, keep existing entries.
void SetAttribute(const int attr)
Set element's attribute.
int GetAttribute() const
Return element's attribute.
Class for grid function - Vector with associated FE space.
void GetBdrElementFace(int i, int *f, int *o) const
void InitMesh(int Dim_, int spaceDim_, int NVert, int NElem, int NBdrElem)
Begin construction of a mesh.
Array< int > bdr_attributes
A list of all unique boundary attributes used by the Mesh.
static int GetQuadOrientation(const int *base, const int *test)
Returns the orientation of "test" relative to "base".
void GetBdrElementVertices(int i, Array< int > &v) const
Returns the indices of the vertices of boundary element i.
void GetElementVertices(int i, Array< int > &v) const
Returns the indices of the vertices of element i.
Array< int > GetFaceToBdrElMap() const
bool Nonconforming() const
int GetBdrElementFaceIndex(int be_idx) const
Return the local face (codimension-1) index for the given boundary element index.
static int GetTriOrientation(const int *base, const int *test)
Returns the orientation of "test" relative to "base".
void FinalizeTopology(bool generate_bdr=true)
Finalize the construction of the secondary topology (connectivity) data of a Mesh.
int Dimension() const
Dimension of the reference space used within the elements.
const Element * GetBdrElement(int i) const
Return pointer to the i'th boundary element object.
int SpaceDimension() const
Dimension of the physical space containing the mesh.
void GetNodes(Vector &node_coord) const
static int ComposeTriOrientations(int ori_a_b, int ori_b_c)
void GetFaceVertices(int i, Array< int > &vert) const
Returns the indices of the vertices of face i.
virtual void Finalize(bool refine=false, bool fix_orientation=false)
Finalize the construction of a general Mesh.
GridFunction * GetNodes()
Return a pointer to the internal node GridFunction (may be NULL).
virtual void SetCurvature(int order, bool discont=false, int space_dim=-1, int ordering=1)
Set the curvature of the mesh nodes using the given polynomial degree.
virtual void SetAttributes()
Determine the sets of unique attribute values in domain and boundary elements.
Subdomain representation of a topological parent in another Mesh.
static SubMesh CreateFromBoundary(const Mesh &parent, Array< int > boundary_attributes)
Create a surface SubMesh from its parent.
static void Transfer(const GridFunction &src, GridFunction &dst)
Transfer the dofs of a GridFunction.
static SubMesh CreateFromDomain(const Mesh &parent, Array< int > domain_attributes)
Create a domain SubMesh from its parent.
static TransferMap CreateTransferMap(const GridFunction &src, const GridFunction &dst)
Create a Transfer Map object.
TransferMap represents a mapping of degrees of freedom from a source GridFunction to a destination Gr...
std::tuple< Array< int >, Array< int > > AddElementsToMesh(const Mesh &parent, Mesh &mesh, const Array< int > &attributes, bool from_boundary)
Given a Mesh parent and another Mesh mesh using the list of attributes in attributes,...
Array< int > BuildFaceMap(const Mesh &pm, const Mesh &sm, const Array< int > &parent_element_ids)
Given two meshes that have a parent to SubMesh relationship create a face map, using a SubMesh to par...
std::function< real_t(const Vector &)> f(real_t mass_coeff)