CloudDerivedField< Type > Class Template Reference

A field derived from other state fields of the cloud. Stores and virtualises a function or a method which generates the field. Caches the result to prevent unnecessary re-evaluation during a calculation step. Provides convenient access for a variety of contexts; i.e., full mesh, sub-mesh and model. More...

Inheritance diagram for CloudDerivedField< Type >:

Classes

class  AllFieldToField
 
class  Function
 Class to store an evaluation function. More...
 
class  Functor
 
class  Method
 Class to store an evaluation method. More...
 

Public Member Functions

template<class F >
 CloudDerivedField (const word &name, const F &f)
 Construct from a name and a function. More...
 
template<class F >
 CloudDerivedField (const F &f)
 Construct from a function. More...
 
template<class C >
 CloudDerivedField (const word &name, const C &c, tmp< LagrangianSubField< Type >>(C::*m)(const LagrangianModelRef &, const LagrangianSubMesh &) const)
 Construct from a name, class and a method. More...
 
template<class C >
 CloudDerivedField (const C &c, tmp< LagrangianSubField< Type >>(C::*m)(const LagrangianModelRef &, const LagrangianSubMesh &) const)
 Construct from a class and a method. More...
 
 CloudDerivedField (const CloudDerivedField &)=delete
 Disallow default bitwise copy construction. More...
 
tmp< LagrangianInternalField< Type > > field (const LagrangianMesh &mesh) const
 Compute and return an independent copy of the entire field. More...
 
LagrangianSubSubField< Type > & ref (const LagrangianSubMesh &) const
 Access a part of the field. More...
 
void clear (const bool final)
 Clear. More...
 
tmp< LagrangianInternalField< Type > > operator() (const LagrangianMesh &mesh) const
 Compute and return the entire field. This will be a slice of the. More...
 
const LagrangianSubField< Type > & operator() (const LagrangianSubMesh &subMesh) const
 Compute and access a part of the field. More...
 
const LagrangianSubField< Type > & operator() (const LagrangianModelRef &model, const LagrangianSubMesh &subMesh) const
 Compute and access a part of the field associated with a model. More...
 
void operator= (const CloudDerivedField &)=delete
 Disallow default bitwise assignment. More...
 

Detailed Description

template<class Type>
class Foam::CloudDerivedField< Type >

A field derived from other state fields of the cloud. Stores and virtualises a function or a method which generates the field. Caches the result to prevent unnecessary re-evaluation during a calculation step. Provides convenient access for a variety of contexts; i.e., full mesh, sub-mesh and model.

Source files

Definition at line 56 of file CloudDerivedField.H.

Constructor & Destructor Documentation

◆ CloudDerivedField() [1/5]

CloudDerivedField ( const word name,
const F &  f 
)

Construct from a name and a function.

Definition at line 220 of file CloudDerivedField.C.

◆ CloudDerivedField() [2/5]

CloudDerivedField ( const F &  f)

Construct from a function.

Definition at line 229 of file CloudDerivedField.C.

◆ CloudDerivedField() [3/5]

CloudDerivedField ( const word name,
const C c,
tmp< LagrangianSubField< Type >>(C::*)(const LagrangianModelRef &, const LagrangianSubMesh &) const  m 
)

Construct from a name, class and a method.

Definition at line 238 of file CloudDerivedField.C.

◆ CloudDerivedField() [4/5]

CloudDerivedField ( const C c,
tmp< LagrangianSubField< Type >>(C::*)(const LagrangianModelRef &, const LagrangianSubMesh &) const  m 
)

Construct from a class and a method.

Definition at line 256 of file CloudDerivedField.C.

◆ CloudDerivedField() [5/5]

CloudDerivedField ( const CloudDerivedField< Type > &  )
delete

Disallow default bitwise copy construction.

Member Function Documentation

◆ field()

Foam::tmp< Foam::LagrangianInternalField< Type > > field ( const LagrangianMesh mesh) const

◆ ref()

Foam::LagrangianSubSubField< Type > & ref ( const LagrangianSubMesh subMesh) const

Access a part of the field.

Definition at line 295 of file CloudDerivedField.C.

References LagrangianSubMesh::index().

Here is the call graph for this function:

◆ clear()

void clear ( const bool  final)

◆ operator()() [1/3]

Foam::tmp< Foam::LagrangianInternalField< Type > > operator() ( const LagrangianMesh mesh) const

Compute and return the entire field. This will be a slice of the.

cached sub-all-field, for which the lifetime is not guaranteed. If the result is being stored (e.g., by a function object) then this might not be appropriate, and the 'field' method should be used instead.

Definition at line 349 of file CloudDerivedField.C.

References mesh.

◆ operator()() [2/3]

const Foam::LagrangianSubField< Type > & operator() ( const LagrangianSubMesh subMesh) const

Compute and access a part of the field.

Definition at line 365 of file CloudDerivedField.C.

◆ operator()() [3/3]

const Foam::LagrangianSubField< Type > & operator() ( const LagrangianModelRef model,
const LagrangianSubMesh subMesh 
) const

Compute and access a part of the field associated with a model.

Definition at line 376 of file CloudDerivedField.C.

References Foam::name(), and Foam::notNull().

Here is the call graph for this function:

◆ operator=()

void operator= ( const CloudDerivedField< Type > &  )
delete

Disallow default bitwise assignment.


The documentation for this class was generated from the following files: