34 namespace sampledSurfaces
44 bool Foam::sampledSurfaces::thresholdCellFaces::updateGeometry()
const 46 const fvMesh& fvm =
static_cast<const fvMesh&
>(
mesh());
49 if (fvm.time().timeIndex() == prevTimeIndex_)
54 prevTimeIndex_ = fvm.time().timeIndex();
57 autoPtr<volScalarField> readFieldPtr_;
78 <<
"Reading " << fieldName_
79 <<
" from time " << fvm.time().timeName()
90 fvm.time().timeName(),
100 cellFldPtr = readFieldPtr_.operator->();
108 cellFld.primitiveField(),
114 const_cast<thresholdCellFaces&
> 118 meshCells_.transfer(surf.meshCells());
125 Pout<<
"thresholdCellFaces::updateGeometry() : constructed" 127 <<
" field : " << fieldName_ <<
nl 128 <<
" lowerLimit : " << lowerThreshold_ <<
nl 129 <<
" upperLimit : " << upperThreshold_ <<
nl 130 <<
" point : " <<
points().size() <<
nl 131 <<
" faces : " << faces().size() <<
nl 132 <<
" cut cells : " << meshCells_.size() <<
endl;
149 fieldName_(dict.
lookup(
"field")),
156 if (!dict.
found(
"lowerLimit") && !dict.
found(
"upperLimit"))
159 <<
"require at least one of 'lowerLimit' or 'upperLimit'" <<
endl 190 if (prevTimeIndex_ == -1)
203 return updateGeometry();
213 return sampleField(vField);
223 return sampleField(vField);
233 return sampleField(vField);
243 return sampleField(vField);
253 return sampleField(vField);
263 return interpolateField(interpolator);
273 return interpolateField(interpolator);
282 return interpolateField(interpolator);
292 return interpolateField(interpolator);
302 return interpolateField(interpolator);
308 os <<
"thresholdCellFaces: " <<
name() <<
" :" 309 <<
" field:" << fieldName_
310 <<
" lowerLimit:" << lowerThreshold_
311 <<
" upperLimit:" << upperThreshold_;
virtual bool update()
Update the surface as required.
Selects the mesh cell faces specified by a threshold value. Non-triangulated by default.
bool found(const word &, bool recursive=false, bool patternMatch=true) const
Search dictionary for given keyword.
thresholdCellFaces(const word &name, const polyMesh &, const dictionary &)
Construct from dictionary.
virtual wordList fields() const
Return the list of fields required.
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.
defineTypeNameAndDebug(distanceSurface, 0)
bool interpolate() const
Interpolation requested for surface.
Ostream & endl(Ostream &os)
Add newline and flush stream.
void transfer(MeshedSurface< face > &)
Transfer the contents of the argument and annul the argument.
const Time & time() const
Return the top-level database.
virtual bool needsUpdate() const
Does the surface need an update?
Macros for easy insertion into run-time selection tables.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
virtual tmp< scalarField > sample(const volScalarField &) const
Sample field on surface.
virtual void clearGeom() const
A class for handling words, derived from string.
errorManip< error > abort(error &err)
An Ostream is an abstract base class for all output systems (streams, files, token lists...
addToRunTimeSelectionTable(sampledSurface, distanceSurface, word)
word name(const complex &)
Return a string representation of a complex.
List< word > wordList
A List of words.
virtual bool expire()
Mark the surface as needing an update.
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")
virtual ~thresholdCellFaces()
Destructor.
Mesh data needed to do the Finite Volume discretisation.
Mesh consisting of general polyhedral cells.
A class for managing temporary objects.
virtual void print(Ostream &) const
Write.
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.