48 mesh.time().constant(),
54 if (io.typeHeaderOk<IOdictionary>(
true))
56 Info<<
"Creating fvModels from " 57 << io.instance()/io.name() <<
nl 67 io.rename(
"fvOptions");
69 if (io.typeHeaderOk<IOdictionary>(
true))
72 <<
"Creating fvModels from " 73 << io.instance()/io.name() <<
nl 83 io.instance() = mesh.time().system();
85 if (io.typeHeaderOk<IOdictionary>(
true))
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))
246 modelList[i].preUpdateMesh();
257 modelList[i].updateMesh(mpm);
270 allOk = allOk && modelList[i].movePoints();
304 bool ok = model.
read(subDict(model.
name()));
305 allOk = (allOk && ok);
322 modelList[i].correct();
335 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.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
const word & name() const
Return name.
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...
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.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
Templated abstract base-class for optional mesh objects used to automate their allocation to the mesh...
A class for handling words, derived from string.
static autoPtr< fvModel > New(const word &name, const dictionary &dict, const fvMesh &mesh)
Return a reference to the selected fvModel.
virtual void updateMesh(const mapPolyMesh &)
Update for mesh changes.
HashSet wordHashSet
A HashSet with word keys.
virtual bool readData(Istream &)
ReadData function which reads the fvModels dictionary.
forAllConstIter(PtrDictionary< phaseModel >, mixture.phases(), phase)
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 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.