104 return f_(model, subMesh);
167 return (c_.*m_)(model, subMesh);
301 if (!psiSubSubPtr_.valid() || psiSubSubMeshIndex_ != subMesh.
index())
308 psiSubSubUpToDate_ =
true;
309 psiSubSubMeshIndex_ = subMesh.
index();
313 if (!psiSubSubUpToDate_)
315 psiSubSubPtr_->UList<Type>::shallowCopy(
operator()(subMesh));
317 psiSubSubUpToDate_ =
true;
320 return psiSubSubPtr_();
334 psiSubUpToDate_ =
false;
335 psiSubSubUpToDate_ =
false;
340 psiSubSubPtr_.clear();
383 if (&subMesh == &subMesh.mesh().subAll())
385 if (!psiAllPtr_.valid())
394 functorPtr_()(model, subMesh)
400 psiAllPtr_.reset(functorPtr_()(model, subMesh).ptr());
408 if (!psiSubPtr_.valid() || psiSubMeshIndex_ != subMesh.index())
416 name_ +
':' +
name(subMesh.group()),
417 functorPtr_()(model, subMesh)
423 psiSubPtr_.reset(functorPtr_()(model, subMesh).ptr());
426 psiSubUpToDate_ =
true;
427 psiSubMeshIndex_ = subMesh.index();
431 if (!psiSubUpToDate_)
433 psiSubPtr_() = functorPtr_()(model, subMesh);
435 psiSubUpToDate_ =
true;
Graphite solid properties.
AllFieldToField(const LagrangianSubField< Type > &allField)
Construct from a sub-all-field reference.
virtual ~AllFieldToField()
Destructor.
Class to store an evaluation function.
Function(const F &f)
Construct from a function.
virtual ~Function()
Destructor.
virtual ~Functor()
Destructor.
Class to store an evaluation method.
Method(const C &c, tmp< LagrangianSubField< Type >>(C::*m)(const LagrangianModelRef &, const LagrangianSubMesh &) const)
Construct from a class and a method.
virtual ~Method()
Destructor.
A field derived from other state fields of the cloud. Stores and virtualises a function or a method w...
tmp< LagrangianInternalField< Type > > operator()(const LagrangianMesh &mesh) const
Compute and return the entire field. This will be a slice of the.
CloudDerivedField(const word &name, const F &f)
Construct from a name and a function.
void clear(const bool final)
Clear.
LagrangianSubSubField< Type > & ref(const LagrangianSubMesh &) const
Access a part of the field.
tmp< LagrangianInternalField< Type > > field(const LagrangianMesh &mesh) const
Compute and return an independent copy of the entire field.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
const dimensionSet & dimensions() const
Return dimensions.
const PrimitiveField< Type > & primitiveField() const
Return a const-reference to the primitive field.
static tmp< DimensionedField< Type, GeoMesh, PrimitiveField > > New(const word &name, const Mesh &mesh, const dimensionSet &, const PrimitiveField< Type > &)
Return a temporary field constructed from name, mesh,.
Pre-declare SubField and related Field type.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
const word & name() const
Return name.
Class containing Lagrangian geometry and topology.
Simple wrapper to provide an optional reference to a Lagrangian model.
Mesh that relates to a sub-section of a Lagrangian mesh. This is used to construct fields that relate...
label index() const
Return the index.
void shallowCopy(const UList< T > &)
Copy the pointer held by the given UList.
A class for managing temporary objects.
T & ref() const
Return non-const reference or generate a fatal error.
A class for handling words, derived from string.
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
const dimensionedScalar F
Faraday constant: default SI units: [C/mol].
const dimensionedScalar c
Speed of light in a vacuum.
static const coefficient C("C", dimTemperature, 234.5)
const HashTable< dimensionSet > & dimensions()
Get the table of dimension sets.
bool notNull(const T &t)
Return true if t is not a reference to the nullObject of type T.
const T & NullObjectRef()
Return const reference to the nullObject of type T.
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.