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().name()
100 cellFldPtr = readFieldPtr_.operator->();
108 cellFld.primitiveField(),
118 meshCells_.
transfer(surf.meshCells());
125 Pout<<
"thresholdCellFaces::updateGeometry() : constructed"
127 <<
" field : " << fieldName_ <<
nl
128 <<
" lowerLimit : " << lowerThreshold_ <<
nl
129 <<
" upperLimit : " << upperThreshold_ <<
nl
132 <<
" cut cells : " << meshCells_.
size() <<
endl;
150 lowerThreshold_(
dict.lookupOrDefault<scalar>(
"lowerLimit", -vGreat)),
151 upperThreshold_(
dict.lookupOrDefault<scalar>(
"upperLimit", vGreat)),
152 triangulate_(
dict.lookupOrDefault(
"triangulate", false)),
156 if (!
dict.found(
"lowerLimit") && !
dict.found(
"upperLimit"))
159 <<
"require at least one of 'lowerLimit' or 'upperLimit'" <<
endl
189 return updateGeometry();
193 #define IMPLEMENT_SAMPLE(Type, nullArg) \
194 Foam::tmp<Foam::Field<Foam::Type>> \
195 Foam::sampledSurfaces::thresholdCellFaces::sample \
197 const VolField<Type>& vField \
200 return sampleField(vField); \
203 #undef IMPLEMENT_SAMPLE
206 #define IMPLEMENT_INTERPOLATE(Type, nullArg) \
207 Foam::tmp<Foam::Field<Foam::Type>> \
208 Foam::sampledSurfaces::thresholdCellFaces::interpolate \
210 const interpolation<Type>& interpolator \
213 return interpolateField(interpolator); \
216 #undef IMPLEMENT_INTERPOLATE
254 os <<
"thresholdCellFaces: " <<
name() <<
" :"
255 <<
" field:" << fieldName_
256 <<
" lowerLimit:" << lowerThreshold_
257 <<
" upperLimit:" << upperThreshold_;
Macros for easy insertion into run-time selection tables.
void transfer(List< T > &)
Transfer the contents of the argument List into this list.
void size(const label)
Override size to be inconsistent with allocated storage.
void transfer(MeshedSurface< face > &)
Transfer the contents of the argument and annul the argument.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
label timeIndex() const
Return current time index.
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Mesh data needed to do the Finite Volume discretisation.
const Time & time() const
Return the top-level database.
Class containing mesh-to-mesh mapping information after a mesh distribution where we send parts of me...
Class containing mesh-to-mesh mapping information.
Mesh consisting of general polyhedral cells.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
An abstract class for surfaces with sampling.
virtual void clearGeom() const
const polyMesh & mesh() const
Access to the underlying mesh.
A sampledSurface defined by the cell faces corresponding to a threshold value.
thresholdCellFaces(const word &name, const polyMesh &, const dictionary &)
Construct from dictionary.
virtual wordList fields() const
Return the list of fields required.
virtual void topoChange(const polyTopoChangeMap &)
Update topology using the given map.
virtual void distribute(const polyDistributionMap &)
Redistribute or update using the given distribution map.
virtual void movePoints()
Update for mesh point-motion.
virtual void mapMesh(const polyMeshMap &)
Update from another mesh using the given map.
virtual bool needsUpdate() const
Does the surface need an update?
virtual bool update()
Update the surface as required.
virtual void print(Ostream &) const
Write.
virtual const faceList & faces() const
Faces of surface.
virtual ~thresholdCellFaces()
Destructor.
virtual const pointField & points() const
Points of surface.
Selects the mesh cell faces specified by a threshold value. Non-triangulated by default.
A class for handling words, derived from string.
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
#define InfoInFunction
Report an information message using Foam::Info.
defineTypeNameAndDebug(cutPlane, 0)
addToRunTimeSelectionTable(sampledSurface, cutPlane, word)
const unitSet & lookup(const word &unitName)
Lookup and return the named unit from the table.
List< word > wordList
A List of words.
Ostream & endl(Ostream &os)
Add newline and flush stream.
errorManip< error > abort(error &err)
FOR_ALL_FIELD_TYPES(makeDimensionedPointFieldFunctions)
VolField< scalar > volScalarField
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.
prefixOSstream Pout(cout, "Pout")
#define IMPLEMENT_INTERPOLATE(Type, nullArg)
#define IMPLEMENT_SAMPLE(Type, nullArg)