Advanced Multi-Physics (AMP)
On-Line Documentation
Public Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
AMP::Discretization::structuredFaceDOFManager Class Referencefinal

A derived class to create a DOFManager for faces. More...

#include <structuredFaceDOFManager.h>

Inheritance diagram for AMP::Discretization::structuredFaceDOFManager:
Inheritance graph
[legend]

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_MPIgetComm () const
 Get the comm for the DOFManger.
 
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::MeshElementgetElement (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.
 
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.
 
virtual std::vector< size_t > getLocalSizes () const
 The local number of D.O.F on each rank.
 
std::shared_ptr< const AMP::Mesh::MeshgetMesh () 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.
 
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)
 
std::shared_ptr< AMP::Discretization::DOFManagershared_from_this ()
 
std::shared_ptr< const AMP::Discretization::DOFManagershared_from_this () const
 
 structuredFaceDOFManager ()=delete
 Empty Constructor.
 
 structuredFaceDOFManager (std::shared_ptr< AMP::Mesh::Mesh > mesh, int DOFsPerFace[3], int gcw)
 Create a new DOF manager object.
 
virtual std::shared_ptr< DOFManagersubset (const AMP::Mesh::MeshIterator &iterator, const AMP_MPI &comm)
 Subset the DOF Manager for a mesh element iterator.
 
virtual std::shared_ptr< DOFManagersubset (const AMP_MPI &comm)
 Subset the DOF Manager for a AMP_MPI communicator.
 
virtual std::shared_ptr< DOFManagersubset (const std::shared_ptr< const AMP::Mesh::Mesh > mesh, bool useMeshComm=true)
 Subset the DOF Manager for a mesh.
 
virtual void writeRestart (int64_t fid) const
 Write restart data to file.
 
virtual ~structuredFaceDOFManager ()
 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< DOFManagerParametersparams
 The DOF manager parameters.
 
std::weak_ptr< AMP::Discretization::DOFManagerweak_ptr_
 

Private Member Functions

std::vector< size_t > getRemoteDOF (const std::vector< AMP::Mesh::MeshElementID > &remote_ids) const
 
void initialize ()
 

Private Attributes

uint8_t d_DOFsPerFace [3] = { 0, 0, 0 }
 
uint8_t d_gcw = 0
 
std::vector< size_t > d_local_dofs [3]
 
std::vector< AMP::Mesh::MeshElementIDd_local_ids [3]
 
std::shared_ptr< AMP::Mesh::Meshd_mesh
 
std::vector< size_t > d_remote_dofs [3]
 
std::vector< AMP::Mesh::MeshElementIDd_remote_ids [3]
 

Detailed Description

A derived class to create a DOFManager for faces.

This derived class impliments a concrete DOFManager for creating Vectors and matricies over a mesh on the faces of structured meshes. This is a specific implementation designed for rectangular 3d meshes, and will create the unknowns on the faces. Two faces are neighbors if they share an element.

Definition at line 22 of file structuredFaceDOFManager.h.

Constructor & Destructor Documentation

◆ structuredFaceDOFManager() [1/2]

AMP::Discretization::structuredFaceDOFManager::structuredFaceDOFManager ( )
delete

Empty Constructor.

◆ structuredFaceDOFManager() [2/2]

AMP::Discretization::structuredFaceDOFManager::structuredFaceDOFManager ( std::shared_ptr< AMP::Mesh::Mesh mesh,
int  DOFsPerFace[3],
int  gcw 
)

Create a new DOF manager object.

This is the standard constructor for creating a new DOF manager object.

Parameters
meshMesh over which we want to construct the DOF map
DOFsPerFaceThe desired number of DOFs per face (x,y,z)
gcwThe desired ghost width (based on the volumes)

◆ ~structuredFaceDOFManager()

virtual AMP::Discretization::structuredFaceDOFManager::~structuredFaceDOFManager ( )
virtual

Deconstructor.

Member Function Documentation

◆ appendDOFs()

size_t AMP::Discretization::structuredFaceDOFManager::appendDOFs ( const AMP::Mesh::MeshElementID id,
size_t *  dofs,
size_t  index,
size_t  capacity 
) const
overridevirtual

