1#ifndef included_AMP_SubsetMesh
2#define included_AMP_SubsetMesh
4#include "AMP/mesh/Mesh.h"
30 static std::shared_ptr<Mesh>
create( std::shared_ptr<const Mesh> mesh,
61 std::shared_ptr<Mesh>
Subset( std::string name )
const override;
69 std::unique_ptr<Mesh>
clone()
const override;
107 const int gcw = 0 )
const override;
274 void displaceMesh( std::shared_ptr<const AMP::LinearAlgebra::Vector> x )
override;
315 if (
id != rhs.
id ) {
325 if (
id != rhs.
id ) {
A class used to iterate over elements in a Mesh.
A class used to abstract away mesh from an application.
std::unique_ptr< MeshElement > MeshElementPtr
Pointer to MeshElement and MeshElementVector.
MeshID meshID() const
Get the mesh ID.
Movable
Enumeration for basic mesh-based quantities.
virtual std::shared_ptr< Mesh > Subset(MeshID meshID) const
Subset a mesh given a MeshID.
A class used to handle a subset mesh.
std::vector< int > getBoundaryIDs() const override
Return the list of all boundary ID sets in the mesh.
size_t numLocalElements(const GeomType type) const override
void displaceMesh(const std::vector< double > &x) override
Displace the entire mesh.
SubsetMesh(std::shared_ptr< const Mesh > mesh, const AMP::Mesh::MeshIterator &iterator, bool isGlobal)
Default constructor.
std::shared_ptr< Mesh > Subset(MeshID meshID) const override
Subset a mesh given a MeshID.
bool isMember(const MeshElementID &id) const override
Check if an element is in the mesh.
virtual ~SubsetMesh()
Deconstructor.
std::vector< MeshID > getAllMeshIDs() const override
std::map< map_id_struct, ElementListPtr > d_blockSets
std::vector< MeshID > getBaseMeshIDs() const override
std::shared_ptr< Mesh > Subset(std::string name) const override
Subset a mesh given a mesh name.
Mesh::Movable isMeshMovable() const override
Is the mesh movable.
std::vector< MeshID > getLocalMeshIDs() const override
std::map< map_id_struct, ElementListPtr > d_boundarySets
void displaceMesh(std::shared_ptr< const AMP::LinearAlgebra::Vector > x) override
Displace the entire mesh.
bool operator==(const Mesh &mesh) const override
Check if two meshes are equal.
uint64_t positionHash() const override
Identify if the position has moved.
std::vector< int > d_blockIdSets
void writeRestart(int64_t fid) const override
Write restart data to file.
bool isBaseMesh() const override
Is the current mesh a base mesh.
MeshElementPtr getElement(const MeshElementID &id) const override
Return a mesh element given it's id.
size_t numGhostElements(const GeomType type, const int gcw) const override
std::shared_ptr< ElementList > ElementListPtr
MeshIterator getIterator(const GeomType type, const int gcw=0) const override
Return an MeshIterator over the given geometric objects.
std::vector< MeshID > getLocalBaseMeshIDs() const override
std::vector< int > getBlockIDs() const override
Return the list of all boundary ID sets in the mesh.
bool containsElement(const MeshElementID &id) const override
std::unique_ptr< Mesh > clone() const override
Function to copy the mesh (allows use to properly copy the derived class)
virtual MeshIterator getBlockIDIterator(const GeomType type, const int id, const int gcw=0) const override
Return an MeshIterator over the given geometric objects on the given block ID set.
ElementListPtr getElementParents(const MeshElement &elem, const GeomType type) const override
Return the parent elements of the given mesh element.
std::vector< int > d_boundaryIdSets
std::vector< size_t > N_global
MeshIterator isMember(const MeshIterator &it) const override
Check if elements are in the mesh.
size_t numGlobalElements(const GeomType type) const override
static std::shared_ptr< Mesh > create(std::shared_ptr< const Mesh > mesh, const AMP::Mesh::MeshIterator &iterator, bool isGlobal)
Create a subset mesh.
virtual MeshIterator getBoundaryIDIterator(const GeomType type, const int id, const int gcw=0) const override
Return an MeshIterator over the given geometric objects on the given boundary ID set.
std::vector< std::unique_ptr< MeshElement > > ElementList
std::shared_ptr< const Mesh > d_parentMesh
std::vector< std::vector< ElementListPtr > > d_surface
std::string meshClass() const override
Return a string with the mesh class name.
std::vector< std::vector< ElementListPtr > > d_elements
virtual MeshIterator getSurfaceIterator(const GeomType type, const int gcw=0) const override
Return an MeshIterator over the given geometric objects on the surface.
GeomType
Enumeration for basic mesh-based quantities.
A structure used to identify the mesh element.
A structure used to identify the mesh.
bool operator>=(const map_id_struct &rhs) const
bool operator!=(const map_id_struct &rhs) const
bool operator<(const map_id_struct &rhs) const
bool operator<=(const map_id_struct &rhs) const
bool operator>(const map_id_struct &rhs) const
bool operator==(const map_id_struct &rhs) const