45 label oldI = newToOld[i];
49 newElems[i] = elems[oldI];
64 if (values.
size() != isMasterElem.
size())
67 <<
"Number of elements in list " << values.
size()
68 <<
" does not correspond to number of elements in isMasterElem " 69 << isMasterElem.
size()
109 label nBFaces = mesh_.nFaces() - mesh_.nInternalFaces();
111 if (faceData.
size() != nBFaces || syncedFaceData.
size() != nBFaces)
114 <<
"Boundary faces:" << nBFaces
115 <<
" faceData:" << faceData.
size()
116 <<
" syncedFaceData:" << syncedFaceData.
size()
126 label bFacei = pp.
start() - mesh_.nInternalFaces();
130 const T& data = faceData[bFacei];
131 const T& syncData = syncedFaceData[bFacei];
133 if (
mag(data - syncData) > tol)
141 <<
" fc:" << mesh_.faceCentres()[facei]
142 <<
" patch:" << pp.
name()
143 <<
" faceData:" << data
144 <<
" syncedFaceData:" << syncData
145 <<
" diff:" <<
mag(data - syncData)
174 Pstream::commsTypes::blocking
185 Pstream::commsTypes::blocking
195 label allPointi = visitOrder[i];
196 Info<< allPoints[allPointi] <<
" : " << allData[allPointi]
205 const Enum& namedEnum,
213 int index = namedEnum[words[i]];
236 || edges.
size() != edgeWeights.
size()
237 || meshPoints.
size() != pointData.
size()
241 <<
"Inconsistent sizes for edge or point data:" 242 <<
" isMasterEdge:" << isMasterEdge.
size()
243 <<
" edgeWeights:" << edgeWeights.
size()
244 <<
" edges:" << edges.
size()
245 <<
" pointData:" << pointData.
size()
246 <<
" meshPoints:" << meshPoints.
size()
255 if (isMasterEdge[edgeI])
257 const edge&
e = edges[edgeI];
259 scalar eWeight = edgeWeights[edgeI];
264 sum[v0] += eWeight*pointData[v1];
265 sum[v1] += eWeight*pointData[v0];
269 syncTools::syncPointList
#define forAll(list, i)
Loop across all elements in list.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
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...
volScalarField & e
Elementary charge.
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.