Static Public Member Functions | Static Private Member Functions
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 Private Member Functions

template<class GeoField >
static void addPatchFields (fvMesh &, const dictionary &patchFieldDict, const word &defaultPatchFieldType, const typename GeoField::value_type &defaultPatchValue)
 
template<class GeoField >
static void setPatchFields (fvMesh &mesh, const label patchI, const dictionary &patchFieldDict)
 Set patchFields according to dictionary. More...
 
template<class GeoField >
static void setPatchFields (fvMesh &mesh, const label patchI, const typename GeoField::value_type &value)
 Set patchFields to value. More...
 
template<class GeoField >
static void trimPatchFields (fvMesh &, const label nPatches)
 
template<class GeoField >
static void reorderPatchFields (fvMesh &, const labelList &oldToNew)
 
static void trimPatches (fvMesh &, const label nPatches)
 

Detailed Description

A collection of tools for operating on an fvMesh.

Source files

Definition at line 48 of file fvMeshTools.H.

Member Function Documentation

◆ addPatchFields()

void addPatchFields ( fvMesh mesh,
const dictionary patchFieldDict,
const word defaultPatchFieldType,
const typename GeoField::value_type &  defaultPatchValue 
)
staticprivate

Definition at line 34 of file fvMeshToolsTemplates.C.

References fld(), forAllIter, dictionary::found(), mesh, Foam::compressible::New(), and dictionary::subDict().

Here is the call graph for this function:

◆ setPatchFields() [1/3]

void setPatchFields ( fvMesh mesh,
const label  patchI,
const dictionary patchFieldDict 
)
staticprivate

Set patchFields according to dictionary.

Definition at line 89 of file fvMeshToolsTemplates.C.

References fld(), forAllIter, dictionary::found(), mesh, Foam::compressible::New(), and dictionary::subDict().

Here is the call graph for this function:

◆ setPatchFields() [2/3]

void setPatchFields ( fvMesh mesh,
const label  patchI,
const typename GeoField::value_type &  value 
)
staticprivate

Set patchFields to value.

Definition at line 128 of file fvMeshToolsTemplates.C.

References fld(), forAllIter, and mesh.

Here is the call graph for this function:

◆ trimPatchFields()

void trimPatchFields ( fvMesh mesh,
const label  nPatches 
)
staticprivate

Definition at line 153 of file fvMeshToolsTemplates.C.

References fld(), forAllIter, mesh, and nPatches.

Here is the call graph for this function:

◆ reorderPatchFields()

void reorderPatchFields ( fvMesh mesh,
const labelList oldToNew 
)
staticprivate

Definition at line 171 of file fvMeshToolsTemplates.C.

References fld(), forAllIter, and mesh.

Here is the call graph for this function:

◆ trimPatches()

void trimPatches ( fvMesh mesh,
const label  nPatches 
)
staticprivate

◆ 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 35 of file fvMeshTools.C.

References polyPatch::clone(), polyBoundaryMesh::findPatchID(), forAll, mesh, patchIdentifier::name(), Foam::compressible::New(), polyBoundaryMesh::reorder(), PtrList::reorder(), PtrList::set(), PtrList::setSize(), PtrList::size(), and polyPatch::start().

Referenced by fvMeshDistribute::addProcPatches().

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

◆ setPatchFields() [3/3]

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

Change patchField on registered fields according to dictionary.

Definition at line 217 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 241 of file fvMeshTools.C.

References mesh.

◆ 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 327 of file fvMeshTools.C.

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

Referenced by fvMeshDistribute::deleteProcPatches().

Here is the call graph for this function:
Here is the caller 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 359 of file fvMeshTools.C.

References polyMesh::boundaryMesh(), forAll, mesh, Foam::reduce(), List::setSize(), List::size(), and PtrList::size().

Referenced by main().

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

◆ newMesh()

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

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