Go to the documentation of this file.
52 #ifndef fvMeshDistribute_H
53 #define fvMeshDistribute_H
64 class mapAddedPolyMesh;
65 class mapDistributePolyMesh;
88 const bool oldToNewHasFlip,
89 const bool lstHasFlip,
96 const bool selectEqual,
114 template<
class T,
class Mesh>
121 template<
class T,
class Mesh>
144 template<
class GeoField,
class PatchFieldType>
147 const typename GeoField::value_type& initVal
151 template<
class GeoField>
199 const label oldInternalFaces,
238 const label nInternalFaces1,
249 const label oldInternalPatchI
284 template<
class GeoField>
309 template<
class GeoField>
358 template<
class GeoField>
static labelList countCells(const labelList &)
Helper function: count cells per processor in wanted distribution.
static void receiveFields(const label domain, const wordList &fieldNames, fvMesh &, PtrList< GeoField > &, const dictionary &fieldDicts)
Receive fields. Opposite of sendFields.
Accumulating histogram of values. Specified bin resolution automatic generation of bins.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Pair< int > faceMap(const label facePi, const face &faceP, const label faceNi, const face &faceN)
void saveBoundaryFields(PtrList< FieldField< fvsPatchField, T > > &bflds) const
Save boundary fields.
void mapBoundaryFields(const mapPolyMesh &map, const PtrList< FieldField< fvsPatchField, T > > &oldBflds)
Map boundary fields.
static labelList getBoundaryPatch(const labelList &neighbourNewProc, const labelList &referPatchID, const List< Map< label > > &procPatchID)
Get boundary faces to be repatched. Is -1 or new patchID.
A class for managing temporary objects.
Post-processing mesh subset tool. Given the original mesh and the list of selected cells,...
static void printFieldInfo(const fvMesh &)
Print some field info.
label findNonEmptyPatch() const
Find patch to put exposed faces into.
static void findCouples(const primitiveMesh &, const labelList &sourceFace, const labelList &sourceProc, const labelList &sourcePatch, const label domain, const primitiveMesh &domainMesh, const labelList &domainFace, const labelList &domainProc, const labelList &domainPatch, labelList &masterCoupledFaces, labelList &slaveCoupledFaces)
Find cells on mesh whose faceID/procID match the neighbour.
void getNeighbourData(const labelList &distribution, labelList &sourceFace, labelList &sourceProc, labelList &sourcePatch, labelList &sourceNewProc) const
Construct the local environment of all boundary faces.
static autoPtr< fvMesh > receiveMesh(const label domain, const wordList &pointZoneNames, const wordList &facesZoneNames, const wordList &cellZoneNames, const Time &runTime, labelList &domainSourceFace, labelList &domainSourceProc, labelList &domainSourcePatch, labelList &domainSourceNewProc, Istream &fromNbr)
Receive mesh. Opposite of sendMesh.
static void inplaceRenumberWithFlip(const labelUList &oldToNew, const bool oldToNewHasFlip, const bool lstHasFlip, labelUList &lst)
autoPtr< mapPolyMesh > doRemoveCells(const labelList &cellsToRemove, const label oldInternalPatchI)
Remove cells. Add all exposed faces to patch oldInternalPatchI.
ClassName("fvMeshDistribute")
static tmp< surfaceScalarField > generateTestField(const fvMesh &)
Generate a test field on faces.
static labelList mapBoundaryData(const primitiveMesh &mesh, const mapAddedPolyMesh &map, const labelList &boundaryData0, const label nInternalFaces1, const labelList &boundaryData1)
Map data on boundary faces to new mesh (resulting from adding.
static void sendFields(const label domain, const wordList &fieldNames, const fvMeshSubset &, Ostream &toNbr)
Send subset of fields.
static void checkEqualWordList(const string &, const wordList &)
Check all procs have same names and in exactly same order.
autoPtr< mapPolyMesh > repatch(const labelList &newPatchID, labelListList &constructFaceMap)
Repatch the mesh. This is only necessary for the proc.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
void operator=(const fvMeshDistribute &)
Disallow default bitwise assignment.
A list of keyword definitions, which are a keyword followed by any number of values (e....
fvMeshDistribute(const fvMeshDistribute &)
Disallow default bitwise copy construct.
Mesh data needed to do the Finite Volume discretisation.
void saveInternalFields(PtrList< Field< T > > &iflds) const
Save internal fields of surfaceFields.
static wordList mergeWordList(const wordList &)
Merge wordlists over all processors.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
static void printMeshInfo(const fvMesh &)
Print some info on mesh.
void addProcPatches(const labelList &, const labelList &, List< Map< label > > &procPatchID)
Add processor patches. Changes mesh and returns per neighbour.
void correctBoundaryConditions()
Call correctBoundaryConditions on fields.
fvMesh & mesh_
Underlying fvMesh.
const scalar mergeTol_
Absolute merging tolerance (constructing meshes gets done using.
wordList fieldNames(const IOobjectList &objects, const bool syncPar)
Get sorted names of fields of type. If syncPar and running in parallel.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
static void printCoupleInfo(const primitiveMesh &, const labelList &, const labelList &, const labelList &, const labelList &)
Print some info on coupling data.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
void initPatchFields(const typename GeoField::value_type &initVal)
Init patch fields of certain type.
static void testField(const surfaceScalarField &)
Check whether field consistent with face orientation.
autoPtr< mapDistributePolyMesh > distribute(const labelList &dist)
Send cells to neighbours according to distribution.
autoPtr< mapPolyMesh > deleteProcPatches(const label patchI)
Delete all processor patches. Move any processor faces into.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
void mapExposedFaces(const mapPolyMesh &map, const PtrList< Field< T > > &oldFlds)
Set value of patch faces resulting from internal faces.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
autoPtr< mapPolyMesh > mergeSharedPoints(labelListList &constructPointMap)
Merge any shared points that are geometrically shared. Needs.
static void subsetBoundaryData(const fvMesh &mesh, const labelList &faceMap, const labelList &cellMap, const labelList &oldDistribution, const labelList &oldFaceOwner, const labelList &oldFaceNeighbour, const label oldInternalFaces, const labelList &sourceFace, const labelList &sourceProc, const labelList &sourcePatch, const labelList &sourceNewProc, labelList &subFace, labelList &subProc, labelList &subPatch, labelList &subNewProc)
Class containing mesh-to-mesh mapping information after a mesh addition where we add a mesh ('added m...
Generic GeometricField class.
static void sendMesh(const label domain, const fvMesh &mesh, const wordList &pointZoneNames, const wordList &facesZoneNames, const wordList &cellZoneNames, const labelList &sourceFace, const labelList &sourceProc, const labelList &sourcePatch, const labelList &sourceNewProc, Ostream &toDomain)
Send mesh and coupling data.
static labelList select(const bool selectEqual, const labelList &values, const label value)
Find indices with value.
Sends/receives parts of mesh+fvfields to neighbouring processors. Used in load balancing.
Cell-face mesh analysis engine.