Holds a reference to the original mesh (the baseMesh) and optionally to a subset of that mesh (the subMesh) with mapping lists for points, faces, and cells. More...
Public Member Functions | |
faMeshDistributor (const faMeshDistributor &)=delete | |
No copy construct. More... | |
void | operator= (const faMeshDistributor &)=delete |
No copy assignment. More... | |
faMeshDistributor (const faMesh &srcMesh, const faMesh &tgtMesh, const mapDistributePolyMesh &faDistMap, const bool isWriteProc) | |
Construct from components, using bool to control writing. More... | |
faMeshDistributor (const faMesh &srcMesh, const faMesh &tgtMesh, const mapDistributePolyMesh &faDistMap, refPtr< fileOperation > &writeHandler) | |
Construct from components, using file handler to control writing. More... | |
label | distributeAllFields (const IOobjectList &objects, const wordRes &selectedFields=wordRes()) const |
Read, distribute and write all/selected point field types (scalar, vector, ... types) More... | |
template<class Type > | |
tmp< GeometricField< Type, faPatchField, areaMesh > > | distributeField (const GeometricField< Type, faPatchField, areaMesh > &fld) const |
Distribute area field. More... | |
template<class Type > | |
tmp< GeometricField< Type, faePatchField, edgeMesh > > | distributeField (const GeometricField< Type, faePatchField, edgeMesh > &fld) const |
Distribute edge field. More... | |
template<class Type > | |
tmp< GeometricField< Type, faPatchField, areaMesh > > | distributeAreaField (const IOobject &fieldObject) const |
Read and distribute area field. More... | |
template<class Type > | |
tmp< GeometricField< Type, faePatchField, edgeMesh > > | distributeEdgeField (const IOobject &fieldObject) const |
Read and distribute edge field. More... | |
template<class Type > | |
label | distributeAreaFields (const IOobjectList &objects, const wordRes &selectedFields=wordRes()) const |
Read, distribute and write all/selected area fields. More... | |
template<class Type > | |
label | distributeEdgeFields (const IOobjectList &objects, const wordRes &selectedFields=wordRes()) const |
Read, distribute and write all/selected area fields. More... | |
template<class Type > | |
Foam::tmp< Foam::GeometricField< Type, Foam::faPatchField, Foam::areaMesh > > | distributeField (const GeometricField< Type, faPatchField, areaMesh > &fld) const |
template<class Type > | |
Foam::tmp< Foam::GeometricField< Type, Foam::faePatchField, Foam::edgeMesh > > | distributeField (const GeometricField< Type, faePatchField, edgeMesh > &fld) const |
template<class Type > | |
Foam::tmp< Foam::GeometricField< Type, Foam::faPatchField, Foam::areaMesh > > | distributeAreaField (const IOobject &fieldObject) const |
template<class Type > | |
Foam::tmp< Foam::GeometricField< Type, Foam::faePatchField, Foam::edgeMesh > > | distributeEdgeField (const IOobject &fieldObject) const |
template<class Type > | |
Foam::label | distributeAreaFields (const IOobjectList &objects, const wordRes &selectedFields) const |
template<class Type > | |
Foam::label | distributeEdgeFields (const IOobjectList &objects, const wordRes &selectedFields) const |
Static Public Member Functions | |
static mapDistributePolyMesh | distribute (const faMesh &oldMesh, const mapDistributePolyMesh &distMap, const polyMesh &tgtPolyMesh, autoPtr< faMesh > &newMeshPtr) |
Distribute mesh according to the given (volume) mesh distribution. More... | |
static mapDistributePolyMesh | distribute (const faMesh &oldMesh, const mapDistributePolyMesh &distMap, autoPtr< faMesh > &newMeshPtr) |
Distribute mesh according to the given (volume) mesh distribution. More... | |
Static Public Attributes | |
static int | verbose_ = 0 |
Output verbosity when writing. More... | |
Holds a reference to the original mesh (the baseMesh) and optionally to a subset of that mesh (the subMesh) with mapping lists for points, faces, and cells.
Definition at line 57 of file faMeshDistributor.H.
|
delete |
No copy construct.
faMeshDistributor | ( | const faMesh & | srcMesh, |
const faMesh & | tgtMesh, | ||
const mapDistributePolyMesh & | faDistMap, | ||
const bool | isWriteProc | ||
) |
Construct from components, using bool to control writing.
Definition at line 186 of file faMeshDistributor.C.
faMeshDistributor | ( | const faMesh & | srcMesh, |
const faMesh & | tgtMesh, | ||
const mapDistributePolyMesh & | faDistMap, | ||
refPtr< fileOperation > & | writeHandler | ||
) |
Construct from components, using file handler to control writing.
Definition at line 205 of file faMeshDistributor.C.
|
delete |
No copy assignment.
|
static |
Distribute mesh according to the given (volume) mesh distribution.
Uses 'tgtPolyMesh' for the new mesh
{ // Transcribe from patchMapInfo gathered earlier. // - transform Map of labelHashSet to labelListList
labelListList sendToRemote(Pstream::nProcs(faPatchMap.comm()));
forAllConstIters(patchMapInfo, iter) { const label proci = iter.key(); sendToRemote[proci] = iter.val().sortedToc(); }
auto& patchSubMap = faPatchMap.subMap(); auto& patchCnstrMap = faPatchMap.constructMap();
patchSubMap = sendToRemote; patchCnstrMap.resize(patchSubMap.size());
// Change sendToRemote into recv-from-remote by using // all-to-all exchange
Pstream::exchange<labelList, label> ( sendToRemote, patchCnstrMap, UPstream::msgType(), faPatchMap.comm() ); }
tgtPolyMesh | From polyMesh |
Definition at line 33 of file faMeshDistributorNew.C.
References Foam::abort(), Foam::add(), faMesh::boundary(), PtrList< T >::clone(), Foam::ListListOps::combine(), faPatch::edgeLabels(), FixedList< T, N >::empty(), Foam::endl(), Foam::exit(), PrimitivePatch< FaceList, PointField >::faceEdges(), faMesh::faceLabels(), mapDistributePolyMesh::faceMap(), Foam::FatalError, FatalErrorInFunction, Foam::findIndices(), Pair< T >::first(), forAll, Foam::getEdge(), faMesh::hasInternalEdgeLabels(), Foam::identity(), HashTable< T, label, Hash< label > >::insert(), io(), UList< T >::last(), HashTable< T, Key, Hash >::lookup(), Foam::mag(), PrimitivePatch< FaceList, PointField >::meshPoints(), PrimitivePatch< FaceList, PointField >::nEdges(), PrimitivePatch< FaceList, PointField >::nFaces(), PrimitivePatch< FaceList, PointField >::nInternalEdges(), mapDistributePolyMesh::nOldFaces(), mapDistributePolyMesh::nOldPoints(), nPatches, PrimitivePatch< FaceList, PointField >::nPoints(), faMesh::patch(), faBoundaryMesh::patchStarts(), mapDistributePolyMesh::pointMap(), autoPtr< T >::reset(), PtrList< T >::resize(), List< T >::resize(), Pair< T >::second(), PtrList< T >::set(), UList< T >::size(), HashTable< T, Key, Hash >::size(), Foam::sortedOrder(), HashTable< T, Key, Hash >::sortedToc(), mapDistributeBase::subMap(), x, y, and Foam::Zero.
|
static |
Distribute mesh according to the given (volume) mesh distribution.
Re-uses polyMesh from oldMesh for the new mesh
newMeshPtr | From polyMesh |
Definition at line 894 of file faMeshDistributorNew.C.
References faMesh::mesh().
Foam::label distributeAllFields | ( | const IOobjectList & | objects, |
const wordRes & | selectedFields = wordRes() |
||
) | const |
Read, distribute and write all/selected point field types (scalar, vector, ... types)
Definition at line 226 of file faMeshDistributor.C.
tmp<GeometricField<Type, faPatchField, areaMesh> > distributeField | ( | const GeometricField< Type, faPatchField, areaMesh > & | fld | ) | const |
Distribute area field.
tmp<GeometricField<Type, faePatchField, edgeMesh> > distributeField | ( | const GeometricField< Type, faePatchField, edgeMesh > & | fld | ) | const |
Distribute edge field.
tmp<GeometricField<Type, faPatchField, areaMesh> > distributeAreaField | ( | const IOobject & | fieldObject | ) | const |
Read and distribute area field.
tmp<GeometricField<Type, faePatchField, edgeMesh> > distributeEdgeField | ( | const IOobject & | fieldObject | ) | const |
Read and distribute edge field.
label distributeAreaFields | ( | const IOobjectList & | objects, |
const wordRes & | selectedFields = wordRes() |
||
) | const |
Read, distribute and write all/selected area fields.
label distributeEdgeFields | ( | const IOobjectList & | objects, |
const wordRes & | selectedFields = wordRes() |
||
) | const |
Read, distribute and write all/selected area fields.
Foam::tmp<Foam::GeometricField<Type, Foam::faPatchField, Foam::areaMesh> > distributeField | ( | const GeometricField< Type, faPatchField, areaMesh > & | fld | ) | const |
Definition at line 41 of file faMeshDistributorTemplates.C.
References Foam::fieldTypes::emptyType, fld, forAll, and Foam::New().
Foam::tmp<Foam::GeometricField<Type, Foam::faePatchField, Foam::edgeMesh> > distributeField | ( | const GeometricField< Type, faePatchField, edgeMesh > & | fld | ) | const |
Definition at line 146 of file faMeshDistributorTemplates.C.
References Foam::fieldTypes::emptyType, fld, forAll, Foam::New(), and DimensionedField< Type, GeoMesh >::oriented().
Foam::tmp<Foam::GeometricField<Type, Foam::faPatchField, Foam::areaMesh> > distributeAreaField | ( | const IOobject & | fieldObject | ) | const |
Definition at line 247 of file faMeshDistributorTemplates.C.
References fld.
Foam::tmp<Foam::GeometricField<Type, Foam::faePatchField, Foam::edgeMesh> > distributeEdgeField | ( | const IOobject & | fieldObject | ) | const |
Definition at line 266 of file faMeshDistributorTemplates.C.
References fld.
Foam::label distributeAreaFields | ( | const IOobjectList & | objects, |
const wordRes & | selectedFields | ||
) | const |
Definition at line 284 of file faMeshDistributorTemplates.C.
References IOobjectList::csorted(), UList< T >::empty(), Foam::endl(), Foam::fileHandler, Foam::Info, io(), and Foam::nl.
Foam::label distributeEdgeFields | ( | const IOobjectList & | objects, |
const wordRes & | selectedFields | ||
) | const |
Definition at line 342 of file faMeshDistributorTemplates.C.
References IOobjectList::csorted(), UList< T >::empty(), Foam::endl(), Foam::fileHandler, Foam::Info, io(), and Foam::nl.
|
static |
Output verbosity when writing.
Definition at line 138 of file faMeshDistributor.H.