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) |
static void | forceDemandDriven (faMesh &mesh) |
Force creation of everything that might vaguely be used by patches. More... | |
static autoPtr< faMesh > | newMesh (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< faMesh > | loadOrCreateMesh (const IOobject &io, const polyMesh &pMesh, const bool decompose, 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, autoPtr< 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... | |
A collection of tools for operating on an faMesh.
Definition at line 60 of file faMeshTools.H.
|
static |
Unregister the faMesh from its associated polyMesh to prevent triggering on polyMesh changes etc.
Definition at line 38 of file faMeshTools.C.
References objectRegistry::checkOut(), mesh, fvMesh::thisDb(), and ensightPTraits< Type >::typeName.
|
static |
Force creation of everything that might vaguely be used by patches.
This is fairly horrible.
Definition at line 50 of file faMeshTools.C.
References polyMesh::globalData(), and mesh.
|
static |
Read mesh or create dummy mesh (0 faces, >0 patches).
Works in two modes according to masterOnlyReading: true : create a dummy mesh for all procs false: checks locally for mesh directories and only creates dummy mesh if not present
Definition at line 67 of file faMeshTools.C.
References fvMesh::boundary(), Pstream::broadcasts(), IOobject::db(), e, HashTable< T, Key, Hash >::empty(), UPtrList< T >::empty(), IOobject::fileModificationChecking, Time::findInstance(), forAll, UList< T >::get(), polyMesh::globalData(), dynamicFvMesh::init(), IOobject::instance(), io(), Foam::isDir(), splitCell::master(), mesh, meshPtr, faMesh::meshSubDir, IOobject::MUST_READ, Foam::name(), Time::New(), IOobject::NO_READ, IOobject::NO_WRITE, nPatches, UPstream::parRun(), patches, Time::path(), IOobject::READ_IF_PRESENT, IOobject::readOpt(), polyMesh::regionName(), IOobject::registerObject(), IOobject::rename(), PtrList< T >::resize(), Foam::returnReduce(), PtrList< T >::set(), dictionary::set(), UPtrList< T >::size(), IOobject::time(), IOobject::timeStamp, Foam::type(), ensightPTraits< Type >::typeName, UPstream::worldComm, and IOobject::writeOpt().
|
static |
Info<< patchEntries << nl;
Pout<< "Reading area mesh from " << io.objectRelPath() << endl;
if 0 faMeshTools::forceDemandDriven(mesh); faMeshTools::unregisterMesh(mesh); #endif
Definition at line 249 of file faMeshTools.C.
References faMesh::addFaPatches(), IOobject::AUTO_WRITE, fvMesh::boundary(), faMesh::boundary(), Pstream::broadcast(), IOobject::db(), e, Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, Foam::fileHandler(), forAll, UList< T >::get(), polyMesh::globalData(), dynamicFvMesh::init(), IOobject::instance(), io(), fileOperation::isFile(), splitCell::master(), mesh, meshPtr, faMesh::meshSubDir, Foam::mkDir(), IOobject::MUST_READ, processorFaPatch::myProcNo(), IOobject::name(), Foam::name(), Time::New(), IOobject::NO_READ, IOobject::NO_WRITE, nPatches, UPstream::parRun(), patches, IOobject::path(), Time::path(), polyMesh::regionName(), PtrList< T >::resize(), PtrList< T >::set(), dictionary::set(), UPtrList< T >::size(), IOobject::time(), Foam::type(), ensightPTraits< Type >::typeName, and faMesh::write().
|
static |
Read decompose/reconstruct addressing.
Definition at line 227 of file faMeshToolsProcAddr.C.
References fvMesh::boundary(), Foam::createReconstructMap(), Foam::endl(), Foam::exit(), polyMesh::facesInstance(), Foam::FatalError, FatalErrorInFunction, Foam::Info, mesh, faMesh::meshSubDir, primitiveMesh::nEdges(), primitiveMesh::nFaces(), Foam::nl, IOobject::NO_WRITE, primitiveMesh::nPoints(), IOobject::objectRelPath(), IOobject::READ_IF_PRESENT, IOobject::rename(), UPtrList< T >::size(), UList< T >::size(), fvMesh::thisDb(), and Foam::Zero.
|
static |
Write decompose/reconstruct addressing.
mesh | |
faDistMap | |
decompose | running in decompose vs reconstruct mode |
writeHandler | file handler |
procMesh | (optional) processor mesh in reconstruct mode |
Definition at line 307 of file faMeshToolsProcAddr.C.
References fvMesh::boundary(), mapDistributePolyMesh::cellMap(), mapDistributeBase::constructSize(), mapDistribute::distribute(), mapDistributePolyMesh::distributePointData(), Foam::endl(), mapDistributePolyMesh::faceMap(), Foam::faceMap(), polyMesh::facesInstance(), Foam::fileHandler(), Foam::identity(), Foam::Info, splitCell::master(), mesh, faMesh::meshSubDir, primitiveMesh::nEdges(), primitiveMesh::nFaces(), IOobject::NO_READ, IOobject::NO_WRITE, mapDistributePolyMesh::nOldCells(), mapDistributePolyMesh::nOldFaces(), mapDistributePolyMesh::nOldPoints(), UPstream::nonBlocking, primitiveMesh::nPoints(), IOobject::objectRelPath(), mapDistributePolyMesh::oldPatchSizes(), UPstream::parRun(), mapDistributePolyMesh::patchMap(), mapDistributePolyMesh::pointMap(), IOobject::rename(), mapDistribute::reverseDistribute(), UPtrList< T >::size(), UList< T >::size(), faMesh::thisDb(), fvMesh::thisDb(), WarningInFunction, regIOobject::write(), and Foam::Zero.
|
static |
Flatten an edge field into linear addressing.
Optionally use primitive patch edge ordering
Referenced by faMeshDistributor::faMeshDistributor().
Foam::tmp< Foam::Field< Type > > flattenEdgeField | ( | const GeometricField< Type, faePatchField, edgeMesh > & | fld, |
const bool | primitiveOrdering | ||
) |
Definition at line 33 of file faMeshToolsTemplates.C.
References fvMesh::boundary(), fld(), forAll, mesh, primitiveMesh::nEdges(), Foam::New(), UList< T >::size(), and Foam::Zero.