42 typeIOobject<IOdictionary> io
54 << io.relativeObjectPath().c_str() <<
endl;
61 const fileName preferredPath =
66 io.rename(
"fvOptions");
72 << io.relativeObjectPath() <<
" rather than "
73 << preferredPath <<
endl;
88 << io.relativeObjectPath() <<
" rather than "
89 << preferredPath <<
endl;
107 void Foam::fvConstraints::checkApplied()
const
111 const PtrListDictionary<fvConstraint>& constraintList(*
this);
115 const fvConstraint& constraint = constraintList[i];
117 wordHashSet notConstrainedFields(constraint.constrainedFields());
118 notConstrainedFields -= constrainedFields_[i];
123 <<
"Constraint " << constraint.name()
124 <<
" defined for field " << iter.key()
125 <<
" but never used" <<
endl;
149 createIOobject(
mesh),
172 constrainedFields_.setSize(
count);
181 const word&
name = iter().keyword();
182 const dictionary& constraintDict = iter().dict();
184 const word constraintType(constraintDict.
lookup(
"type"));
188 readFromFvConstraints
189 || !fvModel::dictionaryConstructorTablePtr_->
found
210 constrainedFields_.setSize(i);
212 if (!readFromFvConstraints)
228 if (constraintList[i].constrainsField(fieldName))
246 allOk = allOk && constraintList[i].movePoints();
259 constraintList[i].topoChange(map);
270 constraintList[i].mapMesh(map);
281 constraintList[i].distribute(map);
299 bool ok = constraint.
read(subDict(constraint.
name()));
300 allOk = (allOk && ok);
319 constraints.writeData(os);
#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.
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 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.
Finite volume options abstract base class.
virtual bool read(const dictionary &dict)
Read source dictionary.
const word & name() const
Return const access to the source name.
static autoPtr< fvConstraint > New(const word &name, const fvMesh &mesh, const dictionary &dict)
Return a reference to the selected fvConstraint.
Finite volume constraints.
virtual bool movePoints()
Update for mesh motion.
virtual void topoChange(const polyTopoChangeMap &)
Update topology using the given map.
virtual void distribute(const polyDistributionMap &)
Redistribute or update using the given distribution map.
fvConstraints(const fvMesh &mesh)
Construct from fvMesh.
virtual bool constrainsField(const word &fieldName) const
Return true if an fvConstraint constrains the given field.
virtual void mapMesh(const polyMeshMap &)
Update from another mesh using the given map.
virtual bool read()
Read the fvConstraints dictionary if it has changed.
Mesh data needed to do the Finite Volume discretisation.
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.
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.
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.
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)