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),
236 mesh.facesInstance(),
253 Info<<
"Reading (face|edge|face|point|boundary)ProcAddressing from " 254 <<
mesh.facesInstance().c_str() <<
'/' 257 ioAddr.rename(
"faceProcAddressing");
260 ioAddr.rename(
"edgeProcAddressing");
263 ioAddr.rename(
"pointProcAddressing");
266 ioAddr.rename(
"boundaryProcAddressing");
271 mesh.nFaces() != faceProcAddressing.
size()
272 ||
mesh.nEdges() != edgeProcAddressing.
size()
273 ||
mesh.nPoints() != pointProcAddressing.
size()
274 ||
mesh.boundary().size() != boundaryProcAddressing.
size()
278 <<
"Read addressing inconsistent with mesh sizes" <<
nl 279 <<
"faces:" <<
mesh.nFaces()
281 <<
" size:" << faceProcAddressing.
size() <<
nl 282 <<
"edges:" <<
mesh.nEdges()
284 <<
" size:" << edgeProcAddressing.
size() <<
nl 285 <<
"points:" <<
mesh.nPoints()
287 <<
" size:" << pointProcAddressing.
size()
288 <<
"patches:" <<
mesh.boundary().size()
290 <<
" size:" << boundaryProcAddressing.
size()
301 boundaryProcAddressing
310 const mapDistributePolyMesh& map,
311 const bool decompose,
312 refPtr<fileOperation>& writeHandler,
313 const faMesh* procMesh
317 << (decompose ?
"decompose" :
"reconstruct")
318 <<
") procAddressing files to " 327 (procMesh && !decompose ? procMesh->thisDb() :
mesh.
thisDb()),
335 ioAddr.rename(
"faceProcAddressing");
339 ioAddr.rename(
"edgeProcAddressing");
343 ioAddr.rename(
"pointProcAddressing");
347 ioAddr.rename(
"boundaryProcAddressing");
357 map.cellMap().distribute(
faceMap);
360 edgeMap =
identity(map.nOldFaces());
361 map.faceMap().distribute(edgeMap);
363 pointMap =
identity(map.nOldPoints());
364 map.distributePointData(pointMap);
366 patchMap =
identity(map.patchMap().constructSize());
367 map.patchMap().mapDistributeBase::distribute
382 map.cellMap().reverseDistribute(map.nOldCells(),
faceMap);
386 map.faceMap().reverseDistribute(map.nOldFaces(), edgeMap);
389 map.pointMap().reverseDistribute(map.nOldPoints(), pointMap);
392 map.patchMap().mapDistributeBase::reverseDistribute
395 map.oldPatchSizes().size(),
407 IOmapDistributePolyMeshRef procAddrMap
442 const bool faceOk =
faceMap.write();
443 const bool edgeOk = edgeMap.write();
444 const bool pointOk = pointMap.write();
445 const bool patchOk = patchMap.write();
449 if (!edgeOk || !faceOk || !pointOk || !patchOk)
452 <<
"Failed to write some of " 453 <<
faceMap.objectRelPath() <<
", " 454 << edgeMap.objectRelPath() <<
", " 455 << pointMap.objectRelPath() <<
", " 456 << patchMap.objectRelPath() <<
endl;
Finite area mesh (used for 2-D non-Euclidian finite area method) defined using a patch of faces on a ...
void size(const label n)
Older name for setAddressableSize.
errorManipArg< error, int > exit(error &err, const int errNo=1)
const fileName & facesInstance() const
Return the current instance directory for faces.
label nPoints() const noexcept
Number of mesh points.
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
constexpr char nl
The newline '\n' character (0x0a)
Ostream & endl(Ostream &os)
Add newline and flush stream.
static void gatherList(const UList< commsStruct > &comms, UList< T > &values, const int tag, const label comm)
Gather data, but keep individual values separate. Uses the specified communication schedule...
static bool & parRun() noexcept
Test if this a parallel run.
Class containing mesh-to-mesh mapping information after a mesh distribution where we send parts of me...
Ignore writing from objectRegistry::writeObject()
static int myProcNo(const label communicator=worldComm)
Rank of this process in the communicator (starting from masterNo()). Can be negative if the process i...
label nFaces() const noexcept
Number of mesh faces.
List< labelList > labelListList
List of labelList.
label nFaces() const noexcept
Number of patch faces.
label nPoints() const noexcept
Number of local mesh points.
Pair< int > faceMap(const label facePi, const face &faceP, const label faceNi, const face &faceN)
virtual const objectRegistry & thisDb() const
Return the object registry - resolve conflict polyMesh/lduMesh.
static label nProcs(const label communicator=worldComm)
Number of ranks in parallel run (for given communicator). It is 1 for serial run. ...
IOList< label > labelIOList
IO for a List of label.
labelList identity(const label len, label start=0)
Return an identity map of the given length with (map[i] == i), works like std::iota() but returning a...
static constexpr int masterNo() noexcept
Relative rank for the master process - is always 0.
label size() const noexcept
The number of entries in the list.
Reading is optional [identical to LAZY_READ].
label nEdges() const
Number of mesh edges.
static mapDistributePolyMesh createReconstructMap(const faMesh &mesh, const autoPtr< faMesh > &baseMeshPtr, const labelUList &faceProcAddr, const labelUList &edgeProcAddr, const labelUList &pointProcAddr, const labelUList &boundaryProcAddr)
const faBoundaryMesh & boundary() const noexcept
Return constant reference to boundary mesh.
label nEdges() const noexcept
Number of local mesh edges.
static word meshSubDir
The mesh sub-directory name (usually "faMesh")
Class containing processor-to-processor mapping information.
#define WarningInFunction
Report a warning using Foam::Warning.
static bool master(const label communicator=worldComm)
True if process corresponds to the master rank in the communicator.
Finite area boundary mesh.
fileName objectRelPath() const
The object path relative to the root.
"nonBlocking" (immediate) : (MPI_Isend, MPI_Irecv)
messageStream Info
Information stream (stdout output on master, null elsewhere)
const fvBoundaryMesh & boundary() const noexcept
Return reference to boundary mesh.
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
static const fileOperation & fileHandler()
Return the current file handler. Will create the default file handler if necessary.
List< label > labelList
A List of labels.
Defines the attributes of an object for which implicit objectRegistry management is supported...
labelList patchStarts() const
Return a list of patch start indices.
A List with indirect addressing.
Do not request registration (bool: false)
static constexpr const zero Zero
Global zero (0)