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)
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()
239 <<
"Inconsistent sizes for edge or point data:"
240 <<
" isMasterEdge:" << isMasterEdge.
size()
241 <<
" edgeWeights:" << edgeWeights.
size()
242 <<
" edges:" << edges.
size()
244 <<
" meshPoints:" << meshPoints.
size()
248 sum.setSize(meshPoints.
size());
253 if (isMasterEdge[edgei])
255 const edge&
e = edges[edgei];
257 const scalar eWeight = edgeWeights[edgei];
#define forAll(list, i)
Loop across all elements in list.
void transfer(List< T > &)
Transfer the contents of the argument List into this list.
void size(const label)
Override size to be inconsistent with allocated storage.
label size() const
Number of entries.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
label size() const
Return the number of elements in the UList.
static label worldComm
Default communicator (all processors)
static label nProcs(const label communicator=0)
Number of processes in parallel run.
static int & msgType()
Message tag of standard messages.
An edge is a list of two point labels. The functionality it provides supports the discretisation on a...
Calculates a unique integer (label so might not have enough room - 2G max) for processor + local inde...
Calculates points shared by more than two processor patches or cyclic patches.
static int readFlags(const Enum &namedEnum, const wordList &)
Helper: convert wordList into bit pattern using provided.
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.
void testSyncBoundaryFaceList(const scalar mergeDistance, const string &, const UList< T > &, const UList< T > &) const
Compare two lists over all boundary faces.
static void updateList(const labelList &newToOld, const T &nullValue, List< T > &elems)
Helper: reorder list according to map.
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.
Traits class for primitives.
const word & name() const
Return name.
Variant of pointEdgePoint with some transported additional data. WIP - should be templated on data li...
Mesh consisting of general polyhedral cells.
A patch is a list of labels that address the faces in the global face list.
label start() const
Return start label of this patch in the polyMesh face list.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
const fvPatchList & patches
errorManipArg< error, int > exit(error &err, const int errNo=1)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Ostream & endl(Ostream &os)
Add newline and flush stream.
dimensioned< Type > sum(const DimensionedField< Type, GeoMesh > &df)
errorManip< error > abort(error &err)
vector point
Point is a vector.
void reduce(const List< UPstream::commsStruct > &comms, T &Value, const BinaryOp &bop, const int tag, const label comm)
dimensioned< scalar > mag(const dimensioned< Type > &)
labelList identityMap(const label len)
Create identity map (map[i] == i) of given length.
void sortedOrder(const UList< T > &, labelList &order)
Generate the (stable) sort order for the list.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)