Go to the documentation of this file.
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)
195 label allPointI = visitOrder[i];
203 template<
class GeoField>
207 const word& patchFieldType
212 mesh.objectRegistry::lookupClass<GeoField>()
217 GeoField&
fld = *iter();
218 typename GeoField::GeometricBoundaryField& bfld =
fld.boundaryField();
220 label sz = bfld.size();
229 fld.dimensionedInternalField()
237 template<
class GeoField>
246 mesh.objectRegistry::lookupClass<GeoField>()
251 GeoField&
fld = *iter();
252 typename GeoField::GeometricBoundaryField& bfld =
fld.boundaryField();
254 bfld.reorder(oldToNew);
262 const Enum& namedEnum,
270 int index = namedEnum[words[i]];
293 || edges.
size() != edgeWeights.size()
298 <<
"Inconsistent sizes for edge or point data:"
299 <<
" isMasterEdge:" << isMasterEdge.
size()
300 <<
" edgeWeights:" << edgeWeights.size()
301 <<
" edges:" << edges.
size()
303 <<
" meshPoints:" << meshPoints.
size()
307 sum.setSize(meshPoints.
size());
312 if (isMasterEdge[edgeI])
314 const edge&
e = edges[edgeI];
316 scalar eWeight = edgeWeights[edgeI];
326 syncTools::syncPointList
Calculates points shared by more than two processor patches or cyclic patches.
A class for handling words, derived from string.
autoPtr< BasicCompressibleTurbulenceModel > New(const volScalarField &rho, const volVectorField &U, const surfaceScalarField &phi, const typename BasicCompressibleTurbulenceModel::transportModel &transport, const word &propertiesName)
#define forAllIter(Container, container, iter)
Iterate across all elements in the container object of type.
#define forAll(list, i)
Loop across all elements in list.
An edge is a list of two point labels. The functionality it provides supports the discretisation on a...
void transfer(List< T > &)
Transfer the contents of the argument List into this list.
Variant of pointEdgePoint with some transported additional data. WIP - should be templated on data li...
Ostream & endl(Ostream &os)
Add newline and flush stream.
dimensioned< scalar > mag(const dimensioned< Type > &)
Mesh consisting of general polyhedral cells.
static void updateList(const labelList &newToOld, const T &nullValue, List< T > &elems)
Helper: reorder list according to map.
void sortedOrder(const UList< T > &, labelList &order)
Generate the (stable) sort order for the list.
void reduce(const List< UPstream::commsStruct > &comms, T &Value, const BinaryOp &bop, const int tag, const label comm)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Pre-declare SubField and related Field type.
A patch is a list of labels that address the faces in the global face list.
static void reorderPatchFields(fvMesh &, const labelList &oldToNew)
Reorder patchfields of all fields on mesh.
static void collectAndPrint(const UList< point > &points, const UList< T > &data)
Print list according to (collected and) sorted coordinate.
labelList identity(const label len)
Create identity map (map[i] == i) of given length.
static int readFlags(const Enum &namedEnum, const wordList &)
Helper: convert wordList into bit pattern using provided.
gmvFile<< "tracers "<< particles.size()<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().x()<< ' ';}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().y()<< ' ';}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().z()<< ' ';}gmvFile<< nl;forAll(lagrangianScalarNames, i){ const word &name=lagrangianScalarNames[i];IOField< scalar > fld(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
static void addPatchFields(fvMesh &, const word &patchFieldType)
Add patchfield of given type to all fields on mesh.
void testSyncBoundaryFaceList(const scalar mergeDistance, const string &, const UList< T > &, const UList< T > &) const
Compare two lists over all boundary faces.
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.
Mesh data needed to do the Finite Volume discretisation.
errorManip< error > abort(error &err)
Calculates a unique integer (label so might not have enough room - 2G max) for processor + local inde...
label start() const
Return start label of this patch in the polyMesh face list.
errorManipArg< error, int > exit(error &err, const int errNo=1)
An STL-conforming hash table.
static T gAverage(const PackedBoolList &isMasterElem, const UList< T > &values)
Helper: calculate average.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Traits class for primitives.
const dimensionedScalar e
Elementary charge.
dimensioned< Type > sum(const DimensionedField< Type, GeoMesh > &df)
label size() const
Number of entries.
void size(const label)
Override size to be inconsistent with allocated storage.
vector point
Point is a vector.
label size() const
Return the number of elements in the UList.
const word & name() const
Return name.
Database for solution data, solver performance and other reduced data.