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< fvMesh > | newMesh (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 ®ionName, const bool verbose=false) |
Create additional fv* files. More... | |
A collection of tools for operating on an fvMesh.
Definition at line 51 of file fvMeshTools.H.
|
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.
|
static |
Change patchField on registered fields according to dictionary.
Definition at line 219 of file fvMeshTools.C.
References mesh.
|
static |
Change patchField to zero on registered fields.
Definition at line 243 of file fvMeshTools.C.
References mesh, and Foam::Zero.
|
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().
|
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().
|
static |
Read mesh or create dummy mesh (0 cells, >0 patches). Works in two.
modes according to masterOnlyReading: true : all slaves create dummy mesh false: checks locally for mesh directories and only creates dummy mesh if not present
Definition at line 424 of file fvMeshTools.C.
References fvMesh::addFvPatches(), polyMesh::addZones(), DynamicList< T, SizeMin >::append(), fvMesh::boundary(), polyMesh::boundaryMesh(), polyMesh::cellZones(), ZoneMesh< ZoneType, MeshType >::clear(), PtrList< T >::clone(), IOobject::db(), polyMesh::defaultRegion, Foam::constant::electromagnetic::e, polyMesh::faceZones(), IOobject::fileModificationChecking, Time::findInstance(), UPstream::firstSlave(), forAll, IOobject::instance(), Foam::isDir(), UPstream::lastSlave(), UPstream::master(), UPstream::masterNo(), mesh, meshPtr, polyMesh::meshSubDir, IOobject::MUST_READ, IOobject::name(), ZoneMesh< ZoneType, MeshType >::names(), autoPtr< T >::New(), polyPatch::New(), IOobject::NO_READ, IOobject::NO_WRITE, Time::path(), polyMesh::pointZones(), IOobject::READ_IF_PRESENT, IOobject::readOpt(), Foam::reduce(), fvMesh::removeFvBoundary(), Pstream::scatter(), UPstream::scheduled, dictionary::set(), IOobject::time(), IOobject::timeStamp, Foam::type(), and Foam::Zero.
|
static |
Create additional fv* files.
Definition at line 674 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().