14 #include "../../fem/gridfunc.hpp"
22 return SubMesh(parent, From::Domain, domain_attributes);
32 Array<int> attributes) : parent_(parent), from_(from), attributes_(attributes)
36 MFEM_ABORT(
"SubMesh does not support non-conforming meshes");
39 if (from == From::Domain)
43 std::tie(parent_vertex_ids_,
51 std::tie(parent_vertex_ids_,
67 int pbeid = parent_face_to_be[parent_face_ids_[
GetBdrFace(i)]];
86 const GridFunction *parent_nodes = parent.
GetNodes();
89 const FiniteElementSpace *parent_fes = parent_nodes->FESpace();
92 parent_fes->FEColl()->GetOrder(),
93 parent_fes->IsDGSpace(),
95 parent_fes->GetOrdering());
Class for grid function - Vector with associated FE space.
static SubMesh CreateFromDomain(const Mesh &parent, Array< int > domain_attributes)
Create a domain SubMesh from its parent.
bool Nonconforming() const
virtual void SetAttributes()
void Transfer(const GridFunction &src, GridFunction &dst) const
Transfer the source GridFunction to the destination GridFunction.
TransferMap represents a mapping of degrees of freedom from a source GridFunction to a destination Gr...
virtual void SetCurvature(int order, bool discont=false, int space_dim=-1, int ordering=1)
int GetAttribute() const
Return element's attribute.
int SpaceDimension() const
static const int GENERATED_ATTRIBUTE
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, this function adds matching elements with those attributes from parent to mesh.
void FinalizeTopology(bool generate_bdr=true)
Finalize the construction of the secondary topology (connectivity) data of a Mesh.
GridFunction * GetNodes()
Return a pointer to the internal node GridFunction (may be NULL).
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...
void InitMesh(int Dim_, int spaceDim_, int NVert, int NElem, int NBdrElem)
Begin construction of a mesh.
virtual void Finalize(bool refine=false, bool fix_orientation=false)
Finalize the construction of a general Mesh.
static void Transfer(const GridFunction &src, GridFunction &dst)
Transfer the dofs of a GridFunction.
static TransferMap CreateTransferMap(const GridFunction &src, const GridFunction &dst)
Create a Transfer Map object.
Subdomain representation of a topological parent in another Mesh.
void SetAttribute(const int attr)
Set element's attribute.
static SubMesh CreateFromBoundary(const Mesh &parent, Array< int > boundary_attributes)
Create a surface SubMesh from its parent.
void GetNodes(Vector &node_coord) const
Array< int > GetFaceToBdrElMap() const
int GetBdrFace(int BdrElemNo) const
Return the local face index for the given boundary face.
const Element * GetBdrElement(int i) const