domainDecomposition Class Reference

Automatic domain decomposition class for finite-volume meshes. More...

Public Member Functions

 TypeName ("domainDecomposition")
 Runtime type information. More...
 
 domainDecomposition (const processorRunTimes &procRunTimes, const fileName &meshPath, const word &regionName, const multiDomainDecomposition &regionMeshes=NullObjectRef< multiDomainDecomposition >())
 Construct from processor run times and region name. More...
 
virtual ~domainDecomposition ()
 Destructor. More...
 
const processorRunTimesprocRunTimes () const
 Access the run times. More...
 
const fileNamemeshPath () const
 Access the mesh path. More...
 
const wordregionName () const
 Access the region name. More...
 
bool haveComplete () const
 Do we have the global mesh? More...
 
bool haveProcs () const
 Do we have the global mesh? More...
 
const fvMeshcompleteMesh () const
 Access the global mesh. More...
 
const PtrList< fvMesh > & procMeshes () const
 Access the processor meshes. More...
 
label nProcs () const
 Return the number of processors in the decomposition. More...
 
void readComplete ()
 Read the complete mesh only. More...
 
bool readDecompose (const bool doPost)
 Read in the complete mesh. Read the processor meshes if they are. More...
 
void postReadDecompose ()
 Post-read-construction steps for the meshes after read-decompose. More...
 
void unconformReadDecompose ()
 Synchronise non-conformal structure after read-decompose. More...
 
void writeReadDecompose (const bool decomposed, const bool doSets)
 Write following read-decompose. More...
 
bool readReconstruct (const bool doPost)
 Read in the processor meshes. Read the complete mesh if it is. More...
 
void postReadReconstruct ()
 Post-read-construction steps for the meshes after read-reconstruct. More...
 
void unconformReadReconstruct ()
 Synchronise non-conformal structure after read-reconstruct. More...
 
void writeReadReconstruct (const bool reconstructed, const bool doSets)
 Write following read-reconstruct. More...
 
fvMesh::readUpdateState readUpdateComplete ()
 Read-update the complete mesh only. More...
 
fvMesh::readUpdateState readUpdateDecompose (const bool doPost)
 Read-update for decomposition. More...
 
void postReadUpdateDecompose (const fvMesh::readUpdateState stat)
 Complete read-update-decompose. More...
 
void unconformReadUpdateDecompose (const fvMesh::readUpdateState stat)
 Synchronise non-conformal structure after read-update-decompose. More...
 
fvMesh::readUpdateState readUpdateReconstruct (const bool doPost)
 Read-update for reconstruction. More...
 
void postReadUpdateReconstruct (const fvMesh::readUpdateState stat)
 Complete read-update-reconstruct. More...
 
void unconformReadUpdateReconstruct (const fvMesh::readUpdateState stat)
 Synchronise non-conformal structure after read-update-reconstruct. More...
 
const labelListcellProc () const
 Return the distribution as an FV field for writing. More...
 
const labelListListprocPointAddressing () const
 Access the labels of points for each processor. More...
 
const labelListListprocFaceAddressing () const
 Access the labels of faces for each processor (see notes above) More...
 
const labelListListprocCellAddressing () const
 Access the labels of cells for each processor. More...
 
const PtrList< surfaceLabelField::Boundary > & procFaceAddressingBf () const
 Access the labels of faces for each processor (see notes above) More...
 
void writeComplete (const bool doSets) const
 Write the decomposed meshes and associated data. More...
 
void writeProcs (const bool doSets) const
 Write the decomposed meshes and associated data. More...
 
template<class SetType >
PtrList< SetType > decomposeSet (const word &name) const
 Decompose a set. More...
 
template<class SetType >
autoPtr< SetType > reconstructSet (const word &name) const
 Reconstruct a set. More...
 
template<class SetType >
Foam::PtrList< SetType > decomposeSet (const word &name) const
 
template<class SetType >
Foam::autoPtr< SetType > reconstructSet (const word &name) const
 

Detailed Description

Automatic domain decomposition class for finite-volume meshes.

Source files

Definition at line 61 of file domainDecomposition.H.

Constructor & Destructor Documentation

◆ domainDecomposition()

domainDecomposition ( const processorRunTimes procRunTimes,
const fileName meshPath,
const word regionName,
const multiDomainDecomposition regionMeshes = NullObjectRef<multiDomainDecomposition>() 
)

