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::fvConstraints::checkApplied()
const
114 const PtrListDictionary<fvConstraint>& constraintList(*
this);
118 const fvConstraint& constraint = constraintList[i];
120 wordHashSet notConstrainedFields(constraint.constrainedFields());
121 notConstrainedFields -= constrainedFields_[i];
126 <<
"Constraint " << constraint.name()
127 <<
" defined for field " << iter.key()
128 <<
" but never used" <<
endl;
152 createIOobject(
mesh),
175 constrainedFields_.setSize(
count);
184 const word&
name = iter().keyword();
185 const dictionary& constraintDict = iter().dict();
187 const word constraintType(constraintDict.
lookup(
"type"));
191 readFromFvConstraints
192 || !fvModel::dictionaryConstructorTablePtr_->
found
213 constrainedFields_.setSize(i);
215 if (!readFromFvConstraints)
231 if (constraintList[i].constrainsField(fieldName))
249 allOk = allOk && constraintList[i].movePoints();
262 constraintList[i].topoChange(map);
273 constraintList[i].mapMesh(map);
284 constraintList[i].distribute(map);
302 bool ok = constraint.
read(subDict(constraint.
name()));
303 allOk = (allOk && ok);
322 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)