Go to the documentation of this file.
49 label nPatchPatchPoints = 0;
53 if (!isA<emptyPolyPatch>(bm[
patchi]))
55 nPatchPatchPoints += bm[
patchi].boundaryPoints().
size();
60 typename FldType::GeometricBoundaryField& bFld = pf.
boundaryField();
67 bFld[
patchi].initEvaluate(Pstream::blocking);
72 bFld[
patchi].evaluate(Pstream::blocking);
79 nPatchPatchPoints = 0;
83 if (!isA<emptyPolyPatch>(bm[
patchi]))
90 label ppp = meshPoints[bp[pointi]];
91 boundaryPointValues[nPatchPatchPoints++] = pf[ppp];
104 nPatchPatchPoints = 0;
108 if (!isA<emptyPolyPatch>(bm[
patchi]))
115 label ppp = meshPoints[bp[pointi]];
117 const Type& savedVal = boundaryPointValues[nPatchPatchPoints++];
119 if (savedVal != pf[ppp])
122 <<
"Patch fields are not consistent on mesh point "
123 << ppp <<
" coordinate " <<
mesh.points()[ppp]
126 <<
"Reverse evaluation gives value " << savedVal
127 <<
" , forward evaluation gives value " << pf[ppp]
151 "avg("+
fld.name()+
')',
152 fld.time().timeName(),
179 if (isMasterEdge_.get(edgeI) == 1)
181 const edge&
e = edges[edgeI];
182 const scalar
w = edgeWeight[edgeI];
185 sumWeight[
e[0]] +=
w;
188 sumWeight[
e[1]] +=
w;
196 syncTools::syncPointList
203 syncTools::syncPointList
217 if (
mag(sumWeight[pointI]) < VSMALL)
220 res[pointI] =
fld[pointI];
224 res[pointI] /= sumWeight[pointI];
249 if (isInternalPoint(pointI))
251 newFld[pointI] = 0.5*
fld[pointI] + 0.5*avgFld[pointI];
261 template<
class Type,
class CombineOp>
265 const CombineOp& cop,
272 Pout<<
"testSyncField : testing synchronisation of Field<Type>."
278 syncTools::syncPointList
288 if (
mag(syncedFld[i] -
fld[i]) > maxMag)
291 <<
"On element " << i <<
" value:" <<
fld[i]
292 <<
" synchronised value:" << syncedFld[i]
tmp< GeometricField< Type, pointPatchField, pointMesh > > avg(const GeometricField< Type, pointPatchField, pointMesh > &fld, const scalarField &edgeWeight) const
Average of connected points.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
volScalarField w(IOobject("w", runTime.timeName(), mesh, IOobject::READ_IF_PRESENT, IOobject::NO_WRITE), mesh, dimensionedScalar("w", dimensionSet(0, 0, 0, 0, 0, 0, 0), 0.0))
autoPtr< BasicCompressibleTurbulenceModel > New(const volScalarField &rho, const volVectorField &U, const surfaceScalarField &phi, const typename BasicCompressibleTurbulenceModel::transportModel &transport, const word &propertiesName)
#define forAll(list, i)
Loop across all elements in list.
A class for managing temporary objects.
An edge is a list of two point labels. The functionality it provides supports the discretisation on a...
void testSyncField(const Field< Type > &, const CombineOp &cop, const Type &zero, const scalar maxMag) const
Test synchronisation of generic field (not positions!) on points.
GeometricBoundaryField & boundaryField()
Return reference to GeometricBoundaryField.
Ostream & endl(Ostream &os)
Add newline and flush stream.
dimensioned< scalar > mag(const dimensioned< Type > &)
Mesh consisting of general polyhedral cells.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
static void checkConstraints(GeometricField< Type, pointPatchField, pointMesh > &)
Check constraints.
const word & name() const
Return name.
#define forAllReverse(list, i)
Reverse loop across all elements in list.
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))
errorManip< error > abort(error &err)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
prefixOSstream Pout(cout, "Pout")
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.
void smooth(const GeometricField< Type, pointPatchField, pointMesh > &fld, const scalarField &edgeWeight, GeometricField< Type, pointPatchField, pointMesh > &newFld) const
Fully explicit smoothing of fields (not positions)
label size() const
Return the number of elements in the PtrList.
Generic GeometricField class.
A class representing the concept of 0 used to avoid unnecessary manipulations for objects that are kn...