43 sampledThresholdCellFaces,
51 bool Foam::sampledThresholdCellFaces::updateGeometry()
const 53 const fvMesh& fvm =
static_cast<const fvMesh&
>(
mesh());
56 if (fvm.time().timeIndex() == prevTimeIndex_)
61 prevTimeIndex_ = fvm.time().timeIndex();
64 autoPtr<volScalarField> readFieldPtr_;
73 Info<<
"sampledThresholdCellFaces::updateGeometry() : lookup " 74 << fieldName_ <<
endl;
85 Info<<
"sampledThresholdCellFaces::updateGeometry() : reading " 86 << fieldName_ <<
" from time " << fvm.time().timeName()
97 fvm.time().timeName(),
107 cellFldPtr = readFieldPtr_.operator->();
112 thresholdCellFaces surf
115 cellFld.internalField(),
121 const_cast<sampledThresholdCellFaces&
> 125 meshCells_.transfer(surf.meshCells());
132 Pout<<
"sampledThresholdCellFaces::updateGeometry() : constructed" 134 <<
" field : " << fieldName_ <<
nl 135 <<
" lowerLimit : " << lowerThreshold_ <<
nl 136 <<
" upperLimit : " << upperThreshold_ <<
nl 138 <<
" faces : " << faces().size() <<
nl 139 <<
" cut cells : " << meshCells_.size() <<
endl;
156 fieldName_(dict.
lookup(
"field")),
164 if (!dict.
found(
"lowerLimit") && !dict.
found(
"upperLimit"))
168 "sampledThresholdCellFaces::sampledThresholdCellFaces(..)" 170 <<
"require at least one of 'lowerLimit' or 'upperLimit'" <<
endl 203 if (prevTimeIndex_ == -1)
216 return updateGeometry();
225 return sampleField(vField);
234 return sampleField(vField);
243 return sampleField(vField);
252 return sampleField(vField);
261 return sampleField(vField);
270 return interpolateField(interpolator);
279 return interpolateField(interpolator);
288 return interpolateField(interpolator);
297 return interpolateField(interpolator);
306 return interpolateField(interpolator);
312 os <<
"sampledThresholdCellFaces: " <<
name() <<
" :" 313 <<
" field:" << fieldName_
314 <<
" lowerLimit:" << lowerThreshold_
315 <<
" upperLimit:" << upperThreshold_;
bool found(const word &, bool recursive=false, bool patternMatch=true) const
Search dictionary for given keyword.
const pointField & points
virtual void print(Ostream &) const
Write.
Mesh data needed to do the Finite Volume discretisation.
An abstract class for surfaces with sampling.
word name(const complex &)
Return a string representation of a complex.
virtual bool expire()
Mark the surface as needing an update.
virtual tmp< scalarField > sample(const volScalarField &) const
Sample field on surface.
A class for handling words, derived from string.
void size(const label)
Override size to be inconsistent with allocated storage.
A list of keyword definitions, which are a keyword followed by any number of values (e...
const Time & time() const
Return the top-level database.
Ostream & endl(Ostream &os)
Add newline and flush stream.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
label timeIndex() const
Return current time index.
static const keyType null
An empty keyType.
virtual bool needsUpdate() const
Does the surface need an update?
virtual void clearGeom() const
Macros for easy insertion into run-time selection tables.
errorManip< error > abort(error &err)
bool interpolate() const
Interpolation requested for surface.
#define FatalErrorIn(functionName)
Report an error message using Foam::FatalError.
Mesh consisting of general polyhedral cells.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
T lookupOrDefault(const word &, const T &, bool recursive=false, bool patternMatch=true) const
Find and return a T,.
virtual ~sampledThresholdCellFaces()
Destructor.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
virtual bool update()
Update the surface as required.
void transfer(MeshedSurface< face > &)
Transfer the contents of the argument and annul the argument.
addNamedToRunTimeSelectionTable(GAMGProcAgglomeration, noneGAMGProcAgglomeration, GAMGAgglomeration, none)
sampledThresholdCellFaces(const word &name, const polyMesh &, const dictionary &)
Construct from dictionary.
A class for managing temporary objects.
defineTypeNameAndDebug(combustionModel, 0)
prefixOSstream Pout(cout,"Pout")