44 const label oldi = newToOld[i];
48 newElems[i] = elems[oldi];
63 if (values.
size() != isMasterElem.
size())
66 <<
"Number of elements in list " << values.
size()
67 <<
" does not correspond to number of elements in isMasterElem " 68 << isMasterElem.
size()
107 const label nBFaces = mesh_.nFaces() - mesh_.nInternalFaces();
109 if (faceData.
size() != nBFaces || syncedFaceData.
size() != nBFaces)
112 <<
"Boundary faces:" << nBFaces
113 <<
" faceData:" << faceData.
size()
114 <<
" syncedFaceData:" << syncedFaceData.
size()
124 label bFacei = pp.
start() - mesh_.nInternalFaces();
128 const T& data = faceData[bFacei];
129 const T& syncData = syncedFaceData[bFacei];
131 if (
mag(data - syncData) > tol)
139 <<
" fc:" << mesh_.faceCentres()[facei]
140 <<
" patch:" << pp.
name()
141 <<
" faceData:" << data
142 <<
" syncedFaceData:" << syncData
143 <<
" diff:" <<
mag(data - syncData)
172 Pstream::commsTypes::blocking
183 Pstream::commsTypes::blocking
193 label allPointi = visitOrder[i];
194 Info<< allPoints[allPointi] <<
" : " << allData[allPointi]
203 const Enum& namedEnum,
211 const int index = namedEnum[words[i]];
212 const int val = 1<<index;
234 || edges.
size() != edgeWeights.
size()
235 || meshPoints.
size() != pointData.
size()
239 <<
"Inconsistent sizes for edge or point data:" 240 <<
" isMasterEdge:" << isMasterEdge.
size()
241 <<
" edgeWeights:" << edgeWeights.
size()
242 <<
" edges:" << edges.
size()
243 <<
" pointData:" << pointData.
size()
244 <<
" meshPoints:" << meshPoints.
size()
253 if (isMasterEdge[edgei])
255 const edge&
e = edges[edgei];
257 const scalar eWeight = edgeWeights[edgei];
259 const label v0 = e[0];
260 const label v1 = e[1];
262 sum[v0] += eWeight*pointData[v1];
263 sum[v1] += eWeight*pointData[v0];
267 syncTools::syncPointList
const fvPatchList & patches
#define forAll(list, i)
Loop across all elements in list.
const word & name() const
Return name.
void sortedOrder(const UList< T > &, labelList &order)
Generate the (stable) sort order for the list.
errorManipArg< error, int > exit(error &err, const int errNo=1)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
void size(const label)
Override size to be inconsistent with allocated storage.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Traits class for primitives.
labelList identity(const label len)
Create identity map (map[i] == i) of given length.
static void updateList(const labelList &newToOld, const T &nullValue, List< T > &elems)
Helper: reorder list according to map.
Calculates a unique integer (label so might not have enough room - 2G max) for processor + local inde...
static void weightedSum(const polyMesh &mesh, const PackedBoolList &isMasterEdge, const labelList &meshPoints, const edgeList &edges, const scalarField &edgeWeights, const Field< Type > &data, Field< Type > &sum)
Helper: weighted sum (over all subset of mesh points) by.
An edge is a list of two point labels. The functionality it provides supports the discretisation on a...
void testSyncBoundaryFaceList(const scalar mergeDistance, const string &, const UList< T > &, const UList< T > &) const
Compare two lists over all boundary faces.
errorManip< error > abort(error &err)
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
static int readFlags(const Enum &namedEnum, const wordList &)
Helper: convert wordList into bit pattern using provided.
void reduce(const List< UPstream::commsStruct > &comms, T &Value, const BinaryOp &bop, const int tag, const label comm)
Calculates points shared by more than two processor patches or cyclic patches.
void setSize(const label)
Reset size of List.
static void collectAndPrint(const UList< point > &points, const UList< T > &data)
Print list according to (collected and) sorted coordinate.
static T gAverage(const PackedBoolList &isMasterElem, const UList< T > &values)
Helper: calculate average.
vector point
Point is a vector.
label start() const
Return start label of this patch in the polyMesh face list.
dimensioned< scalar > mag(const dimensioned< Type > &)
label size() const
Number of entries.
Mesh consisting of general polyhedral cells.
A patch is a list of labels that address the faces in the global face list.
label size() const
Return the number of elements in the UList.
void transfer(List< T > &)
Transfer the contents of the argument List into this list.
const dimensionedScalar e
Elementary charge.