42 sampledThresholdCellFaces,
50 bool Foam::sampledThresholdCellFaces::updateGeometry()
const 52 const fvMesh& fvm =
static_cast<const fvMesh&
>(
mesh());
55 if (fvm.time().timeIndex() == prevTimeIndex_)
60 prevTimeIndex_ = fvm.time().timeIndex();
63 autoPtr<volScalarField> readFieldPtr_;
84 <<
"Reading " << fieldName_
85 <<
" from time " << fvm.time().timeName()
96 fvm.time().timeName(),
106 cellFldPtr = readFieldPtr_.operator->();
111 thresholdCellFaces surf
114 cellFld.primitiveField(),
120 const_cast<sampledThresholdCellFaces&
> 124 meshCells_.transfer(surf.meshCells());
131 Pout<<
"sampledThresholdCellFaces::updateGeometry() : constructed" 133 <<
" field : " << fieldName_ <<
nl 134 <<
" lowerLimit : " << lowerThreshold_ <<
nl 135 <<
" upperLimit : " << upperThreshold_ <<
nl 137 <<
" faces : " << faces().size() <<
nl 138 <<
" cut cells : " << meshCells_.size() <<
endl;
155 fieldName_(dict.
lookup(
"field")),
163 if (!dict.
found(
"lowerLimit") && !dict.
found(
"upperLimit"))
166 <<
"require at least one of 'lowerLimit' or 'upperLimit'" <<
endl 191 if (prevTimeIndex_ == -1)
204 return updateGeometry();
213 return sampleField(vField);
222 return sampleField(vField);
231 return sampleField(vField);
240 return sampleField(vField);
249 return sampleField(vField);
258 return interpolateField(interpolator);
267 return interpolateField(interpolator);
276 return interpolateField(interpolator);
285 return interpolateField(interpolator);
294 return interpolateField(interpolator);
300 os <<
"sampledThresholdCellFaces: " <<
name() <<
" :" 301 <<
" field:" << fieldName_
302 <<
" lowerLimit:" << lowerThreshold_
303 <<
" upperLimit:" << upperThreshold_;
virtual ~sampledThresholdCellFaces()
Destructor.
virtual bool update()
Update the surface as required.
bool found(const word &, bool recursive=false, bool patternMatch=true) const
Search dictionary for given keyword.
A list of keyword definitions, which are a keyword followed by any number of values (e...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
An abstract class for surfaces with sampling.
void size(const label)
Override size to be inconsistent with allocated storage.
bool interpolate() const
Interpolation requested for surface.
Ostream & endl(Ostream &os)
Add newline and flush stream.
virtual bool needsUpdate() const
Does the surface need an update?
void transfer(MeshedSurface< face > &)
Transfer the contents of the argument and annul the argument.
const Time & time() const
Return the top-level database.
Macros for easy insertion into run-time selection tables.
sampledThresholdCellFaces(const word &name, const polyMesh &, const dictionary &)
Construct from dictionary.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
virtual void print(Ostream &) const
Write.
virtual void clearGeom() const
A class for handling words, derived from string.
virtual bool expire()
Mark the surface as needing an update.
errorManip< error > abort(error &err)
An Ostream is an abstract base class for all output systems (streams, files, token lists...
defineTypeNameAndDebug(combustionModel, 0)
word name(const complex &)
Return a string representation of a complex.
addNamedToRunTimeSelectionTable(GAMGProcAgglomeration, noneGAMGProcAgglomeration, GAMGAgglomeration, none)
label timeIndex() const
Return current time index.
T lookupOrDefault(const word &, const T &, bool recursive=false, bool patternMatch=true) const
Find and return a T,.
prefixOSstream Pout(cout, "Pout")
Mesh data needed to do the Finite Volume discretisation.
Mesh consisting of general polyhedral cells.
A class for managing temporary objects.
static const keyType null
An empty keyType.
virtual tmp< scalarField > sample(const volScalarField &) const
Sample field on surface.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
#define InfoInFunction
Report an information message using Foam::Info.