Reimplemented from AMP::Discretization::DOFManager.

◆ beginDOF()

virtual size_t AMP::Discretization::DOFManager::beginDOF ( ) const
virtualinherited

The first D.O.F. on this core.

Returns
The first D.O.F. on this core

◆ className()

virtual std::string AMP::Discretization::DOFManager::className ( ) const
virtualinherited

Return a string with the mesh class name.

Reimplemented in AMP::Discretization::simpleDOFManager.

◆ endDOF()

virtual size_t AMP::Discretization::DOFManager::endDOF ( ) const
virtualinherited

One past the last D.O.F. on this core.

Returns
One past the last D.O.F. on this core

◆ getComm()

const AMP_MPI & AMP::Discretization::DOFManager::getComm ( ) const
inlineinherited

Get the comm for the DOFManger.

Definition at line 168 of file DOF_Manager.h.

References AMP::Discretization::DOFManager::d_comm.

◆ getDOFs() [1/3]

void AMP::Discretization::DOFManager::getDOFs ( const AMP::Mesh::MeshElementID id,
std::vector< size_t > &  dofs 
) const
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.

Parameters
[in]idThe element ID to collect nodal objects for. Note: the mesh element may be any type (include a vertex).
[out]dofsThe entries in the vector associated with D.O.F.s

◆ getDOFs() [2/3]

void AMP::Discretization::DOFManager::getDOFs ( const std::vector< AMP::Mesh::MeshElementID > &  ids,
std::vector< size_t > &  dofs 
) const
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.

Parameters
[in]idsThe element IDs to collect nodal objects for. Note: the mesh element may be any type (include a vertex).
[out]dofsThe entries in the vector associated with D.O.F.s on the nodes

◆ getDOFs() [3/3]

void AMP::Discretization::DOFManager::getDOFs ( int  N_ids,
const AMP::Mesh::MeshElementID ids,
std::vector< size_t > &  dofs 
) const
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.

Parameters
[in]N_idsThe number of element ids
[in]idsThe element IDs to collect nodal objects for. Note: the mesh element may be any type (include a vertex).
[out]dofsThe entries in the vector associated with D.O.F.s on the nodes

◆ getDOFsPerPoint()

int AMP::Discretization::structuredFaceDOFManager::getDOFsPerPoint ( ) const
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.

◆ getElement()

std::unique_ptr< AMP::Mesh::MeshElement > AMP::Discretization::structuredFaceDOFManager::getElement ( size_t  dof) const
overridevirtual

Get the mesh element for a DOF.

This will return the mesh element associated with a given DOF.

Parameters
[in]dofThe entry in the vector associated with DOF
Returns
The element for the given DOF.

Reimplemented from AMP::Discretization::DOFManager.

◆ getElementID()

AMP::Mesh::MeshElementID AMP::Discretization::structuredFaceDOFManager::getElementID ( size_t  dof) const
overridevirtual

Get the mesh element ID for a DOF.

This will return the mesh element id associated with a given DOF.

Parameters
[in]dofThe entry in the vector associated with DOF
Returns
The element id for the given DOF.

Reimplemented from AMP::Discretization::DOFManager.

◆ getID()

uint64_t AMP::Discretization::DOFManager::getID ( ) const
inherited

Get a unique id hash.

◆ getIterator()

AMP::Mesh::MeshIterator AMP::Discretization::structuredFaceDOFManager::getIterator ( ) const
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. Each element in the iterator will have 1 or more DOFs that are associated with that element. For eaxample, a NodalVectorDOF would have 3 DOFs stored at each node, and would return an iterator over all the nodes.

Reimplemented from AMP::Discretization::DOFManager.

◆ getLocalSizes()

virtual std::vector< size_t > AMP::Discretization::DOFManager::getLocalSizes ( ) const
virtualinherited

The local number of D.O.F on each rank.

Returns
The local number of D.O.F on each rank

Reimplemented in AMP::Discretization::multiDOFManager, and AMP::Discretization::subsetCommSelfDOFManager.

◆ getMesh()

std::shared_ptr< const AMP::Mesh::Mesh > AMP::Discretization::structuredFaceDOFManager::getMesh ( ) const
overridevirtual

