35 namespace zoneGenerators
50 bool Foam::zoneGenerators::periodic::activate()
const
55 :
mesh_.time().userTimeValue();
57 const bool active = t >= begin_ && t < end_;
59 return deactivate_ ? !active : active;
63 bool Foam::zoneGenerators::periodic::stateChanged()
const
89 dict.lookupOrDefault<scalar>
93 mesh.time().beginTime().value()
99 dict.lookupOrDefault<scalar>
103 mesh.time().endTime().value()
107 repeat_(
dict.lookupOrDefault<scalar>(
"repeat",
unitNone, 0)),
108 deactivate_(
dict.lookupOrDefault<
Switch>(
"deactivate", false)),
128 return zoneGenerator_->generate().
clone(zoneName_);
134 if (!nullZoneSet_.valid())
136 zoneSet zs(zoneGenerator_->generate());
175 return zoneSet(nullZoneSet_,
false);
183 if (zoneGenerator_->moveUpdate() || stateChanged())
Macros for easy insertion into run-time selection tables.
static const List< label > & null()
Return a null List.
A simple wrapper around bool so that it can be read as a word: true/false, on/off,...
scalar userTimeValue() const
Return current user time value.
Named list of cell indices representing a sub-set of the mesh.
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Named list of face indices representing a sub-set of the mesh faces.
const Time & time() const
Return time.
Named list of point indices representing a sub-set of the mesh faces.
Mesh consisting of general polyhedral cells.
A class for handling words, derived from string.
Abstract base class for all zoneGenerators, providing runtime selection.
bool moveUpdate_
Switch to update the zones if the mesh points are moved.
const polyMesh & mesh_
Reference to the polyMesh.
A zoneGenerator which activates the zoneSet returned by the given zoneGenerator for a given period wi...
virtual ~periodic()
Destructor.
virtual zoneSet generate() const
Generate and return the zoneSet.
periodic(const word &name, const polyMesh &mesh, const dictionary &dict)
Construct from dictionary.
virtual zoneSet movePoints() const
Regenerate the zoneSet following mesh point motion.
Zone container returned by zoneGenerator::generate.
bool pValid() const
Return true if the pointZone is allocated.
bool fValid() const
Return true if the faceZone is allocated.
zoneSet clone(const word &name) const
Construct and return a clone with a new name.
bool cValid() const
Return true if the cellZone is allocated.
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
defineTypeNameAndDebug(cylinderHeadPoints, 0)
addToRunTimeSelectionTable(zoneGenerator, cylinderHeadPoints, dictionary)
const unitConversion unitNone
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.
tmp< DimensionedField< TypeR, GeoMesh, Field > > New(const tmp< DimensionedField< TypeR, GeoMesh, Field >> &tdf1, const word &name, const dimensionSet &dimensions)