29 bool Foam::sampledSurface::checkFieldSize(
const Field<Type>& field)
const 40 <<
"field (" << field.size()
41 <<
") != surface (" <<
faces().
size() <<
")" 54 if (checkFieldSize(field))
78 if (checkFieldSize(field))
106 template<
class ReturnType,
class Type>
107 void Foam::sampledSurface::project
113 if (checkFieldSize(field))
119 res[facei] = field[facei] & (norm[facei]/
mag(norm[facei]));
129 template<
class ReturnType,
class Type>
130 void Foam::sampledSurface::project
136 project(res, field());
141 template<
class ReturnType,
class Type>
143 Foam::sampledSurface::project
149 project(tRes(), field);
184 for (
label pointi = 0; pointi < mesh.
nPoints(); pointi++)
190 label celli = pCells[i];
192 cellAvg[celli] += pfld[pointi];
193 nPointCells[celli]++;
199 cellAvg[celli] /= nPointCells[celli];
Type integrate(const Field< Type > &) const
Integration of a field across the surface.
#define forAll(list, i)
Loop across all elements in list.
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.
errorManipArg< error, int > exit(error &err, const int errNo=1)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
T & ref() const
Return non-const reference or generate a fatal error.
void size(const label)
Override size to be inconsistent with allocated storage.
Generic GeometricField class.
static word timeName(const scalar, const int precision=precision_)
Return time name of given scalar time.
Generic dimensioned Type class.
const Time & time() const
Return the top-level database.
dimensioned< Type > sum(const DimensionedField< Type, GeoMesh > &df)
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.
Pre-declare SubField and related Field type.
void clear()
Clear the list, i.e. set size to zero.
Type average(const Field< Type > &) const
Area-averaged value of a field across the surface.
scalar area() const
The total surface area.
const polyMesh & mesh() const
Access to the underlying mesh.
const labelListList & pointCells() const
const Mesh & mesh() const
Return mesh.
virtual const vectorField & Sf() const
Return face area vectors.
void reduce(const List< UPstream::commsStruct > &comms, T &Value, const BinaryOp &bop, const int tag, const label comm)
const dimensionSet dimless(0, 0, 0, 0, 0, 0, 0)
virtual const scalarField & magSf() const
Return face area magnitudes.
Mesh data needed to do the Finite Volume discretisation.
void correctBoundaryConditions()
Correct boundary field.
dimensioned< scalar > mag(const dimensioned< Type > &)
A class for managing temporary objects.
const objectRegistry & db() const
Return the local objectRegistry.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...