Go to the documentation of this file.
45 sampledIsoSurfaceTopo,
53 bool Foam::sampledIsoSurfaceTopo::updateGeometry()
const
55 const fvMesh& fvm =
static_cast<const fvMesh&
>(
mesh());
58 if (fvm.time().timeIndex() == prevTimeIndex_)
63 prevTimeIndex_ = fvm.time().timeIndex();
70 const auto* cellFldPtr = fvm.findObject<
volScalarField>(isoField_);
81 <<
"Reading " << isoField_
82 <<
" from time " << fvm.time().timeName()
88 autoPtr<volScalarField> fieldReadPtr;
99 fvm.time().timeName(),
110 (fieldReadPtr.valid() ? *fieldReadPtr : *cellFldPtr);
118 cellFld.primitiveField(),
119 tpointFld().primitiveField(),
127 meshCells_ = std::move(surf.meshCells());
136 mySurface.triangulate(
faceMap);
137 meshCells_ = UIndirectList<label>(meshCells_,
faceMap)();
142 Pout<<
"sampledIsoSurfaceTopo::updateGeometry() : constructed iso:"
146 <<
" triangulate : " << Switch(triangulate_) <<
nl
147 <<
" isoField : " << isoField_ <<
nl
148 <<
" isoValue : " << isoVal_ <<
nl
149 <<
" points : " <<
points().size() <<
nl
151 <<
" cut cells : " << meshCells_.size() <<
endl;
170 isoVal_(
dict.
get<scalar>(
"isoValue")),
186 <<
"Cannot triangulate without a regularise filter" <<
nl
214 if (prevTimeIndex_ == -1)
227 return updateGeometry();
237 return sampleOnFaces(sampler);
247 return sampleOnFaces(sampler);
257 return sampleOnFaces(sampler);
267 return sampleOnFaces(sampler);
277 return sampleOnFaces(sampler);
287 return sampleOnPoints(interpolator);
297 return sampleOnPoints(interpolator);
306 return sampleOnPoints(interpolator);
316 return sampleOnPoints(interpolator);
326 return sampleOnPoints(interpolator);
332 os <<
"sampledIsoSurfaceTopo: " <<
name() <<
" :"
333 <<
" field:" << isoField_
334 <<
" value:" << isoVal_;
int debug
Static debugging option.
static autoPtr< T > New(Args &&... args)
Construct autoPtr of T with forwarding arguments.
List< label > labelList
A List of labels.
#define InfoInFunction
Report an information message using Foam::Info.
Pair< int > faceMap(const label facePi, const face &faceP, const label faceNi, const face &faceN)
Remove points from pyramid edges and face-diagonals.
A class for handling words, derived from Foam::string.
virtual bool update()
Update the surface as required.
A class for managing temporary objects.
static const volPointInterpolation & New(const fvMesh &mesh, Args &&... args)
Get existing or create a new MeshObject.
Ostream & endl(Ostream &os)
Add newline and flush stream.
T get(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
prefixOSstream Pout
An Ostream wrapper for parallel output to std::cout.
static const Enum< filterType > filterNames
Names for the filtering types.
tmp< GeometricField< Type, pointPatchField, pointMesh > > interpolate(const GeometricField< Type, fvPatchField, volMesh > &) const
Interpolate volField using inverse distance weighting.
Mesh consisting of general polyhedral cells.
virtual void print(Ostream &) const
Write.
virtual bool needsUpdate() const
Does the surface need an update?
word name(const complex &c)
Return string representation of complex.
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.
sampledIsoSurfaceTopo(const word &name, const polyMesh &mesh, const dictionary &dict)
Construct from dictionary.
virtual const pointField & points() const
Points of surface.
errorManipArg< error, int > exit(error &err, const int errNo=1)
virtual tmp< scalarField > sample(const interpolation< scalar > &sampler) const
Sample volume field onto surface faces.
MeshedSurface< face > meshedSurface
virtual bool expire()
Mark the surface as needing an update.
static filterType getFilterType(const dictionary &dict, const isoSurfaceBase::filterType deflt)
Get 'regularise' as bool or enumeration.
virtual void clearGeom() const
Additional cleanup when clearing the geometry.
const Time & time() const
Return the top-level database.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
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.
T getOrDefault(const word &keyword, const T &deflt, enum keyType::option matchOpt=keyType::REGEX) const
label size() const
The surface size is the number of faces.
bool interpolate() const
Interpolation to nodes requested for surface.
defineTypeNameAndDebug(combustionModel, 0)
virtual ~sampledIsoSurfaceTopo()
Destructor.