Advanced Multi-Physics (AMP)
On-Line Documentation
subsetDOFManager.h
Go to the documentation of this file.
1#ifndef included_AMP_subsetDOF_Manager
2#define included_AMP_subsetDOF_Manager
3
4#include "AMP/discretization/DOF_Manager.h"
5#include "AMP/mesh/MeshElement.h"
6#include <memory>
7
8
9namespace AMP::Discretization {
10
11
19{
20public:
22
30 static std::shared_ptr<DOFManager> create( std::shared_ptr<const DOFManager> parentDOFManager,
31 const std::vector<size_t> &dofs,
32 const AMP::Mesh::MeshIterator &iterator,
33 const AMP_MPI &comm );
34
35
41 AMP::Mesh::MeshElementID getElementID( size_t dof ) const override;
42
43
49 std::unique_ptr<AMP::Mesh::MeshElement> getElement( size_t dof ) const override;
50
51
54
55
59 std::shared_ptr<const AMP::Mesh::Mesh> getMesh() const override;
60
61
67
68
70 std::vector<size_t> getRemoteDOFs() const override;
71
72
74 virtual std::vector<size_t> getLocalParentDOFs() const;
75
76
78 virtual std::vector<size_t> getParentDOF( const std::vector<size_t> & ) const;
79
80
86 virtual std::vector<size_t> getSubsetDOF( const std::vector<size_t> & ) const;
87
88
90 virtual std::shared_ptr<const DOFManager> getDOFManager() const;
91
92
98 int getDOFsPerPoint() const override;
99
100
101public: // Advanced interfaces
104 size_t *dofs,
105 size_t N_alloc,
106 bool sort = true ) const override;
108
109 // Append DOFs to the list
111 size_t *dofs,
112 size_t index,
113 size_t capacity ) const override;
114
115
116protected:
117 // The constructor is protected
119
120private:
122 std::shared_ptr<const DOFManager> d_parentDOFManager;
123
126
128 std::vector<size_t> d_localDOFs;
129
131 std::vector<size_t> d_remoteParentDOFs;
132 std::vector<size_t> d_remoteSubsetDOFs;
133
136};
137} // namespace AMP::Discretization
138
139#endif
Provides C++ wrapper around MPI routines.
Definition AMP_MPI.h:63
std::vector< size_t > getRowDOFs(const AMP::Mesh::MeshElementID &id) const
Get the row DOFs given a mesh element.
virtual std::shared_ptr< DOFManager > subset(const AMP_MPI &comm)
Subset the DOF Manager for a AMP_MPI communicator.
A derived class to subset a DOFManagers.
std::vector< size_t > d_localDOFs
The list of local DOFs (sorted, using the parent DOF numbering)
int getDOFsPerPoint() const override
Get the number of DOFs per element.
std::vector< size_t > d_remoteParentDOFs
The list of remote DOFs.
AMP::Mesh::MeshIterator d_iterator
The iterator for the subset.
virtual std::vector< size_t > getParentDOF(const std::vector< size_t > &) const
Function to convert DOFs from a subset DOFManager DOF to the parent DOF.
size_t getRowDOFs(const AMP::Mesh::MeshElementID &id, size_t *dofs, size_t N_alloc, bool sort=true) const override
Get the row DOFs given a mesh element.
size_t d_parentBegin
The parent begin, end, and global DOFs.
virtual std::vector< size_t > getSubsetDOF(const std::vector< size_t > &) const
virtual std::vector< size_t > getLocalParentDOFs() const
Function to return the local DOFs on the parent DOF manager.
static std::shared_ptr< DOFManager > create(std::shared_ptr< const DOFManager > parentDOFManager, const std::vector< size_t > &dofs, const AMP::Mesh::MeshIterator &iterator, const AMP_MPI &comm)
Default constructor.
std::shared_ptr< const DOFManager > d_parentDOFManager
The parent DOF Manager.
size_t appendDOFs(const AMP::Mesh::MeshElementID &id, size_t *dofs, size_t index, size_t capacity) const override
AMP::Mesh::MeshElementID getElementID(size_t dof) const override
Get the mesh element ID for a DOF.
std::shared_ptr< const AMP::Mesh::Mesh > getMesh() const override
Get the underlying mesh.
virtual std::shared_ptr< const DOFManager > getDOFManager() const
Get the parent DOFManager.
AMP::Mesh::MeshIterator getIterator() const override
Get an entry over the mesh elements associated with the DOFs.
std::unique_ptr< AMP::Mesh::MeshElement > getElement(size_t dof) const override
Get the mesh element for a DOF.
std::vector< size_t > getRemoteDOFs() const override
Get the remote DOFs for a vector.
virtual ~subsetDOFManager()
Deconstructor.
A class used to iterate over elements in a Mesh.
A structure used to identify the mesh element.
Definition MeshID.h:156



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:40.
Comments on this page