Get the underlying mesh.

This will return the mesh(es) that underly the DOF manager (if they exist)

Reimplemented from AMP::Discretization::DOFManager.

◆ getRemoteDOF()

std::vector< size_t > AMP::Discretization::structuredFaceDOFManager::getRemoteDOF ( const std::vector< AMP::Mesh::MeshElementID > &  remote_ids) const
private

◆ getRemoteDOFs()

std::vector< size_t > AMP::Discretization::structuredFaceDOFManager::getRemoteDOFs ( ) const
overridevirtual

Get the remote DOFs for a vector.

Reimplemented from AMP::Discretization::DOFManager.

◆ getRowDOFs() [1/3]

std::vector< size_t > AMP::Discretization::DOFManager::getRowDOFs ( const AMP::Mesh::MeshElementID id) const

Get the row DOFs given a mesh element.

◆ getRowDOFs() [2/3]

virtual size_t AMP::Discretization::DOFManager::getRowDOFs ( const AMP::Mesh::MeshElementID id,
size_t *  dofs,
size_t  N_alloc,
bool  sort = true 
) const
virtual

Get the row DOFs given a mesh element.

Reimplemented from AMP::Discretization::DOFManager.

◆ getRowDOFs() [3/3]

size_t AMP::Discretization::structuredFaceDOFManager::getRowDOFs ( const AMP::Mesh::MeshElementID id,
size_t *  dofs,
size_t  N_alloc,
bool  sort = true 
) const
overridevirtual

Get the row DOFs given a mesh element.

Reimplemented from AMP::Discretization::DOFManager.

◆ initialize()

void AMP::Discretization::structuredFaceDOFManager::initialize ( )
private

◆ numGlobalDOF()

virtual size_t AMP::Discretization::DOFManager::numGlobalDOF ( ) const
virtualinherited

The global number of D.O.F.

Returns
The global number of D.O.F

◆ numLocalDOF()

virtual size_t AMP::Discretization::DOFManager::numLocalDOF ( ) const
virtualinherited

The local number of D.O.F.

Returns
The local number of D.O.F

◆ operator!=()

bool AMP::Discretization::DOFManager::operator!= ( const DOFManager rhs) const
inherited

Inverse of ==.

This function performs an equality check and negates it. Hence, it is not virtual

Parameters
rhsDOFManager to compare

◆ operator==()

virtual bool AMP::Discretization::DOFManager::operator== ( const DOFManager rhs) const
virtualinherited

Compares two DOFManager for equality.

This operation compares two DOF managers to see if they are equivalent

Parameters
rhsDOFManager to compare

◆ registerChildObjects()

virtual void AMP::Discretization::DOFManager::registerChildObjects ( AMP::IO::RestartManager manager) const
virtualinherited

Register any child objects.

This function will register child objects with the manager

Parameters
managerRestart manager

Reimplemented in AMP::Discretization::simpleDOFManager.

◆ replaceRemoteDOFs()

virtual void AMP::Discretization::DOFManager::replaceRemoteDOFs ( std::vector< size_t > &  newRemote)
inlinevirtualinherited

Definition at line 174 of file DOF_Manager.h.

References AMP::Discretization::DOFManager::d_remoteDOFs.

◆ shared_from_this() [1/2]

std::shared_ptr< AMP::Discretization::DOFManager > AMP::enable_shared_from_this< AMP::Discretization::DOFManager >::shared_from_this ( )
inlineinherited

Definition at line 28 of file enable_shared_from_this.h.

◆ shared_from_this() [2/2]

std::shared_ptr< const AMP::Discretization::DOFManager > AMP::enable_shared_from_this< AMP::Discretization::DOFManager >::shared_from_this ( ) const
inlineinherited

Definition at line 46 of file enable_shared_from_this.h.

◆ subset() [1/3]

virtual std::shared_ptr< DOFManager > AMP::Discretization::DOFManager::subset ( const AMP::Mesh::MeshIterator iterator,
const AMP_MPI comm 
)
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.

Parameters
[in]iteratorThe mesh iterator for the subset
[in]commThe desired comm

