1#ifndef included_AMP_LibMesh
2#define included_AMP_LibMesh
4#include "AMP/mesh/Mesh.h"
5#include "AMP/mesh/libmesh/initializeLibMesh.h"
9#include "libmesh/libmesh_config.h"
10#undef LIBMESH_ENABLE_REFERENCE_COUNTING
11#include "libmesh/mesh.h"
12#include "libmesh/node.h"
19class libmeshMeshElement;
20class libmeshElemIterator;
55 explicit libmeshMesh( std::shared_ptr<const MeshParameters> params );
68 const std::string &name,
69 std::shared_ptr<libMesh::Parallel::Communicator> libMeshComm =
nullptr );
80 std::unique_ptr<Mesh>
clone()
const override;
100 static size_t maxProcs( std::shared_ptr<const MeshParameters> params );
142 const int gcw = 0 )
const override;
240 void displaceMesh( std::shared_ptr<const AMP::LinearAlgebra::Vector> x )
override;
264 typedef std::shared_ptr<std::vector<libmeshMeshElement>>
ElemListPtr;
A class used to iterate over elements in a Mesh.
A class used to abstract away mesh from an application.
Movable
Enumeration for basic mesh-based quantities.
A derived class used to define a mesh element.
A concrete mesh class for libMesh.
std::unique_ptr< MeshElement > getElement(const MeshElementID &id) const override
Return a mesh element given it's id.
std::shared_ptr< initializeLibMesh > libmeshInit
std::vector< size_t > n_local
void fillBoundaryElements()
size_t numLocalElements(const GeomType type) const override
void writeRestart(int64_t fid) const override
Write restart data to file.
std::vector< unsigned int > neighborNodeIDs
uint64_t positionHash() const override
Identify if the position has moved.
Mesh::Movable isMeshMovable() const override
Is the mesh movable.
std::shared_ptr< libMesh::Mesh > d_libMesh
std::unique_ptr< Mesh > clone() const override
Function to copy the mesh (allows use to proply copy the derived class)
std::vector< ElemListPtr > d_localSurfaceElements
virtual ~libmeshMesh()
Deconstructor.
libmeshMesh(std::shared_ptr< const MeshParameters > params)
Read in mesh files, partition domain, and prepare environment for simulation.
void displaceMesh(std::shared_ptr< const AMP::LinearAlgebra::Vector > x) override
Displace the entire mesh.
std::vector< size_t > n_ghost
libmeshMesh(std::shared_ptr< libMesh::Mesh > mesh, const std::string &name, std::shared_ptr< libMesh::Parallel::Communicator > libMeshComm=nullptr)
Constructor to create a libmeshMesh object from a libMesh mesh.
virtual MeshIterator getSurfaceIterator(const GeomType type, const int gcw=0) const override
Return an MeshIterator over the given geometric objects on the surface.
ElemListPtr d_localElements[4]
std::shared_ptr< libMesh::Mesh > getlibMesh() const
Return the underlying libMesh object.
static size_t estimateMeshSize(std::shared_ptr< const MeshParameters > params)
Estimate the number of elements in the mesh.
ElemListPtr generateGhosts() const
bool operator==(const Mesh &mesh) const override
Check if two meshes are equal.
static size_t maxProcs(std::shared_ptr< const MeshParameters > params)
Return the maximum number of processors that can be used with the mesh.
std::vector< ElemListPtr > d_ghostSurfaceElements
void displaceMesh(const std::vector< double > &x) override
Displace the entire mesh.
MeshIterator getIterator(const GeomType type, const int gcw=0) const override
Return an MeshIterator over the given geometric objects.
ElemListPtr d_ghostElements[4]
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.
size_t numGhostElements(const GeomType type, const int gcw) const override
std::vector< libMesh::Node * > getNeighborNodes(const MeshElementID &) const
std::shared_ptr< std::vector< libmeshMeshElement > > ElemListPtr
ElemListPtr generateGhostElements(GeomType) const
std::vector< size_t > n_global
std::string meshClass() const override
Return a string with the mesh class name.
size_t numGlobalElements(const GeomType type) const override
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.
std::vector< std::vector< libMesh::Node * > > neighborNodes
std::vector< int > getBoundaryIDs() const override
Return the list of all boundary ID sets in the mesh.
std::vector< int > d_block_ids
std::vector< int > getBlockIDs() const override
Return the list of all boundary ID sets in the mesh.
ElemListPtr generateLocalElements(GeomType) const
libmeshElemIterator localElements() const
std::map< std::pair< int, GeomType >, ElemListPtr > d_boundarySets
std::shared_ptr< libMesh::Parallel::Communicator > d_libMeshComm
#define DISABLE_WARNINGS
Re-enable warnings.
#define ENABLE_WARNINGS
Suppress all warnings.
GeomType
Enumeration for basic mesh-based quantities.
A structure used to identify the mesh element.