45 typeIOobject<IOdictionary> io
48 mesh.time().constant(),
56 Info<<
"Creating fvModels from " 57 << io.instance()/io.name() <<
nl 67 io.rename(
"fvOptions");
72 <<
"Creating fvModels from " 73 << io.instance()/io.name() <<
nl 83 io.instance() = mesh.time().system();
88 <<
"Creating fvModels from " 89 << io.instance()/io.name()
90 <<
" rather than constant/fvModels" 109 void Foam::fvModels::checkApplied()
const 113 const PtrListDictionary<fvModel>& modelList(*
this);
117 const fvModel& model = modelList[i];
120 notAddSupFields -= addSupFields_[i];
125 <<
"Model " << model.name()
126 <<
" defined for field " << iter.key()
127 <<
" but never used" <<
endl;
149 checkTimeIndex_(mesh.time().timeIndex() + 1),
170 addSupFields_.setSize(count);
177 const word&
name = iter().keyword();
180 const word modelType(modelDict.
lookup(
"type"));
185 || !fvConstraint::dictionaryConstructorTablePtr_->
found 206 addSupFields_.setSize(i);
208 if (readFromFvModels)
230 if (modelList[i].addsSupToField(fieldName))
261 modelList[i].preUpdateMesh();
274 allOk = allOk && modelList[i].movePoints();
287 modelList[i].topoChange(map);
298 modelList[i].mapMesh(map);
309 modelList[i].distribute(map);
341 bool ok = model.
read(subDict(model.
name()));
342 allOk = (allOk && ok);
359 modelList[i].correct();
372 models.writeData(os);
void write(Ostream &, const bool subDict=true) const
Write dictionary, normally with sub-dictionary formatting.
#define forAll(list, i)
Loop across all elements in list.
Class containing mesh-to-mesh mapping information after a mesh distribution where we send parts of me...
const word & name() const
Return name.
virtual scalar maxDeltaT() const
Return the maximum time-step for stable operation.
bool bad() const
Return true if stream is corrupted.
const word & name() const
Return const access to the source name.
A list of keyword definitions, which are a keyword followed by any number of values (e...
#define forAllConstIter(Container, container, iter)
Iterate across all elements in the container object of type.
autoPtr< T > set(const label, const word &key, T *)
Set element to pointer provided and return old element.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
virtual bool read(const dictionary &dict)
Read source dictionary.
virtual void correct()
Correct the fvModels.
Ostream & endl(Ostream &os)
Add newline and flush stream.
label count(const ListType &l, typename ListType::const_reference x)
Count the number of occurrences of a value in a list.
virtual void preUpdateMesh()
Prepare for mesh update.
Finite volume model abstract base class.
const Time & time() const
Return the top-level database.
bool good() const
Return true if next operation might succeed.
Templated abstract base-class for optional mesh objects used to automate their allocation to the mesh...
A class for handling words, derived from string.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
static autoPtr< fvModel > New(const word &name, const dictionary &dict, const fvMesh &mesh)
Return a reference to the selected fvModel.
virtual void distribute(const polyDistributionMap &)
Redistribute or update using the given distribution map.
virtual void topoChange(const polyTopoChangeMap &)
Update topology using the given map.
layerAndWeight min(const layerAndWeight &a, const layerAndWeight &b)
HashSet wordHashSet
A HashSet with word keys.
virtual bool readData(Istream &)
ReadData function which reads the fvModels dictionary.
void setSize(const label)
Reset size of PtrList. If extending the PtrList, new entries are.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
defineTypeNameAndDebug(combustionModel, 0)
word name(const complex &)
Return a string representation of a complex.
virtual bool writeData(Ostream &os) const
Write data to Ostream.
Foam::fvModels & fvModels
virtual bool movePoints()
Update for mesh motion.
label timeIndex() const
Return current time index.
#define WarningInFunction
Report a warning using Foam::Warning.
Mesh data needed to do the Finite Volume discretisation.
virtual void mapMesh(const polyMeshMap &)
Update from another mesh using the given map.
Class containing mesh-to-mesh mapping information.
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 components with list of field names.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
virtual bool read()
Read the fvModels dictionary if it has changed.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.