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)
 Unregister the faMesh from its associated polyMesh to prevent triggering on polyMesh changes etc. More...
 
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 autoPtr< faMeshloadOrCreateMesh (const IOobject &io, const polyMesh &pMesh, refPtr< fileOperation > &readHandler, 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, refPtr< 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...
 
static void printMeshChecks (const faMesh &mesh, const int verbose=1)
 Report mesh information. More...
 

Detailed Description

A collection of tools for operating on an faMesh.

Source files

Definition at line 57 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 33 of file faMeshTools.C.

References objectRegistry::checkOut(), and mesh.

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 45 of file faMeshTools.C.

References polyMesh::globalData(), and mesh.

Here is the call graph for this function:

◆ newMesh()

◆ loadOrCreateMesh() [1/2]

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

Definition at line 580 of file faMeshTools.C.

References io().

Here is the call graph for this function:

◆ loadOrCreateMesh() [2/2]

Foam::autoPtr< Foam::faMesh > loadOrCreateMesh ( const IOobject io,
const polyMesh pMesh,
refPtr< fileOperation > &  readHandler,
const bool  verbose = false 
)
static
Parameters
readHandlerNon-null reference if a mesh exists on given processor

Definition at line 600 of file faMeshTools.C.

References io().

Here is the call graph for this function:

◆ readProcAddressing()

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

Read decompose/reconstruct addressing.

Definition at line 221 of file faMeshToolsProcAddr.C.

References Foam::createReconstructMap(), Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, Foam::Info, mesh, Foam::nl, IOobject::objectRelPath(), UList< T >::size(), and Foam::Zero.

Here is the call graph for this function:

◆ writeProcAddressing()

void writeProcAddressing ( const faMesh mesh,
const mapDistributePolyMesh faDistMap,
const bool  decompose,
refPtr< 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 301 of file faMeshToolsProcAddr.C.

References mapDistributePolyMesh::cellMap(), mapDistributeBase::constructSize(), mapDistribute::distribute(), mapDistributePolyMesh::distributePointData(), Foam::endl(), Foam::faceMap(), mapDistributePolyMesh::faceMap(), Foam::fileHandler, Foam::identity(), Foam::Info, mesh, mapDistributePolyMesh::nOldCells(), mapDistributePolyMesh::nOldFaces(), mapDistributePolyMesh::nOldPoints(), IOobject::objectRelPath(), mapDistributePolyMesh::oldPatchSizes(), mapDistributePolyMesh::patchMap(), mapDistributePolyMesh::pointMap(), IOobject::rename(), mapDistribute::reverseDistribute(), UList< T >::size(), faMesh::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

◆ printMeshChecks()

void printMeshChecks ( const faMesh mesh,
const int  verbose = 1 
)
static

Report mesh information.

Definition at line 29 of file faMeshToolsChecks.C.

References Foam::flatOutput(), Foam::gMinMax(), Foam::Info, Foam::MULES::limit(), mesh, Foam::minMax(), Foam::nl, nPatches, nPoints, p, patches, Foam::reduce(), Foam::returnReduce(), and Foam::sum().

Here is the call 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 27 of file faMeshToolsTemplates.C.

References fld, forAll, mesh, 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: