41 typeIOobject<IOdictionary> result
50 if (!result.headerOk())
59 void Foam::LagrangianModels::checkApplied()
const
68 const PtrListDictionary<LagrangianModel>& modelList(*
this);
72 const LagrangianModel& model = modelList[i];
75 notAddSupFields -= addSupFields_[i];
80 <<
"Model " << model.name()
81 <<
" defined for field " << iter.key()
82 <<
" but never used" <<
endl;
118 i += iter().isDict();
123 addSupFields_.setSize(i);
129 if (!iter().
isDict())
continue;
131 const word&
name = iter().keyword();
152 modelList[i].postConstruct();
193 modelList[i].correct();
210 modelList[i].preModify(
mesh, elementModifications);
215 const labelList offsets =
mesh.partition(2, elementModifications);
223 offsets[1] - offsets[0],
247 modifiedAndCreatedMesh += modifiedMesh;
250 modifiedAndCreatedMesh += modelList[i].modify(
mesh, modifiedMesh);
254 return modifiedAndCreatedMesh;
268 modelList[i].calculate(deltaT,
final);
317 modelList[i].topoChange(map);
328 modelList[i].mapMesh(map);
339 modelList[i].distribute(map);
403 const bool ok = modelList[i].write(
write);
406 const bool okState = modelList[i].writeState(
write);
407 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 Mesh & mesh() const
Return mesh.
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,.
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
label size() const
Return number of elements in table.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
streamFormat
Enumeration for the format of data in the stream.
bool bad() const
Return true if stream is corrupted.
compressionType
Enumeration for the format of data in the stream.
bool good() const
Return true if next operation might succeed.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Class containing Lagrangian geometry and topology.
const Time & time() const
Return time.
Base class for Lagrangian models.
virtual void addSup(const LagrangianSubScalarField &deltaT, LagrangianSubScalarField &S) const
Add a fractional source term.
virtual bool addsSupToField(const word &) const
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.
tmp< LagrangianSubScalarField > source(const LagrangianSubScalarField &deltaT) const
Return the fractional source.
void correct()
Correct the LagrangianModels.
bool addsSupToField(const word &) const
Return true if the LagrangianModels adds a source term to the.
virtual bool writeData(Ostream &os) const
writeData function required by regIOobject but not used
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 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.
virtual bool readData(Istream &)
ReadData function which reads the LagrangianModels dictionary.
LagrangianSubMesh modify(LagrangianMesh &mesh, const LagrangianSubMesh &modifiedMesh) const
Instantaneously modify and/or create and remove elements in 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.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
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.
void write(Ostream &, const bool subDict=true) const
Write dictionary, normally with sub-dictionary formatting.
const dictionary & optionalSubDict(const word &) const
Find and return a sub-dictionary if found.
bool isDict(const word &) const
Check if entry is a sub-dictionary.
const Time & time() const
Return the top-level database.
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.
bool readHeaderOk(const IOstream::streamFormat defaultFormat, const word &typeName)
Read header, check readOpt flags and read data if necessary.
void addWatch()
Add file watch on object (if registered and READ_IF_MODIFIED)
virtual bool read()
Read object.
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 WarningInFunction
Report a warning using Foam::Warning.
tmp< fvMatrix< Type > > S(const Pair< tmp< volScalarField::Internal >> &, const VolField< Type > &)
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.
const dimensionSet dimRate
defineTypeNameAndDebug(combustionModel, 0)
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.
HashSet wordHashSet
A HashSet with word keys.