50 class CloudDerivedField;
53 class CloudAverageField;
74 #define DECLARE_DERIVED_FIELDS(Type, nullArg) \
75 mutable PtrList<CloudDerivedField<Type>> \
76 CAT3(derived, CAPITALIZE(Type), Fields_);
78 #undef DECLARE_DERIVED_FIELDS
81 #define DECLARE_AVERAGE_FIELDS(Type, nullArg) \
82 mutable PtrList<CloudAverageField<Type>> \
83 CAT3(average, CAPITALIZE(Type), Fields_);
85 #undef DECLARE_AVERAGE_FIELDS
88 autoPtr<LagrangianLabelDynamicField> statePtr_;
97 static LagrangianMesh&
mesh
99 const polyMesh& pMesh,
107 PtrList<CloudDerivedField<Type>>& derivedFields()
const;
110 void clearDerivedFields(
const bool final);
114 PtrList<CloudAverageField<Type>>& averageFields()
const;
117 void removeFromAverageFields(
const LagrangianSubMesh&);
120 void addToAverageFields(
const LagrangianSubMesh&,
const bool final);
123 void correctAverageFields(
const LagrangianSubMesh&,
const bool final);
126 void clearAverageFields();
129 void resetAverageFields();
136 autoPtr<LagrangianLabelDynamicField> readStates()
const;
140 autoPtr<List<LagrangianState>> initialStates()
const;
149 void storeStates(
const LagrangianSubMesh& subMesh);
152 tmp<LagrangianSubScalarField> cellLengthScale
154 const LagrangianSubMesh& subMesh
161 const scalar maxTimeStepFraction,
162 const scalar maxCellLengthScaleFraction
166 virtual bool writeData(Ostream&)
const;
296 template<
class Type,
class ... Args>
303 template<
class Type,
class ... Args>
313 virtual void solve(
const bool initial,
const bool final);
#define DECLARE_AVERAGE_FIELDS(Type, nullArg)
Average fields.
#define DECLARE_DERIVED_FIELDS(Type, nullArg)
Derived fields.
A cloud field that is averaged and then interpolated back to the cloud. Uses CloudDerivedField to pro...
A field derived from other state fields of the cloud. Stores and virtualises a function or a method w...
A field which is stored as part of the state of the cloud. This is a light wrapper around a dynamic L...
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
readOption
Enumeration defining the read options.
IOobject(const word &name, const fileName &instance, const objectRegistry ®istry, readOption r=NO_READ, writeOption w=NO_WRITE, bool registerObject=true)
Construct from name, instance, registry, io options.
const word & name() const
Return name.
writeOption
Enumeration defining the write options.
Class containing Lagrangian geometry and topology.
List of Lagrangian models, constructed as a (Lagrangian) mesh object. Provides similar functions to t...
Mesh that relates to a sub-section of a Lagrangian mesh. This is used to construct fields that relate...
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Base class for clouds. Provides a basic evolution algorithm, models, and a database for caching deriv...
contextType
Context in which this cloud is used.
virtual void solve(const bool initial, const bool final)
Solve the cloud's evolution over the current time-step.
static autoPtr< cloud > New(const polyMesh &mesh, const word &name, const contextType context, const dictionary &dict, const word &type, const IOobject::readOption readOption=IOobject::READ_IF_PRESENT, const IOobject::writeOption writeOption=IOobject::AUTO_WRITE)
Selectors.
virtual void topoChange(const polyTopoChangeMap &)
Update topology using the given map.
virtual void distribute(const polyDistributionMap &)
Redistribute or update using the given distribution map.
TypeName("cloud")
Run-time type information.
const CloudDerivedField< Type > & derivedField(const Args &... args) const
Add/get a derived field to/from the cache.
virtual void storePosition()
Store the positions for use during mapping.
virtual void mapMesh(const polyMeshMap &)
Update from another mesh using the given map.
virtual void calculate(const LagrangianSubScalarField &deltaT, const bool final)=0
Update the cloud properties.
Foam::LagrangianModels & LagrangianModels() const
Access the models.
virtual void movePoints(const polyMesh &)
Update for mesh motion.
const CloudAverageField< Type > & averageField(const Args &... args) const
Add/get an average field to/from the cache.
enum Foam::cloud::contextType context
trackingType
Tracking method.
static const Foam::cloud & lookup(const LagrangianMesh &mesh)
Lookup the cloud associated with a mesh.
virtual ~cloud()
Destructor.
declareRunTimeSelectionTable(autoPtr, cloud, LagrangianMesh,(LagrangianMesh &mesh, const contextType context, const dictionary &dict),(mesh, context, dict))
Declare run-time constructor selection table.
virtual tmp< LagrangianSubVectorField > dUdt(const LagrangianSubMesh &) const =0
Return the acceleration with which to do second-order tracking.
void operator=(const LagrangianMesh &)=delete
Disallow default bitwise assignment.
enum Foam::cloud::trackingType tracking
virtual void partition()
Partition hook.
virtual bool reCalculateModified()=0
Do we need to re-calculate particles that are modified?
cloud(LagrangianMesh &mesh, const contextType context)
Construct from a mesh and context. Reads the velocity field.
const LagrangianMesh & mesh() const
Access the mesh.
CloudStateField< vector > U
Velocity.
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Finite volume model abstract base class.
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.
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
A class for managing temporary objects.
A class for handling words, derived from string.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
LagrangianSubSubField< scalar > LagrangianSubScalarSubField
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.
Foam::argList args(argc, argv)