faMeshTools Class Reference

A collection of tools for operating on an faMesh. More...

Public Member Functions

template<class Type >
Foam::tmp< Foam::Field< Type > > flattenEdgeField (const GeometricField< Type, faePatchField, edgeMesh > &fld, const bool primitiveOrdering)
 

Static Public Member Functions

static void unregisterMesh (const faMesh &mesh)
 
static void forceDemandDriven (faMesh &mesh)
 Force creation of everything that might vaguely be used by patches. More...
 
static autoPtr< faMeshnewMesh (const IOobject &io, const polyMesh &pMesh, const bool masterOnlyReading, const bool verbose=false)
 Read mesh or create dummy mesh (0 faces, >0 patches). More...
 
static autoPtr< faMeshloadOrCreateMesh (const IOobject &io, const polyMesh &pMesh, const bool decompose, const bool verbose=false)
 
static mapDistributePolyMesh readProcAddressing (const faMesh &mesh, const autoPtr< faMesh > &baseMeshPtr)
 Read decompose/reconstruct addressing. More...
 
static void writeProcAddressing (const faMesh &mesh, const mapDistributePolyMesh &faDistMap, const bool decompose, autoPtr< fileOperation > &&writeHandler, const faMesh *procMesh=nullptr)
 Write decompose/reconstruct addressing. More...
 
template<class Type >
static tmp< Field< Type > > flattenEdgeField (const GeometricField< Type, faePatchField, edgeMesh > &fld, const bool primitiveOrdering=false)
 Flatten an edge field into linear addressing. More...
 

Detailed Description

A collection of tools for operating on an faMesh.

Source files

Definition at line 60 of file faMeshTools.H.

Member Function Documentation

◆ unregisterMesh()

void unregisterMesh ( const faMesh mesh)
static

Unregister the faMesh from its associated polyMesh to prevent triggering on polyMesh changes etc.

Definition at line 38 of file faMeshTools.C.

References objectRegistry::checkOut(), mesh, fvMesh::thisDb(), and ensightPTraits< Type >::typeName.

Here is the call graph for this function:

◆ forceDemandDriven()

void forceDemandDriven ( faMesh mesh)
static

Force creation of everything that might vaguely be used by patches.

This is fairly horrible.

Definition at line 50 of file faMeshTools.C.

References polyMesh::globalData(), and mesh.

Here is the call graph for this function:

◆ newMesh()

Foam::autoPtr< Foam::faMesh > newMesh ( const IOobject io,
const polyMesh pMesh,
const bool  masterOnlyReading,
const bool  verbose = false 
)
static

◆ loadOrCreateMesh()

Foam::autoPtr< Foam::faMesh > loadOrCreateMesh ( const IOobject io,
const polyMesh pMesh,
const bool  decompose,
const bool  verbose = false 
)
static

◆ readProcAddressing()

Foam::mapDistributePolyMesh readProcAddressing ( const faMesh mesh,
const autoPtr< faMesh > &  baseMeshPtr 
)
static

◆ writeProcAddressing()

void writeProcAddressing ( const faMesh mesh,
const mapDistributePolyMesh faDistMap,
const bool  decompose,
autoPtr< fileOperation > &&  writeHandler,
const faMesh procMesh = nullptr 
)
static

Write decompose/reconstruct addressing.

Parameters
mesh
faDistMap
decomposerunning in decompose vs reconstruct mode
writeHandlerfile handler
procMesh(optional) processor mesh in reconstruct mode
Note
Since the faMesh holds a reference to a polyMesh, in reconstruct mode it will refer to the base mesh, but we need a means to proc addressing into the processor locations. This is the purpose of the additional procMesh reference

Definition at line 307 of file faMeshToolsProcAddr.C.

References fvMesh::boundary(), mapDistributePolyMesh::cellMap(), mapDistributeBase::constructSize(), mapDistribute::distribute(), mapDistributePolyMesh::distributePointData(), Foam::endl(), mapDistributePolyMesh::faceMap(), Foam::faceMap(), polyMesh::facesInstance(), Foam::fileHandler(), Foam::identity(), Foam::Info, splitCell::master(), mesh, faMesh::meshSubDir, primitiveMesh::nEdges(), primitiveMesh::nFaces(), IOobject::NO_READ, IOobject::NO_WRITE, mapDistributePolyMesh::nOldCells(), mapDistributePolyMesh::nOldFaces(), mapDistributePolyMesh::nOldPoints(), UPstream::nonBlocking, primitiveMesh::nPoints(), IOobject::objectRelPath(), mapDistributePolyMesh::oldPatchSizes(), UPstream::parRun(), mapDistributePolyMesh::patchMap(), mapDistributePolyMesh::pointMap(), IOobject::rename(), mapDistribute::reverseDistribute(), UPtrList< T >::size(), UList< T >::size(), faMesh::thisDb(), fvMesh::thisDb(), WarningInFunction, regIOobject::write(), and Foam::Zero.

Here is the call graph for this function:

◆ flattenEdgeField() [1/2]

static tmp< Field< Type > > flattenEdgeField ( const GeometricField< Type, faePatchField, edgeMesh > &  fld,
const bool  primitiveOrdering = false 
)
static

Flatten an edge field into linear addressing.

Optionally use primitive patch edge ordering

Referenced by faMeshDistributor::faMeshDistributor().

Here is the caller graph for this function:

◆ flattenEdgeField() [2/2]

Foam::tmp< Foam::Field< Type > > flattenEdgeField ( const GeometricField< Type, faePatchField, edgeMesh > &  fld,
const bool  primitiveOrdering 
)

Definition at line 33 of file faMeshToolsTemplates.C.

References fvMesh::boundary(), fld(), forAll, mesh, primitiveMesh::nEdges(), Foam::New(), UList< T >::size(), and Foam::Zero.

Here is the call graph for this function:

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