Construct from processor run times and region name.

Definition at line 459 of file domainDecomposition.C.

◆ ~domainDecomposition()

~domainDecomposition ( )
virtual

Destructor.

Definition at line 483 of file domainDecomposition.C.

Member Function Documentation

◆ TypeName()

TypeName ( "domainDecomposition"  )

Runtime type information.

◆ procRunTimes()

const processorRunTimes& procRunTimes ( ) const
inline

Access the run times.

Definition at line 391 of file domainDecomposition.H.

◆ meshPath()

const fileName& meshPath ( ) const
inline

Access the mesh path.

Definition at line 397 of file domainDecomposition.H.

◆ regionName()

const word& regionName ( ) const
inline

Access the region name.

Definition at line 403 of file domainDecomposition.H.

Referenced by Foam::regionName< domainDecomposition >().

Here is the caller graph for this function:

◆ haveComplete()

bool haveComplete ( ) const
inline

Do we have the global mesh?

Definition at line 409 of file domainDecomposition.H.

References autoPtr< T >::valid().

Here is the call graph for this function:

◆ haveProcs()

bool haveProcs ( ) const
inline

Do we have the global mesh?

Definition at line 415 of file domainDecomposition.H.

References PtrList< T >::set(), and UPtrList< T >::size().

Here is the call graph for this function:

◆ completeMesh()

const fvMesh& completeMesh ( ) const
inline

Access the global mesh.

Definition at line 421 of file domainDecomposition.H.

Referenced by Foam::checkCompleteMeshOrdering().

Here is the caller graph for this function:

◆ procMeshes()

const PtrList<fvMesh>& procMeshes ( ) const
inline

Access the processor meshes.

Definition at line 428 of file domainDecomposition.H.

◆ nProcs()

label nProcs ( ) const
inline

Return the number of processors in the decomposition.

Definition at line 435 of file domainDecomposition.H.

References processorRunTimes::nProcs().

Here is the call graph for this function:

◆ readComplete()

void readComplete ( )

Read the complete mesh only.

Definition at line 489 of file domainDecomposition.C.

◆ readDecompose()

bool readDecompose ( const bool  doPost)

Read in the complete mesh. Read the processor meshes if they are.

available and up to date relative to the complete mesh, or decompose if not. Return whether or not decomposition happened.

Definition at line 495 of file domainDecomposition.C.

References Foam::exit(), Foam::FatalError, FatalErrorInFunction, IOobject::headerOk(), typeIOobject< Type >::headerOk(), polyMesh::meshSubDir, Foam::nl, and IOobject::relativePath().

Here is the call graph for this function:

◆ postReadDecompose()

void postReadDecompose ( )

Post-read-construction steps for the meshes after read-decompose.

Definition at line 580 of file domainDecomposition.C.

◆ unconformReadDecompose()

void unconformReadDecompose ( )

Synchronise non-conformal structure after read-decompose.

Definition at line 586 of file domainDecomposition.C.

References forAll.

◆ writeReadDecompose()

void writeReadDecompose ( const bool  decomposed,
const bool  doSets 
)

Write following read-decompose.

Definition at line 602 of file domainDecomposition.C.

◆ readReconstruct()

bool readReconstruct ( const bool  doPost)

Read in the processor meshes. Read the complete mesh if it is.

available and up to date relative to the processor meshes, or reconstruct if not. Return whether or not reconstruction happened.

Definition at line 617 of file domainDecomposition.C.

References Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, IOobject::headerOk(), typeIOobject< Type >::headerOk(), polyMesh::meshSubDir, IOobject::name(), Foam::nl, Foam::fvc::reconstruct(), IOobject::relativePath(), and WarningInFunction.

Here is the call graph for this function:

◆ postReadReconstruct()

void postReadReconstruct ( )

Post-read-construction steps for the meshes after read-reconstruct.

Definition at line 728 of file domainDecomposition.C.

References forAll.

◆ unconformReadReconstruct()

void unconformReadReconstruct ( )

Synchronise non-conformal structure after read-reconstruct.

Definition at line 737 of file domainDecomposition.C.

◆ writeReadReconstruct()

void writeReadReconstruct ( const bool  reconstructed,
const bool  doSets 
)

