Advanced Multi-Physics (AMP)
On-Line Documentation
MeshVariable.h
Go to the documentation of this file.
1#ifndef included_AMP_MeshVariable_H
2#define included_AMP_MeshVariable_H
3
4#include "AMP/mesh/Mesh.h"
5#include "AMP/vectors/SubsetVariable.h"
6
7
8namespace AMP::LinearAlgebra {
9
10
16{
17public:
23 MeshVariable( const std::string &name,
24 std::shared_ptr<const AMP::Mesh::Mesh> mesh,
25 bool useMeshComm = true );
26
27 std::shared_ptr<AMP::Discretization::DOFManager>
28 getSubsetDOF( std::shared_ptr<AMP::Discretization::DOFManager> ) const override;
29
30 AMP::AMP_MPI getComm( const AMP::AMP_MPI &comm ) const override;
31
32public: // Functions inherited from Variable
33 std::string className() const override { return "MeshVariable"; }
34 uint64_t getID() const override;
35 std::shared_ptr<VectorSelector> createVectorSelector() const override;
36 void writeRestart( int64_t ) const override;
37 MeshVariable( int64_t );
38
39private:
41 bool d_useMeshComm = false;
42 std::shared_ptr<const AMP::Mesh::Mesh> d_mesh;
43};
44
45
51{
52public:
58 MeshIteratorVariable( const std::string &name,
59 const AMP::Mesh::MeshIterator &iterator,
60 const AMP_MPI &comm );
61
62 std::shared_ptr<AMP::Discretization::DOFManager>
63 getSubsetDOF( std::shared_ptr<AMP::Discretization::DOFManager> ) const override;
64
65 AMP::AMP_MPI getComm( const AMP::AMP_MPI &comm ) const override;
66
67public: // Functions inherited from Variable
68 std::string className() const override { return "MeshIteratorVariable"; }
69 uint64_t getID() const override;
70 std::shared_ptr<VectorSelector> createVectorSelector() const override;
71 void writeRestart( int64_t ) const override;
73
74private:
78};
79
80} // namespace AMP::LinearAlgebra
81
82#endif
Provides C++ wrapper around MPI routines.
Definition AMP_MPI.h:63
const AMP::Mesh::MeshIterator d_iterator
std::shared_ptr< AMP::Discretization::DOFManager > getSubsetDOF(std::shared_ptr< AMP::Discretization::DOFManager >) const override
Return a DOFManager that describes the subset.
AMP::AMP_MPI getComm(const AMP::AMP_MPI &comm) const override
Return the comm for the subset.
void writeRestart(int64_t) const override
Write restart data to file.
MeshIteratorVariable(const std::string &name, const AMP::Mesh::MeshIterator &iterator, const AMP_MPI &comm)
Constructor.
std::string className() const override
A function that returns the name of a variable.
std::shared_ptr< VectorSelector > createVectorSelector() const override
Create a VectorSelector.
uint64_t getID() const override
Get a unique id hash for the vector.
An AMP Variable that describes how to subset a DOF for a mesh.
std::shared_ptr< const AMP::Mesh::Mesh > d_mesh
void writeRestart(int64_t) const override
Write restart data to file.
uint64_t getID() const override
Get a unique id hash for the vector.
AMP::AMP_MPI getComm(const AMP::AMP_MPI &comm) const override
Return the comm for the subset.
std::string className() const override
A function that returns the name of a variable.
std::shared_ptr< VectorSelector > createVectorSelector() const override
Create a VectorSelector.
MeshVariable(const std::string &name, std::shared_ptr< const AMP::Mesh::Mesh > mesh, bool useMeshComm=true)
Constructor.
std::shared_ptr< AMP::Discretization::DOFManager > getSubsetDOF(std::shared_ptr< AMP::Discretization::DOFManager >) const override
Return a DOFManager that describes the subset.
A variable used to create a SubsetVector.
A class used to iterate over elements in a Mesh.



Advanced Multi-Physics (AMP)
Oak Ridge National Laboratory
Idaho National Laboratory
Los Alamos National Laboratory
This page automatically produced from the
source code by doxygen
Last updated: Tue Mar 10 2026 13:06:41.
Comments on this page