29 bool Foam::sampledSurface::checkFieldSize(
const Field<Type>& field)
const 40 "sampledSurface::checkFieldSize(const Field<Type>&) const" 43 <<
"field (" << field.size()
44 <<
") != surface (" <<
faces().
size() <<
")" 57 if (checkFieldSize(field))
81 if (checkFieldSize(field))
109 template<
class ReturnType,
class Type>
110 void Foam::sampledSurface::project
116 if (checkFieldSize(field))
122 res[faceI] = field[faceI] & (norm[faceI]/
mag(norm[faceI]));
132 template<
class ReturnType,
class Type>
133 void Foam::sampledSurface::project
139 project(res, field());
144 template<
class ReturnType,
class Type>
146 Foam::sampledSurface::project
152 project(tRes(), field);
187 for (
label pointI = 0; pointI < mesh.
nPoints(); pointI++)
193 label cellI = pCells[i];
195 cellAvg[cellI] += pfld[pointI];
196 nPointCells[cellI]++;
202 cellAvg[cellI] /= nPointCells[cellI];
void reduce(const List< UPstream::commsStruct > &comms, T &Value, const BinaryOp &bop, const int tag, const label comm)
Mesh data needed to do the Finite Volume discretisation.
dimensioned< scalar > mag(const dimensioned< Type > &)
bool empty() const
Return true if the UList is empty (ie, size() is zero).
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 word timeName(const scalar, const int precision=precision_)
Return time name of given scalar time.
Type integrate(const Field< Type > &) const
Integration of a field across the surface.
void size(const label)
Override size to be inconsistent with allocated storage.
errorManipArg< error, int > exit(error &err, const int errNo=1)
const labelListList & pointCells() const
const polyMesh & mesh() const
Access to the underlying mesh.
virtual const scalarField & magSf() const
Return face area magnitudes.
const Mesh & mesh() const
Return mesh.
Type average(const Field< Type > &) const
Area-averaged value of a field across the surface.
const Time & time() const
Return the top-level database.
void clear()
Clear the list, i.e. set size to zero.
virtual const vectorField & Sf() const
Return face area vectors.
Generic dimensioned Type class.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
dimensioned< Type > sum(const DimensionedField< Type, GeoMesh > &df)
Pre-declare SubField and related Field type.
scalar area() const
The total surface area.
#define FatalErrorIn(functionName)
Report an error message using Foam::FatalError.
Generic GeometricField class.
Traits class for primitives.
void correctBoundaryConditions()
Correct boundary field.
const dimensionSet dimless(0, 0, 0, 0, 0, 0, 0)
virtual const faceList & faces() const =0
Faces of surface.
tmp< GeometricField< Type, fvPatchField, volMesh > > pointAverage(const GeometricField< Type, pointPatchField, pointMesh > &pfld) const
Interpolate from points to cell centre.
const objectRegistry & db() const
Return the local objectRegistry.
A class for managing temporary objects.