41 typeIOobject<IOdictionary> result
50 if (!result.headerOk())
57 << result.relativeObjectPath() <<
endl;
64 void Foam::LagrangianModels::checkApplied()
const
73 const PtrListDictionary<LagrangianModel>& modelList(*
this);
77 const LagrangianModel& model = modelList[i];
80 notAddSupFields -= addSupFields_[i];
85 <<
"Model " << model.name()
86 <<
" defined for field " << iter.key()
87 <<
" but never used" <<
endl;
121 i += iter().isDict();
126 addSupFields_.setSize(i);
134 if (!iter().
isDict())
continue;
136 const word&
name = iter().keyword();
157 modelList[i].postConstruct();
173 return addsSupToField(fieldName, fieldName);
179 const word& fieldName,
180 const word& eqnFieldName
205 modelList[i].correct();
222 modelList[i].preModify(
mesh, elementModifications);
227 const labelList offsets =
mesh.partition(2, elementModifications);
235 offsets[1] - offsets[0],
259 modifiedAndCreatedMesh += modifiedMesh;
262 modifiedAndCreatedMesh += modelList[i].modify(
mesh, modifiedMesh);
266 return modifiedAndCreatedMesh;
280 modelList[i].calculate(deltaT,
final);
295 modelList[i].preAddSup(deltaT,
final);
324 model.
addSup(deltaT, eqn);
342 modelList[i].postAddSup(deltaT,
final);
359 modelList[i].topoChange(map);
370 modelList[i].mapMesh(map);
381 modelList[i].distribute(map);
431 const bool ok = modelList[i].write(
write);
434 const bool okState = modelList[i].writeState(
write);
435 allOk = allOk && okState;
#define forAll(list, i)
Loop across all elements in list.
#define forAllConstIter(Container, container, iter)
Iterate across all elements in the container object of type.
Templated abstract base-class for demand-driven mesh objects used to automate their allocation to the...
const LagrangianMesh & mesh() const
void insert(const word &, T *)
Add at head of dictionary.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
const GeoMesh & mesh() const
Return mesh.
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
streamFormat
Enumeration for the format of data in the stream.
compressionType
Enumeration for the format of data in the stream.
This class stores the coefficients of a Lagrangian equation, and facilitates solving that equation an...
Class containing Lagrangian geometry and topology.
const Time & time() const
Return time.
Base class for Lagrangian models.
virtual void addSup(const LagrangianSubScalarField &deltaT, LagrangianEqn< scalar > &eqn) const
Add a fractional source term.
virtual bool addsSupToField(const word &fieldName, const word &eqnFieldName) const =0
Return true if the LagrangianModel adds a source term to the.
static autoPtr< LagrangianModel > New(const word &name, const LagrangianMesh &mesh, const dictionary &modelDict)
Selector.
List of Lagrangian models, constructed as a (Lagrangian) mesh object. Provides similar functions to t...
virtual bool movePoints()
Update for mesh motion. Only for mesh object. Does nothing.
virtual bool writeObject(IOstream::streamFormat fmt, IOstream::versionNumber ver, IOstream::compressionType cmp, const bool write) const
Write the LagrangianModels.
void correct()
Correct the LagrangianModels.
tmp< LagrangianEqn< scalar > > source(const LagrangianSubScalarField &deltaT) const
Return the fractional source.
virtual void postSource(const LagrangianSubScalarField &deltaT, const bool final)
Hook after source evaluation.
virtual ~LagrangianModels()
Destructor.
virtual void topoChange(const polyTopoChangeMap &)
Update topology using the given map.
virtual void distribute(const polyDistributionMap &)
Redistribute or update using the given distribution map.
virtual void preSource(const LagrangianSubScalarField &deltaT, const bool final)
Hook before source evaluation.
virtual void mapMesh(const polyMeshMap &)
Update from another mesh using the given map.
LagrangianSubMesh preModify(LagrangianMesh &mesh) const
Identify elements in the Lagrangian mesh which are to be.
LagrangianSubMesh modify(LagrangianMesh &mesh, const LagrangianSubMesh &modifiedMesh) const
Instantaneously modify and/or create and remove elements in the.
bool addsSupToField(const word &fieldName) const
Return true if the LagrangianModels adds a source term to the.
void calculate(const LagrangianSubScalarField &deltaT, const bool final)
Solve equations and/or update continually changing properties.
LagrangianModels(const LagrangianMesh &mesh)
Construct for a mesh.
virtual bool read()
Read the LagrangianModels dictionary if it has changed.
Mesh that relates to a sub-section of a Lagrangian mesh. This is used to construct fields that relate...
label end() const
Return end.
Template dictionary class which manages the storage associated with it.
autoPtr< T > set(const label, const word &key, T *)
Set element to pointer provided and return old element.
void setSize(const label)
Reset size of PtrList. If extending the PtrList, new entries are.
static const word & constant()
Return constant name.
label timeIndex() const
Return current time index.
const TimeState & prevTimeState() const
Return previous TimeState if time is being sub-cycled.
bool subCycling() const
Return true if time currently being sub-cycled, otherwise false.
const fileName & name() const
Return the dictionary name.
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
bool isDict(const word &) const
Check if entry is a sub-dictionary.
const dictionary & optionalTypeDict(const word &typeName) const
Find and return an optional type sub-dictionary.
const Time & time() const
Return the top-level database.
label size() const
Return fvMesh size.
Class containing mesh-to-mesh mapping information after a mesh distribution where we send parts of me...
Class containing mesh-to-mesh mapping information.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
Enables the printing of a dictionary and subsequently looked-up defaulted entries.
virtual bool read()
Read object.
A class for managing temporary objects.
T & ref() const
Return non-const reference or generate a fatal error.
Template function which returns the un-mangled name of a given type. Useful for types which do not ha...
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 WarningInFunction
Report a warning using Foam::Warning.
void write(std::ostream &os, const bool binary, List< floatScalar > &fField)
Write floats ascii or binary.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Ostream & endl(Ostream &os)
Add newline and flush stream.
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.
HashSet wordHashSet
A HashSet with word keys.
Ostream & indentOrNl(Ostream &os)
Indent stream or add newline if indent level == 0.
defineTypeNameAndDebug(atmosphericBoundaryLayer, 0)