Go to the documentation of this file.
45 sampledThresholdCellFaces,
53 bool Foam::sampledThresholdCellFaces::updateGeometry()
const
55 const fvMesh& fvm =
static_cast<const fvMesh&
>(
mesh());
58 if (fvm.time().timeIndex() == prevTimeIndex_)
63 prevTimeIndex_ = fvm.time().timeIndex();
67 const auto* cellFldPtr = fvm.findObject<
volScalarField>(fieldName_);
78 <<
"Reading " << fieldName_
79 <<
" from time " << fvm.time().timeName()
85 autoPtr<volScalarField> fieldReadPtr;
96 fvm.time().timeName(),
106 (fieldReadPtr.valid() ? *fieldReadPtr : *cellFldPtr);
109 thresholdCellFaces surf
112 cellFld.primitiveField(),
122 meshCells_.
transfer(surf.meshCells());
129 Pout<<
"sampledThresholdCellFaces::updateGeometry() : constructed"
131 <<
" field : " << fieldName_ <<
nl
132 <<
" lowerLimit : " << lowerThreshold_ <<
nl
133 <<
" upperLimit : " << upperThreshold_ <<
nl
134 <<
" point : " <<
points().size() <<
nl
135 <<
" faces : " <<
faces().size() <<
nl
136 <<
" cut cells : " << meshCells_.size() <<
endl;
163 <<
"require at least one of 'lowerLimit' or 'upperLimit'" <<
endl
182 if (prevTimeIndex_ == -1)
195 return updateGeometry();
204 return sampleOnFaces(sampler);
213 return sampleOnFaces(sampler);
222 return sampleOnFaces(sampler);
231 return sampleOnFaces(sampler);
240 return sampleOnFaces(sampler);
249 return sampleOnPoints(interpolator);
258 return sampleOnPoints(interpolator);
267 return sampleOnPoints(interpolator);
276 return sampleOnPoints(interpolator);
285 return sampleOnPoints(interpolator);
291 os <<
"sampledThresholdCellFaces: " <<
name() <<
" :"
292 <<
" field:" << fieldName_
293 <<
" lowerLimit:" << lowerThreshold_
294 <<
" upperLimit:" << upperThreshold_;
int debug
Static debugging option.
static autoPtr< T > New(Args &&... args)
Construct autoPtr of T with forwarding arguments.
#define InfoInFunction
Report an information message using Foam::Info.
A class for handling words, derived from Foam::string.
A class for managing temporary objects.
bool found(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Search for an entry (const access) with the given keyword.
Ostream & endl(Ostream &os)
Add newline and flush stream.
T get(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
T lookupOrDefault(const word &keyword, const T &deflt, enum keyType::option matchOpt=keyType::REGEX) const
prefixOSstream Pout
An Ostream wrapper for parallel output to std::cout.
sampledThresholdCellFaces(const word &name, const polyMesh &, const dictionary &)
Construct from dictionary.
virtual bool needsUpdate() const
Does the surface need an update?
Mesh consisting of general polyhedral cells.
virtual bool update()
Update the surface as required.
virtual tmp< scalarField > sample(const interpolation< scalar > &sampler) const
Sample volume field onto surface faces.
virtual bool expire()
Mark the surface as needing an update.
void transfer(pointField &pointLst, List< face > &faceLst)
Transfer the components.
virtual void print(Ostream &os) const
Print information.
word name(const complex &c)
Return string representation of complex.
void transfer(List< T > &list)
addNamedToRunTimeSelectionTable(topoSetCellSource, badQualityToCell, word, badQuality)
An abstract class for surfaces with sampling.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Macros for easy insertion into run-time selection tables.
Mesh data needed to do the Finite Volume discretisation.
errorManip< error > abort(error &err)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
virtual void clearGeom() const
Additional cleanup when clearing the geometry.
virtual const faceList & faces() const
Faces of surface.
const Time & time() const
Return the top-level database.
const polyMesh & mesh() const
Access to the underlying mesh.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
label timeIndex() const
Return current time index.
bool interpolate() const
Interpolation to nodes requested for surface.
defineTypeNameAndDebug(combustionModel, 0)
virtual const pointField & points() const
Points of surface.