Write following read-reconstruct.

Definition at line 750 of file domainDecomposition.C.

◆ readUpdateComplete()

Foam::fvMesh::readUpdateState readUpdateComplete ( )

Read-update the complete mesh only.

Definition at line 765 of file domainDecomposition.C.

References fvMesh::nonGeometric.

◆ readUpdateDecompose()

Foam::fvMesh::readUpdateState readUpdateDecompose ( const bool  doPost)

Read-update for decomposition.

Definition at line 773 of file domainDecomposition.C.

References Foam::exit(), Foam::FatalError, FatalErrorInFunction, and fvMesh::TOPO_CHANGE.

Here is the call graph for this function:

◆ postReadUpdateDecompose()

void postReadUpdateDecompose ( const fvMesh::readUpdateState  stat)

Complete read-update-decompose.

Definition at line 849 of file domainDecomposition.C.

References fvMesh::UNCHANGED.

◆ unconformReadUpdateDecompose()

void unconformReadUpdateDecompose ( const fvMesh::readUpdateState  stat)

Synchronise non-conformal structure after read-update-decompose.

Definition at line 863 of file domainDecomposition.C.

References forAll, and fvMesh::UNCHANGED.

◆ readUpdateReconstruct()

Foam::fvMesh::readUpdateState readUpdateReconstruct ( const bool  doPost)

Read-update for reconstruction.

Definition at line 880 of file domainDecomposition.C.

References Foam::exit(), Foam::FatalError, FatalErrorInFunction, Foam::fvc::reconstruct(), and fvMesh::TOPO_CHANGE.

Here is the call graph for this function:

◆ postReadUpdateReconstruct()

void postReadUpdateReconstruct ( const fvMesh::readUpdateState  stat)

Complete read-update-reconstruct.

Definition at line 957 of file domainDecomposition.C.

References forAll, and fvMesh::UNCHANGED.

◆ unconformReadUpdateReconstruct()

void unconformReadUpdateReconstruct ( const fvMesh::readUpdateState  stat)

Synchronise non-conformal structure after read-update-reconstruct.

Definition at line 974 of file domainDecomposition.C.

References fvMesh::UNCHANGED.

◆ cellProc()

const labelList& cellProc ( ) const
inline

Return the distribution as an FV field for writing.

Definition at line 493 of file domainDecomposition.H.

◆ procPointAddressing()

const labelListList& procPointAddressing ( ) const
inline

Access the labels of points for each processor.

Definition at line 499 of file domainDecomposition.H.

◆ procFaceAddressing()

const labelListList& procFaceAddressing ( ) const
inline

Access the labels of faces for each processor (see notes above)

Definition at line 506 of file domainDecomposition.H.

◆ procCellAddressing()

const labelListList& procCellAddressing ( ) const
inline

Access the labels of cells for each processor.

Definition at line 513 of file domainDecomposition.H.

◆ procFaceAddressingBf()

const Foam::PtrList< Foam::surfaceLabelField::Boundary > & procFaceAddressingBf ( ) const

Access the labels of faces for each processor (see notes above)

Definition at line 989 of file domainDecomposition.C.

References fvMesh::boundary(), forAll, Foam::mag(), GeometricField< Type, GeoMesh, PrimitiveField >::null(), fvPatch::patchSlice(), and HashTable< T, Key, Hash >::set().

Here is the call graph for this function:

◆ writeComplete()

void writeComplete ( const bool  doSets) const

◆ writeProcs()

void writeProcs ( const bool  doSets) const

◆ decomposeSet() [1/2]

PtrList<SetType> decomposeSet ( const word name) const

Decompose a set.

◆ reconstructSet() [1/2]

autoPtr<SetType> reconstructSet ( const word name) const

Reconstruct a set.

◆ decomposeSet() [2/2]

Foam::PtrList<SetType> decomposeSet ( const word name) const

Definition at line 1271 of file domainDecomposition.C.

References Foam::name(), and PtrList< T >::set().

Here is the call graph for this function:

◆ reconstructSet() [2/2]

Foam::autoPtr<SetType> reconstructSet ( const word name) const

Definition at line 1328 of file domainDecomposition.C.

References forAllConstIter, Foam::name(), and IOobject::READ_IF_PRESENT.

Here is the call graph for this function:

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