fvMeshTools Class Reference

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

Static Public Member Functions

static label addPatch (fvMesh &mesh, const polyPatch &patch, const dictionary &patchFieldDict, const word &defaultPatchFieldType, const bool validBoundary)
 Add patch. Inserts patch before all processor patches. More...
 
static void setPatchFields (fvMesh &mesh, const label patchi, const dictionary &patchFieldDict)
 Change patchField on registered fields according to dictionary. More...
 
static void zeroPatchFields (fvMesh &mesh, const label patchi)
 Change patchField to zero on registered fields. More...
 
static void reorderPatches (fvMesh &, const labelList &oldToNew, const label nPatches, const bool validBoundary)
 Reorder and remove trailing patches. If validBoundary call is parallel. More...
 
static labelList removeEmptyPatches (fvMesh &, const bool validBoundary)
 Remove zero sized patches. All but processor patches are. More...
 
static autoPtr< fvMeshnewMesh (const IOobject &io, const bool masterOnlyReading)
 Read mesh or create dummy mesh (0 cells, >0 patches). Works in two. More...
 
static void createDummyFvMeshFiles (const objectRegistry &parent, const word &regionName, const bool verbose=false)
 Create additional fv* files. More...
 

Detailed Description

A collection of tools for operating on an fvMesh.

Source files

Definition at line 51 of file fvMeshTools.H.

Member Function Documentation

◆ addPatch()

Foam::label addPatch ( fvMesh mesh,
const polyPatch patch,
const dictionary patchFieldDict,
const word defaultPatchFieldType,
const bool  validBoundary 
)
static

Add patch. Inserts patch before all processor patches.

Supply per field the new patchField per field as a subdictionary or a default type. If validBoundary call is parallel synced and all add the same patch with same settings.

Definition at line 37 of file fvMeshTools.C.

References polyBoundaryMesh::findPatchID(), forAll, mesh, Foam::New(), Foam::foamVersion::patch, polyBoundaryMesh::reorder(), PtrList< T >::set(), PtrList< T >::setSize(), polyPatch::start(), and Foam::Zero.

Here is the call graph for this function:

◆ setPatchFields()

void setPatchFields ( fvMesh mesh,
const label  patchi,
const dictionary patchFieldDict 
)
static

Change patchField on registered fields according to dictionary.

Definition at line 219 of file fvMeshTools.C.

References mesh.

◆ zeroPatchFields()

void zeroPatchFields ( fvMesh mesh,
const label  patchi 
)
static

Change patchField to zero on registered fields.

Definition at line 243 of file fvMeshTools.C.

References mesh, and Foam::Zero.

◆ reorderPatches()

void reorderPatches ( fvMesh mesh,
const labelList oldToNew,
const label  nPatches,
const bool  validBoundary 
)
static

Reorder and remove trailing patches. If validBoundary call is parallel.

synced

Definition at line 329 of file fvMeshTools.C.

References fvMesh::boundary(), polyMesh::boundaryMesh(), mesh, and polyBoundaryMesh::reorder().

Here is the call graph for this function:

◆ removeEmptyPatches()

Foam::labelList removeEmptyPatches ( fvMesh mesh,
const bool  validBoundary 
)
static

Remove zero sized patches. All but processor patches are.

assumed to be present on all processors (so size will be reduced if validBoundary). Return map from new to old patches

Definition at line 361 of file fvMeshTools.C.

References polyMesh::boundaryMesh(), forAll, mesh, Foam::reduce(), and List< T >::setSize().

Here is the call graph for this function:

◆ newMesh()

Foam::autoPtr< Foam::fvMesh > newMesh ( const IOobject io,
const bool  masterOnlyReading 
)
static

◆ createDummyFvMeshFiles()

void createDummyFvMeshFiles ( const objectRegistry parent,
const word regionName,
const bool  verbose = false 
)
static

Create additional fv* files.

Definition at line 760 of file fvMeshTools.C.

References dictionary::add(), Foam::endl(), Foam::Info, mesh, IOobject::name(), IOobject::NO_READ, IOobject::NO_WRITE, regionName, TimePaths::system(), fvMesh::time(), and IOobject::typeHeaderOk().

Referenced by voxelMeshSearch::makeMesh().

Here is the call graph for this function:
Here is the caller graph for this function:

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