45 typeIOobject<IOdictionary> io
57 << io.relativeObjectPath().c_str() <<
endl;
64 const fileName preferredPath =
69 io.rename(
"fvOptions");
75 << io.relativeObjectPath() <<
" rather than "
76 << preferredPath <<
endl;
91 << io.relativeObjectPath() <<
" rather than "
92 << preferredPath <<
endl;
110 void Foam::fvModels::checkApplied()
const
119 const PtrListDictionary<fvModel>& modelList(*
this);
123 const fvModel& model = modelList[i];
126 notAddSupFields -= addSupFields_[i];
131 <<
"Model " << model.name()
132 <<
" defined for field " << iter.key()
133 <<
" but never used" <<
endl;
157 createIOobject(
mesh),
180 addSupFields_.setSize(
count);
189 const word&
name = iter().keyword();
192 const word modelType(modelDict.
lookup(
"type"));
197 || !fvConstraint::dictionaryConstructorTablePtr_->
found
218 addSupFields_.setSize(i);
220 if (!readFromFvModels)
236 if (modelList[i].addsSupToField(fieldName))
267 modelList[i].preUpdateMesh();
280 allOk = allOk && modelList[i].movePoints();
293 modelList[i].topoChange(map);
304 modelList[i].mapMesh(map);
315 modelList[i].distribute(map);
333 bool ok = model.
read(subDict(model.
name()));
334 allOk = (allOk && ok);
359 const bool ok = modelList[i].write(
write);
360 allOk = (allOk && ok);
373 modelList[i].correct();
386 models.dictionary::write(os,
false);
#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 fvMesh & mesh() const
static bool found(const word &name, const fvMesh &mesh)
Return true if the DemandDrivenMeshObject with the given name.
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...
const word & name() const
Return name.
streamFormat
Enumeration for the format of data in the stream.
compressionType
Enumeration for the format of data in the stream.
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.
static const word & system()
Return system 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.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
bool isDict(const word &) const
Check if entry is a sub-dictionary.
Mesh data needed to do the Finite Volume discretisation.
const Time & time() const
Return the top-level database.
Finite volume model abstract base class.
static autoPtr< fvModel > New(const word &name, const fvMesh &mesh, const dictionary &dict)
Return a reference to the selected fvModel.
virtual bool read(const dictionary &dict)
Read source dictionary.
const word & name() const
Return const access to the source name.
virtual bool movePoints()
Update for mesh motion.
virtual bool writeObject(IOstream::streamFormat fmt, IOstream::versionNumber ver, IOstream::compressionType cmp, const bool write) const
Write the fvModels.
virtual void correct()
Correct the fvModels.
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 scalar maxDeltaT() const
Return the maximum time-step for stable operation.
virtual void preUpdateMesh()
Prepare for mesh update.
virtual void mapMesh(const polyMeshMap &)
Update from another mesh using the given map.
virtual bool addsSupToField(const word &fieldName) const
Return true if an fvModel adds a source term to the given.
fvModels(const fvMesh &mesh)
Construct from fvMesh.
virtual bool read()
Read the fvModels dictionary if it has changed.
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 void rename(const word &newName)
Rename.
virtual bool read()
Read object.
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.
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.
String typeName(const std::type_info &info)
Return the un-mangled name given the standard type info.
dimensioned< Type > min(const DimensionedField< Type, GeoMesh, PrimitiveField > &df)
HashSet wordHashSet
A HashSet with word keys.
Ostream & indentOrNl(Ostream &os)
Indent stream or add newline if indent level == 0.
label count(const ListType &l, typename ListType::const_reference x)
Count the number of occurrences of a value in a list.
defineTypeNameAndDebug(atmosphericBoundaryLayer, 0)