A derived class to combine multiple DOFManagers. More...
#include <MultiDOF_Manager.h>

Public Member Functions | |
| size_t | appendDOFs (const AMP::Mesh::MeshElementID &id, size_t *dofs, size_t index, size_t capacity) const override |
| virtual size_t | beginDOF () const |
| The first D.O.F. on this core. | |
| virtual std::string | className () const |
| Return a string with the mesh class name. | |
| virtual size_t | endDOF () const |
| One past the last D.O.F. on this core. | |
| const AMP_MPI & | getComm () const |
| Get the comm for the DOFManger. | |
| const auto & | getDOFManager (const size_t i) const |
| get the i-th dof manager | |
| const auto & | getDOFManagers () const |
| Get the DOFManagers that compose the multiDOFManager. | |
| void | getDOFs (const AMP::Mesh::MeshElementID &id, std::vector< size_t > &dofs) const |
| Get the entry indices of DOFs given a mesh element ID. | |
| void | getDOFs (const std::vector< AMP::Mesh::MeshElementID > &ids, std::vector< size_t > &dofs) const |
| Get the entry indices of DOFs given a mesh element ID. | |
| void | getDOFs (int N_ids, const AMP::Mesh::MeshElementID *ids, std::vector< size_t > &dofs) const |
| Get the entry indices of DOFs given a mesh element ID. | |
| int | getDOFsPerPoint () const override |
| Get the number of DOFs per element. | |
| std::unique_ptr< AMP::Mesh::MeshElement > | getElement (size_t dof) const override |
| Get the mesh element for a DOF. | |
| AMP::Mesh::MeshElementID | getElementID (size_t dof) const override |
| Get the mesh element ID for a DOF. | |
| std::vector< size_t > | getGlobalDOF (const int DOFManager, const std::vector< size_t > &localDOF) const |
| Function to convert DOFs from a sub-manager DOF to the global DOF. | |
| uint64_t | getID () const |
| Get a unique id hash. | |
| AMP::Mesh::MeshIterator | getIterator () const override |
| Get an entry over the mesh elements associated with the DOFs. | |
| std::vector< size_t > | getLocalSizes () const override |
| Get the local sizes on each rank. | |
| const multiDOFHelper & | getMap () const |
| std::shared_ptr< const AMP::Mesh::Mesh > | getMesh () const override |
| Get the underlying mesh. | |
| std::vector< size_t > | getRemoteDOFs () const override |
| Get the remote DOFs for a vector. | |
| std::vector< size_t > | getRowDOFs (const AMP::Mesh::MeshElementID &id) const |
| Get the row DOFs given a mesh element. | |
| virtual size_t | getRowDOFs (const AMP::Mesh::MeshElementID &id, size_t *dofs, size_t N_alloc, bool sort=true) const |
| Get the row DOFs given a mesh element. | |
| 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. | |
| std::vector< size_t > | getSubDOF (const int DOFManager, const std::vector< size_t > &globalDOF) const |
| Function to convert DOFs from the global DOF to a sub-manager DOF. | |
| multiDOFManager (const AMP_MPI &comm, std::vector< std::shared_ptr< DOFManager > > managers, std::shared_ptr< const AMP::Mesh::Mesh > mesh={}) | |
| Create a new DOF manager object. | |
| multiDOFManager (std::shared_ptr< DOFManager > manager) | |
| Create a new DOF manager object. | |
| virtual size_t | numGlobalDOF () const |
| The global number of D.O.F. | |
| virtual size_t | numLocalDOF () const |
| The local number of D.O.F. | |
| bool | operator!= (const DOFManager &rhs) const |
| Inverse of ==. | |
| virtual bool | operator== (const DOFManager &rhs) const |
| Compares two DOFManager for equality. | |
| virtual void | registerChildObjects (AMP::IO::RestartManager *manager) const |
| Register any child objects. | |
| virtual void | replaceRemoteDOFs (std::vector< size_t > &newRemote) |
| void | reset (std::vector< std::shared_ptr< DOFManager > > managers, std::shared_ptr< const AMP::Mesh::Mesh > mesh={}) |
| std::shared_ptr< AMP::Discretization::DOFManager > | shared_from_this () |
| std::shared_ptr< const AMP::Discretization::DOFManager > | shared_from_this () const |
| virtual std::shared_ptr< DOFManager > | subset (const AMP::Mesh::MeshIterator &iterator, const AMP_MPI &comm) |
| Subset the DOF Manager for a mesh element iterator. | |
| std::shared_ptr< DOFManager > | subset (const AMP::Mesh::MeshIterator &iterator, const AMP_MPI &comm) override |
| Subset the DOF Manager for a mesh element iterator. | |
| virtual std::shared_ptr< DOFManager > | subset (const AMP_MPI &comm) |
| Subset the DOF Manager for a AMP_MPI communicator. | |
| std::shared_ptr< DOFManager > | subset (const AMP_MPI &comm) override |
| Subset the DOF Manager for a AMP_MPI communicator. | |
| virtual std::shared_ptr< DOFManager > | subset (const std::shared_ptr< const AMP::Mesh::Mesh > mesh, bool useMeshComm=true) |
| Subset the DOF Manager for a mesh. | |
| std::shared_ptr< DOFManager > | subset (const std::shared_ptr< const AMP::Mesh::Mesh > mesh, bool useMeshComm=true) override |
| Subset the DOF Manager for a mesh. | |
| virtual void | writeRestart (int64_t fid) const |
| Write restart data to file. | |
| virtual | ~multiDOFManager () override |
| Deconstructor. | |
Protected Attributes | |
| size_t | d_begin = 0 |
| The begining DOF, ending DOF and number of local DOFs for this processor. | |
| AMP_MPI | d_comm |
| The comm for this DOFManager. | |
| size_t | d_end = 0 |
| size_t | d_global = 0 |
| std::vector< size_t > | d_localSize |
| std::vector< size_t > | d_remoteDOFs |
| The remote dofs (if cached) | |
| std::shared_ptr< DOFManagerParameters > | params |
| The DOF manager parameters. | |
| std::weak_ptr< AMP::Discretization::DOFManager > | weak_ptr_ |
Private Member Functions | |
| std::pair< size_t, int > | globalToSub (size_t dof) const |
| multiDOFManager ()=delete | |
| size_t | subToGlobal (int manager, size_t dof) const |
Private Attributes | |
| multiDOFHelper | d_dofMap |
| std::vector< size_t > | d_globalSize |
| std::vector< std::shared_ptr< DOFManager > > | d_managers |
| std::shared_ptr< const AMP::Mesh::Mesh > | d_mesh |
A derived class to combine multiple DOFManagers.
This derived class impliments a concrete DOF_Manager for creating DOFs that consist of multiple DOFManagers. This is useful to combine multiple DOFs over meshes on a multiVector, for combining multiple discretizations, and for combining vectors. A multivector will have a pointer to a multiDOFManager instead of a standard DOFManager. It is also possible that a standard vector can use a multiDOFManager.
Definition at line 23 of file MultiDOF_Manager.h.
| AMP::Discretization::multiDOFManager::multiDOFManager | ( | const AMP_MPI & | comm, |
| std::vector< std::shared_ptr< DOFManager > > | managers, | ||
| std::shared_ptr< const AMP::Mesh::Mesh > | mesh = {} |
||
| ) |
Create a new DOF manager object.
This is the standard constructor for creating a new multiDOFManager object.
| comm | Comm over which the DOFManager will exist |
| managers | List of the DOFManagers on the current processor |
| mesh | Optional mesh over which dof managers are defined (usually a multimesh) |
| AMP::Discretization::multiDOFManager::multiDOFManager | ( | std::shared_ptr< DOFManager > | manager | ) |
Create a new DOF manager object.
Create a multiDOFManager that is a view of a single DOFManager
| manager | Original DOF Manager |
|
overridevirtual |
Deconstructor.
|
privatedelete |
|
overridevirtual |
Reimplemented from AMP::Discretization::DOFManager.
|
virtualinherited |
The first D.O.F. on this core.
|
virtualinherited |
Return a string with the mesh class name.
Reimplemented in AMP::Discretization::simpleDOFManager.
|
virtualinherited |
One past the last D.O.F. on this core.
|
inlineinherited |
Get the comm for the DOFManger.
Definition at line 168 of file DOF_Manager.h.
References AMP::Discretization::DOFManager::d_comm.
|
inline |
|
inline |
Get the DOFManagers that compose the multiDOFManager.
Definition at line 127 of file MultiDOF_Manager.h.
References d_managers.
|
inherited |
Get the entry indices of DOFs given a mesh element ID.
This will return a vector of pointers into a Vector that are associated with which.
| [in] | id | The element ID to collect nodal objects for. Note: the mesh element may be any type (include a vertex). |
| [out] | dofs | The entries in the vector associated with D.O.F.s |
|
inherited |
Get the entry indices of DOFs given a mesh element ID.
This will return a vector of pointers into a Vector that are associated with which.
| [in] | ids | The element IDs to collect nodal objects for. Note: the mesh element may be any type (include a vertex). |
| [out] | dofs | The entries in the vector associated with D.O.F.s on the nodes |
|
inherited |
Get the entry indices of DOFs given a mesh element ID.
This will return a vector of pointers into a Vector that are associated with which.
| [in] | N_ids | The number of element ids |
| [in] | ids | The element IDs to collect nodal objects for. Note: the mesh element may be any type (include a vertex). |
| [out] | dofs | The entries in the vector associated with D.O.F.s on the nodes |
|
overridevirtual |
Get the number of DOFs per element.
This will return the number of DOFs per mesh element. If some DOFs are not associated with a mesh element or if all elements do not contain the same number of DOFs than this routine will return -1.
Reimplemented from AMP::Discretization::DOFManager.
|
overridevirtual |
Get the mesh element for a DOF.
This will return the mesh element associated with a given DOF.
| [in] | dof | The entry in the vector associated with DOF |
Reimplemented from AMP::Discretization::DOFManager.
|
overridevirtual |
Get the mesh element ID for a DOF.
This will return the mesh element id associated with a given DOF.
| [in] | dof | The entry in the vector associated with DOF |
Reimplemented from AMP::Discretization::DOFManager.
| std::vector< size_t > AMP::Discretization::multiDOFManager::getGlobalDOF | ( | const int | DOFManager, |
| const std::vector< size_t > & | localDOF | ||
| ) | const |
Function to convert DOFs from a sub-manager DOF to the global DOF.
This function returns the global DOF given the local DOF. Note that subDOFManager is specified by the index in the std::vector of DOFManagers (see getDOFManagers). This is needed since the same DOFManager may be repeated many times so searching is not an option. For example, consider a multiVector with multiple vectors of the same type.
| [in] | DOFManager | The index to the desired DOFManager (see getDOFManagers) |
| [in] | localDOF | The local DOF to convert to global DOF |
|
inherited |
Get a unique id hash.
|
overridevirtual |
Get an entry over the mesh elements associated with the DOFs.
This will return an iterator over the mesh elements associated with the DOFs. Note: if any sub-DOFManagers are the same, then this will iterate over repeated elements.
Reimplemented from AMP::Discretization::DOFManager.
|
overridevirtual |
Get the local sizes on each rank.
Reimplemented from AMP::Discretization::DOFManager.
|
inline |
Definition at line 183 of file MultiDOF_Manager.h.
References d_dofMap.
|
overridevirtual |
Get the underlying mesh.
This will return the mesh(es) that underly the DOF manager (if they exist)
Reimplemented from AMP::Discretization::DOFManager.
|
overridevirtual |
Get the remote DOFs for a vector.
Reimplemented from AMP::Discretization::DOFManager.
| std::vector< size_t > AMP::Discretization::DOFManager::getRowDOFs | ( | const AMP::Mesh::MeshElementID & | id | ) | const |
Get the row DOFs given a mesh element.
|
virtual |
Get the row DOFs given a mesh element.
Reimplemented from AMP::Discretization::DOFManager.
|
overridevirtual |
Get the row DOFs given a mesh element.
Reimplemented from AMP::Discretization::DOFManager.
| std::vector< size_t > AMP::Discretization::multiDOFManager::getSubDOF | ( | const int | DOFManager, |
| const std::vector< size_t > & | globalDOF | ||
| ) | const |
Function to convert DOFs from the global DOF to a sub-manager DOF.
Function to convert DOFs from the global DOF to a sub-manager DOF If a given global DOF is not in the given sub-manager, then -1 will be returned for its value.
This function returns the DOF on a a sub-manager given the global DOF. If a given global DOF is not in the given sub-manager, then -1 will be returned for its value. Note that subDOFManager is specified by the index in the std::vector of DOFManagers (see getDOFManagers). This is needed since the same DOFManager may be repeated many times so searching is not an option. For example, consider a multiVector with multiple vectors of the same type.
| [in] | DOFManager | The index to the desired DOFManager (see getDOFManagers) |
| [in] | globalDOF | The global DOF to convert to a DOF on the sub DOFManager |
|
inlineprivate |
Definition at line 193 of file MultiDOF_Manager.h.
References d_dofMap, and AMP::Discretization::multiDOFHelper::globalToSub().
|
virtualinherited |
The global number of D.O.F.
|
virtualinherited |
The local number of D.O.F.
|
inherited |
Inverse of ==.
This function performs an equality check and negates it. Hence, it is not virtual
| rhs | DOFManager to compare |
|
virtualinherited |
Compares two DOFManager for equality.
This operation compares two DOF managers to see if they are equivalent
| rhs | DOFManager to compare |
|
virtualinherited |
Register any child objects.
This function will register child objects with the manager
| manager | Restart manager |
Reimplemented in AMP::Discretization::simpleDOFManager.
|
inlinevirtualinherited |
Definition at line 174 of file DOF_Manager.h.
References AMP::Discretization::DOFManager::d_remoteDOFs.
| void AMP::Discretization::multiDOFManager::reset | ( | std::vector< std::shared_ptr< DOFManager > > | managers, |
| std::shared_ptr< const AMP::Mesh::Mesh > | mesh = {} |
||
| ) |
reset a dof manager based on component dof managers
| managers | List of the DOFManagers on the current processor |
| mesh | Optional mesh over which dof managers are defined (usually a multimesh) |
|
inlineinherited |
Definition at line 28 of file enable_shared_from_this.h.
|
inlineinherited |
Definition at line 46 of file enable_shared_from_this.h.
|
virtual |
Subset the DOF Manager for a mesh element iterator.
This will subset a DOF manager for a given mesh element iterator. The resulting DOFManager will exist on the privided comm.
| [in] | iterator | The mesh iterator for the subset |
| [in] | comm | The desired comm |
Reimplemented from AMP::Discretization::DOFManager.
|
overridevirtual |
Subset the DOF Manager for a mesh element iterator.
This will subset a DOF manager for a given mesh element iterator. The resulting DOFManager will exist on the privided comm.
| [in] | iterator | The mesh iterator for the subset |
| [in] | comm | The desired comm |
Reimplemented from AMP::Discretization::DOFManager.
|
virtual |
Subset the DOF Manager for a AMP_MPI communicator.
This will subset a DOF manager for a given communicator.
| [in] | comm | The communicator to use to subset |
Reimplemented from AMP::Discretization::DOFManager.
|
overridevirtual |
Subset the DOF Manager for a AMP_MPI communicator.
This will subset a DOF manager for a given communicator.
| [in] | comm | The communicator to use to subset |
Reimplemented from AMP::Discretization::DOFManager.
|
virtual |
Subset the DOF Manager for a mesh.
This will subset a DOF manager for a particular mesh. The resulting DOFManager can exist on either the comm of the parent DOF manager, or the comm of the mesh (default).
| [in] | mesh | The mesh to use to subset |
| [in] | useMeshComm | Do we want to use the mesh comm for the new DOFManager. Note: if this is true, any processors that do not contain the mesh will return NULL. |
Reimplemented from AMP::Discretization::DOFManager.
|
overridevirtual |
Subset the DOF Manager for a mesh.
This will subset a DOF manager for a particular mesh. The resulting DOFManager can exist on either the comm of the parent DOF manager, or the comm of the mesh (default).
| [in] | mesh | The mesh to use to subset |
| [in] | useMeshComm | Do we want to use the mesh comm for the new DOFManager. Note: if this is true, any processors that do not contain the mesh will return NULL. |
Reimplemented from AMP::Discretization::DOFManager.
|
inlineprivate |
Definition at line 187 of file MultiDOF_Manager.h.
References d_dofMap, and AMP::Discretization::multiDOFHelper::subToGlobal().
|
virtualinherited |
Write restart data to file.
This function will write the mesh to an HDF5 file
| fid | File identifier to write |
Reimplemented in AMP::Discretization::simpleDOFManager.
|
protectedinherited |
The begining DOF, ending DOF and number of local DOFs for this processor.
Definition at line 260 of file DOF_Manager.h.
Referenced by AMP::Discretization::subsetCommSelfDOFManager::getLocalSizes().
|
protectedinherited |
The comm for this DOFManager.
Definition at line 267 of file DOF_Manager.h.
Referenced by AMP::Discretization::DOFManager::getComm().
|
private |
Definition at line 205 of file MultiDOF_Manager.h.
Referenced by getMap(), globalToSub(), and subToGlobal().
|
protectedinherited |
Definition at line 260 of file DOF_Manager.h.
Referenced by AMP::Discretization::subsetCommSelfDOFManager::getLocalSizes().
|
protectedinherited |
Definition at line 260 of file DOF_Manager.h.
|
private |
Definition at line 204 of file MultiDOF_Manager.h.
|
mutableprotectedinherited |
Definition at line 261 of file DOF_Manager.h.
|
private |
Definition at line 203 of file MultiDOF_Manager.h.
Referenced by getDOFManager(), and getDOFManagers().
|
private |
Definition at line 202 of file MultiDOF_Manager.h.
|
protectedinherited |
The remote dofs (if cached)
Definition at line 264 of file DOF_Manager.h.
Referenced by AMP::Discretization::DOFManager::replaceRemoteDOFs().
|
protectedinherited |
The DOF manager parameters.
Definition at line 257 of file DOF_Manager.h.
|
mutableprotectedinherited |
Definition at line 69 of file enable_shared_from_this.h.
|
Advanced Multi-Physics (AMP) Oak Ridge National Laboratory Idaho National Laboratory Los Alamos National Laboratory |
This page automatically produced from the source code by Last updated: Tue Mar 10 2026 13:06:42. Comments on this page |