Reimplemented from AMP::Discretization::DOFManager.

◆ subset() [2/3]

virtual std::shared_ptr< DOFManager > AMP::Discretization::DOFManager::subset ( const AMP_MPI comm)
virtual

Subset the DOF Manager for a AMP_MPI communicator.

This will subset a DOF manager for a given communicator.

Parameters
[in]commThe communicator to use to subset

Reimplemented from AMP::Discretization::DOFManager.

◆ subset() [3/3]

virtual std::shared_ptr< DOFManager > AMP::Discretization::DOFManager::subset ( const std::shared_ptr< const AMP::Mesh::Mesh mesh,
bool  useMeshComm = true 
)
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).

Parameters
[in]meshThe mesh to use to subset
[in]useMeshCommDo 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.

◆ writeRestart()

virtual void AMP::Discretization::DOFManager::writeRestart ( int64_t  fid) const
virtualinherited

Write restart data to file.

This function will write the mesh to an HDF5 file

Parameters
fidFile identifier to write

Reimplemented in AMP::Discretization::simpleDOFManager.

Member Data Documentation

◆ d_begin

size_t AMP::Discretization::DOFManager::d_begin = 0
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().

◆ d_comm

AMP_MPI AMP::Discretization::DOFManager::d_comm
protectedinherited

The comm for this DOFManager.

Definition at line 267 of file DOF_Manager.h.

Referenced by AMP::Discretization::DOFManager::getComm().

◆ d_DOFsPerFace

uint8_t AMP::Discretization::structuredFaceDOFManager::d_DOFsPerFace[3] = { 0, 0, 0 }
private

Definition at line 114 of file structuredFaceDOFManager.h.

◆ d_end

size_t AMP::Discretization::DOFManager::d_end = 0
protectedinherited

◆ d_gcw

uint8_t AMP::Discretization::structuredFaceDOFManager::d_gcw = 0
private

Definition at line 115 of file structuredFaceDOFManager.h.

◆ d_global

size_t AMP::Discretization::DOFManager::d_global = 0
protectedinherited

Definition at line 260 of file DOF_Manager.h.

◆ d_local_dofs

std::vector<size_t> AMP::Discretization::structuredFaceDOFManager::d_local_dofs[3]
private

Definition at line 119 of file structuredFaceDOFManager.h.

◆ d_local_ids

std::vector<AMP::Mesh::MeshElementID> AMP::Discretization::structuredFaceDOFManager::d_local_ids[3]
private

Definition at line 117 of file structuredFaceDOFManager.h.

◆ d_localSize

std::vector<size_t> AMP::Discretization::DOFManager::d_localSize
mutableprotectedinherited

Definition at line 261 of file DOF_Manager.h.

◆ d_mesh

std::shared_ptr<AMP::Mesh::Mesh> AMP::Discretization::structuredFaceDOFManager::d_mesh
private

Definition at line 113 of file structuredFaceDOFManager.h.

◆ d_remote_dofs

std::vector<size_t> AMP::Discretization::structuredFaceDOFManager::d_remote_dofs[3]
private

Definition at line 120 of file structuredFaceDOFManager.h.

◆ d_remote_ids

std::vector<AMP::Mesh::MeshElementID> AMP::Discretization::structuredFaceDOFManager::d_remote_ids[3]
private

Definition at line 118 of file structuredFaceDOFManager.h.

◆ d_remoteDOFs

std::vector<size_t> AMP::Discretization::DOFManager::d_remoteDOFs
protectedinherited

The remote dofs (if cached)

Definition at line 264 of file DOF_Manager.h.

Referenced by AMP::Discretization::DOFManager::replaceRemoteDOFs().

◆ params

std::shared_ptr<DOFManagerParameters> AMP::Discretization::DOFManager::params
protectedinherited

The DOF manager parameters.

Definition at line 257 of file DOF_Manager.h.

◆ weak_ptr_

std::weak_ptr<AMP::Discretization::DOFManager > AMP::enable_shared_from_this< AMP::Discretization::DOFManager >::weak_ptr_
mutableprotectedinherited

Definition at line 69 of file enable_shared_from_this.h.


The documentation for this class was generated from the following file:



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