42void Foam::faMeshDistributor::createPatchMaps()
const
44 const faBoundaryMesh& oldPatches = srcMesh_.
boundary();
45 const faBoundaryMesh& newPatches = tgtMesh_.
boundary();
47 patchEdgeMaps_.clear();
48 patchEdgeMaps_.resize(oldPatches.size());
51 const auto& faEdgeMap = distMap_.
faceMap();
54 List<labelRange> ranges = newPatches.patchRanges();
58 if (!isA<processorFaPatch>(oldPatches[patchi]))
66 new mapDistributeBase(faEdgeMap)
70 patchEdgeMaps_[patchi].compactRemoteData
72 bitSet(ranges[patchi]),
81void Foam::faMeshDistributor::createInternalEdgeMap()
const
84 const auto& faEdgeMap = distMap_.faceMap();
87 internalEdgeMap_.reset(
new mapDistributeBase(faEdgeMap));
90 internalEdgeMap_->compactRemoteData
92 bitSet(tgtMesh_.nInternalEdges(),
true),
106 const bool isWriteProc
114 isWriteProc_(isWriteProc)
131 if (!
diff.empty() && !
diff.uniform())
133 forAll(oldFaceCentres, facei)
135 if (oldFaceCentres[facei] != newFaceCentres[facei])
137 Pout<<
"face: " << facei
138 <<
' ' << oldFaceCentres[facei]
139 <<
" vs " << newFaceCentres[facei]
157 Pout<<
"distributed edges: " << oldEdgeCentres.
size() <<
" from "
165 if (!
diff.empty() && !
diff.uniform())
167 forAll(oldEdgeCentres, edgei)
169 if (oldEdgeCentres[edgei] != newEdgeCentres[edgei])
171 Pout<<
"edge: " << edgei
172 <<
' ' << oldEdgeCentres[edgei]
173 <<
" vs " << newEdgeCentres[edgei]
180 forAll(patchEdgeMaps_, patchi)
182 if (patchEdgeMaps_.set(patchi))
184 Pout<<
"patch " << patchi <<
" : "
185 << patchEdgeMaps_[patchi].info() <<
endl;
191 forAll(patchEdgeMaps_, patchi)
193 if (patchEdgeMaps_.set(patchi))
195 Info<<
"patch " << patchi <<
" : "
196 << patchEdgeMaps_[patchi] <<
endl;
215 nTotal += distributeAreaFields<scalar>(objects, selected);
216 nTotal += distributeAreaFields<vector>(objects, selected);
217 nTotal += distributeAreaFields<symmTensor>(objects, selected);
218 nTotal += distributeAreaFields<sphericalTensor>(objects, selected);
219 nTotal += distributeAreaFields<tensor>(objects, selected);
221 nTotal += distributeEdgeFields<scalar>(objects, selected);
222 nTotal += distributeEdgeFields<vector>(objects, selected);
223 nTotal += distributeEdgeFields<symmTensor>(objects, selected);
224 nTotal += distributeEdgeFields<sphericalTensor>(objects, selected);
225 nTotal += distributeEdgeFields<tensor>(objects, selected);
List of IOobjects with searching and retrieving facilities.
void size(const label n)
Older name for setAddressableSize.
static int & msgType() noexcept
Message tag of standard messages.
Holds a reference to the original mesh (the baseMesh) and optionally to a subset of that mesh (the su...
static int verbose_
Output verbosity when writing.
label distributeAllFields(const IOobjectList &objects, const wordRes &selectedFields=wordRes()) const
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.
const edgeVectorField & edgeCentres() const
Return edge centres as edgeVectorField.
const labelList & faceLabels() const noexcept
Return the underlying polyMesh face labels.
const areaVectorField & areaCentres() const
Return face centres as areaVectorField.
Class containing mesh-to-mesh mapping information after a mesh distribution where we send parts of me...
void distributeCellData(List< T > &values) const
Distribute list of cell data.
void distributeFaceData(List< T > &values) const
Distribute list of face data.
const mapDistribute & faceMap() const noexcept
Face distribute map.
A List of wordRe with additional matching capabilities.
messageStream Info
Information stream (stdout output on master, null elsewhere)
Ostream & endl(Ostream &os)
Add newline and flush stream.
scalar diff(const triad &A, const triad &B)
Return a quantity of the difference between two triads.
prefixOSstream Pout
OSstream wrapped stdout (std::cout) with parallel prefix.
constexpr char nl
The newline '\n' character (0x0a)
#define forAll(list, i)
Loop across all elements in list.