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 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) |
A collection of tools for operating on an fvMesh.
Definition at line 48 of file fvMeshTools.H.
|
staticprivate |
Definition at line 34 of file fvMeshToolsTemplates.C.
References fld(), forAllIter, dictionary::found(), mesh, Foam::compressible::New(), and dictionary::subDict().
|
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().
|
staticprivate |
Set patchFields to value.
Definition at line 128 of file fvMeshToolsTemplates.C.
References fld(), forAllIter, and mesh.
Definition at line 153 of file fvMeshToolsTemplates.C.
References fld(), forAllIter, mesh, and nPatches.
Definition at line 171 of file fvMeshToolsTemplates.C.
References fld(), forAllIter, and mesh.
Definition at line 277 of file fvMeshTools.C.
References Foam::abort(), fvMesh::boundary(), polyMesh::boundaryMesh(), fvMesh::clearOut(), PtrList::empty(), Foam::FatalError, FatalErrorInFunction, mesh, nPatches, Foam::reduce(), PtrList::setSize(), and PtrList::size().
|
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().
|
static |
Change patchField on registered fields according to dictionary.
Definition at line 217 of file fvMeshTools.C.
References mesh.
Change patchField to zero on registered fields.
Definition at line 241 of file fvMeshTools.C.
References mesh.
|
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().
|
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().
|
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 422 of file fvMeshTools.C.
References fvMesh::addFvPatches(), polyMesh::addZones(), DynamicList::append(), fvMesh::boundary(), polyMesh::boundaryMesh(), polyMesh::cellZones(), ZoneMesh::clear(), IOobject::clone(), IOobject::db(), polyMesh::defaultRegion, Foam::e, polyMesh::faceZones(), regIOobject::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::names(), 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(), List::size(), PtrList::size(), IOobject::time(), regIOobject::timeStamp, Foam::type(), and Foam::xferCopy().
Referenced by main().
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.