52 const word& fieldName,
58 const VolFieldType* fieldPtr = obr_.findObject<VolFieldType>(fieldName);
72 extents.
add(
C[i] - C0_);
86 Log <<
"field: " << fieldName <<
nl;
88 writeCurrentTime(file());
90 tmp<volScalarField> tmask = calcMask<Type>(*fieldPtr);
96 boundBox bb(extents(mask, mesh_.C()));
97 Log <<
" internal field: " << bb <<
nl;
100 this->setResult(fieldName +
"_internal_min", bb.min());
101 this->setResult(fieldName +
"_internal_max", bb.max());
105 for (
const label patchi : patchIDs_)
108 boundBox bb(extents(maskp, maskp.patch().Cf()));
109 const word& patchName = maskp.patch().name();
110 Log <<
" patch " << patchName <<
": " << bb <<
nl;
112 this->setResult(fieldName +
"_" + patchName +
"_min", bb.min());
113 this->setResult(fieldName +
"_" + patchName +
"_max", bb.max());
Graphite solid properties.
Generic GeometricField class.
A bounding box defined in terms of min/max extrema points.
const point & max() const noexcept
Maximum describing the bounding box.
void reduce()
Inplace parallel reduction of min/max values, using UPstream::worldComm.
const point & min() const noexcept
Minimum describing the bounding box.
bool empty() const
Bounding box is inverted, contains no points.
void add(const boundBox &bb)
Extend to include the second box.
void reset()
Reset to an inverted box.
scalar threshold_
Threshold value.
void calcFieldExtents(const word &fieldName, const bool calcMag=false)
Main calculation.
bool internalField_
Flag to write the internal field extents.
tmp< volScalarField > calcMask(const GeometricField< Type, fvPatchField, volMesh > &field) const
Return the field mask.
point C0_
Reference position.
labelList patchIDs_
Patches to assess.
const fvMesh & mesh_
Reference to the fvMesh.
const objectRegistry & obr_
Reference to the region objectRegistry.
void setResult(const word &entryName, const Type &value)
Add result.
virtual OFstream & file()
Return access to the file (if only 1).
virtual void writeCurrentTime(Ostream &os) const
Write the current time to stream.
const fvPatch & patch() const noexcept
Return the patch.
virtual const word & name() const
Return name.
const vectorField & Cf() const
Return face centres.
A class for managing temporary objects.
A class for handling words, derived from Foam::string.
dimensionedScalar pos(const dimensionedScalar &ds)
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
Ostream & endl(Ostream &os)
Add newline and flush stream.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
Field< vector > vectorField
Specialisation of Field<T> for vector.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
fvPatchField< scalar > fvPatchScalarField
constexpr char nl
The newline '\n' character (0x0a).
#define forAll(list, i)
Loop across all elements in list.