104 return f_(model, subMesh);
167 return (c_.*m_)(model, subMesh);
200 allField.dimensions(),
280 if (psiAllPtr_.valid())
284 else if (psiSubPtr_.valid())
286 FatalError << psiSubPtr_->mesh().complete(psiSubPtr_->name());
288 else if (psiSubSubPtr_.valid())
290 FatalError << psiSubSubPtr_->mesh().complete(psiSubSubPtr_->name());
331 <<
"Non-constant access is not provided to the all-mesh sub-field"
336 if (!psiSubSubPtr_.valid() || psiSubSubMeshIndex_ != subMesh.
index())
343 psiSubSubUpToDate_ =
true;
344 psiSubSubMeshIndex_ = subMesh.
index();
348 if (!psiSubSubUpToDate_)
350 psiSubSubPtr_->UList<Type>::shallowCopy(
operator()(subMesh));
352 psiSubSubUpToDate_ =
true;
355 return psiSubSubPtr_();
369 psiSubUpToDate_ =
false;
370 psiSubSubUpToDate_ =
false;
375 psiSubSubPtr_.clear();
418 if (&subMesh == &subMesh.mesh().subAll())
420 if (!psiAllPtr_.valid())
425 functorPtr_()(model, subMesh);
442 psiAllPtr_.reset(functorPtr_()(model, subMesh).ptr());
450 if (!psiSubPtr_.valid() || psiSubMeshIndex_ != subMesh.index())
455 functorPtr_()(model, subMesh);
472 psiSubPtr_.reset(functorPtr_()(model, subMesh).ptr());
475 psiSubUpToDate_ =
true;
476 psiSubMeshIndex_ = subMesh.index();
480 if (!psiSubUpToDate_)
482 psiSubPtr_() = functorPtr_()(model, subMesh);
484 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.
const word & name() const
Field name.
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...
static tmp< DimensionedField< Type, GeoMesh, PrimitiveField > > New(const word &name, const GeoMesh &mesh, const dimensionSet &, const PrimitiveField< Type > &)
Return a temporary field constructed from name, mesh,.
const dimensionSet & dimensions() const
Return dimensions.
const PrimitiveField< Type > & primitiveField() const
Return a const-reference to the primitive field.
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.
const LagrangianSubMesh & subAll() const
Return a sub-mesh for all elements.
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...
uint64_t index() const
Return the index.
const LagrangianMesh & mesh() const
Return the mesh.
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.
static const word null
An empty word.
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
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)
errorManipArg< error, int > exit(error &err, const int errNo=1)
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.