109 const faMesh& baseMesh = *baseMeshPtr;
111 const label nNewPoints = baseMesh.
nPoints();
112 const label nNewFaces = baseMesh.
nFaces();
113 const label nNewEdges = baseMesh.
nEdges();
124 std::move(faceSubMap),
125 std::move(faceAddressing),
133 std::move(edgeSubMap),
134 std::move(edgeAddressing),
142 std::move(pointSubMap),
143 std::move(pointAddressing)
149 std::move(patchSubMap),
150 std::move(patchAddressing)
160 std::move(oldPatchStarts),
174 std::move(faceSubMap),
183 std::move(edgeSubMap),
192 std::move(pointSubMap),
199 std::move(patchSubMap),
210 std::move(oldPatchStarts),
253 Info<<
"Reading (face|edge|face|point|boundary)ProcAddressing from "
257 ioAddr.
rename(
"faceProcAddressing");
260 ioAddr.
rename(
"edgeProcAddressing");
263 ioAddr.
rename(
"pointProcAddressing");
266 ioAddr.
rename(
"boundaryProcAddressing");
278 <<
"Read addressing inconsistent with mesh sizes" <<
nl
281 <<
" size:" << faceProcAddressing.
size() <<
nl
284 <<
" size:" << edgeProcAddressing.
size() <<
nl
287 <<
" size:" << pointProcAddressing.
size()
290 <<
" size:" << boundaryProcAddressing.
size()
301 boundaryProcAddressing
311 const bool decompose,
317 << (decompose ?
"decompose" :
"reconstruct")
318 <<
") procAddressing files to "
335 ioAddr.
rename(
"faceProcAddressing");
339 ioAddr.
rename(
"edgeProcAddressing");
343 ioAddr.
rename(
"pointProcAddressing");
347 ioAddr.
rename(
"boundaryProcAddressing");
367 map.
patchMap().mapDistributeBase::distribute
392 map.
patchMap().mapDistributeBase::reverseDistribute
404 defaultHandler =
fileHandler(std::move(writeHandler));
446 const bool faceOk =
faceMap.write();
447 const bool edgeOk = edgeMap.
write();
448 const bool pointOk = pointMap.
write();
449 const bool patchOk = patchMap.
write();
453 writeHandler =
fileHandler(std::move(defaultHandler));
456 if (!edgeOk || !faceOk || !pointOk || !patchOk)
459 <<
"Failed to write some of "
460 <<
faceMap.objectRelPath() <<
", "
A IOmapDistributePolyMesh wrapper for using referenced external data.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
fileName objectRelPath() const
The object path relative to the root.
virtual void rename(const word &newName)
Rename the object.
A List with indirect addressing.
label nProcs() const noexcept
Number of ranks associated with PstreamBuffers.
static void gatherList(const List< commsStruct > &comms, List< T > &values, const int tag, const label comm)
void size(const label n)
Older name for setAddressableSize.
@ nonBlocking
"nonBlocking"
static constexpr int masterNo() noexcept
Process index of the master (always 0)
static bool & parRun() noexcept
Test if this a parallel run.
label size() const noexcept
The number of elements in the list.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Finite area boundary mesh.
labelList patchStarts() const
Return a list of patch start indices.
Finite area mesh (used for 2-D non-Euclidian finite area method) defined using a patch of faces on a ...
const faBoundaryMesh & boundary() const noexcept
Return constant reference to boundary mesh.
label nEdges() const noexcept
Number of local mesh edges.
virtual const objectRegistry & thisDb() const
Return reference to the mesh database.
label nPoints() const noexcept
Number of local mesh points.
label nFaces() const noexcept
Number of patch faces.
static word meshSubDir
The mesh sub-directory name (usually "faMesh")
virtual const objectRegistry & thisDb() const
Return the object registry - resolve conflict polyMesh/lduMesh.
const fvBoundaryMesh & boundary() const
Return reference to boundary mesh.
label constructSize() const noexcept
Constructed data size.
Class containing mesh-to-mesh mapping information after a mesh distribution where we send parts of me...
const mapDistribute & patchMap() const noexcept
Patch distribute map.
label nOldCells() const noexcept
Number of cells in mesh before distribution.
label nOldFaces() const noexcept
Number of faces in mesh before distribution.
const labelList & oldPatchSizes() const noexcept
List of the old patch sizes.
void distributePointData(List< T > &values) const
Distribute list of point data.
const mapDistribute & cellMap() const noexcept
Cell distribute map.
const mapDistribute & pointMap() const noexcept
Point distribute map.
const mapDistribute & faceMap() const noexcept
Face distribute map.
label nOldPoints() const noexcept
Number of points in mesh before distribution.
Class containing processor-to-processor mapping information.
void reverseDistribute(const label constructSize, List< T > &fld, const bool dummyTransform=true, const int tag=UPstream::msgType()) const
Reverse distribute data using default commsType.
void distribute(List< T > &fld, const bool dummyTransform=true, const int tag=UPstream::msgType()) const
Distribute data using default commsType.
const fileName & facesInstance() const
Return the current instance directory for faces.
label nPoints() const noexcept
Number of mesh points.
label nFaces() const noexcept
Number of mesh faces.
label nEdges() const
Number of mesh edges.
int myProcNo() const noexcept
Return processor number.
virtual bool write(const bool valid=true) const
Write using setting from DB.
splitCell * master() const
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
#define WarningInFunction
Report a warning using Foam::Warning.
const fileOperation & fileHandler()
Get current file handler.
Pair< int > faceMap(const label facePi, const face &faceP, const label faceNi, const face &faceN)
labelList identity(const label len, label start=0)
Return an identity map of the given length with (map[i] == i)
List< label > labelList
A List of labels.
messageStream Info
Information stream (stdout output on master, null elsewhere)
static mapDistributePolyMesh createReconstructMap(const faMesh &mesh, const autoPtr< faMesh > &baseMeshPtr, const labelUList &faceProcAddr, const labelUList &edgeProcAddr, const labelUList &pointProcAddr, const labelUList &boundaryProcAddr)
Ostream & endl(Ostream &os)
Add newline and flush stream.
List< labelList > labelListList
A List of labelList.
static constexpr const zero Zero
Global zero (0)
errorManipArg< error, int > exit(error &err, const int errNo=1)
constexpr char nl
The newline '\n' character (0x0a)
Unary predicate for greater-equal 0 (int values)
Functor to negate primitives. Dummy for most other types.