41 bool Foam::fvConstraint::constrainType
52 bool Foam::fvConstraint::constrainType(VolField<Type>& field)
const
63 const word& constraintType,
69 constraintType_(constraintType),
72 coeffs_(
dict.optionalSubDict(constraintType +
"Coeffs"))
91 <<
"Selecting finite volume constraint type " << constraintType <<
endl;
95 !dictionaryConstructorTablePtr_
96 || dictionaryConstructorTablePtr_->find(constraintType)
97 == dictionaryConstructorTablePtr_->end()
106 dictionaryConstructorTablePtr_
113 if (!dictionaryConstructorTablePtr_)
116 <<
"Unknown constraint type "
117 << constraintType <<
nl <<
nl
118 <<
"Table of fvConstraints is empty"
123 dictionaryConstructorTable::iterator cstrIter =
124 dictionaryConstructorTablePtr_->find(constraintType);
126 if (cstrIter == dictionaryConstructorTablePtr_->end())
129 <<
"Unknown fvConstraint " << constraintType <<
nl <<
nl
130 <<
"Valid fvConstraints are:" <<
nl
131 << dictionaryConstructorTablePtr_->sortedToc()
137 cstrIter()(
name, constraintType, mesh,
dict)
156 return findIndex(constrainedFields(), fieldName) != -1;
static const List< word > & null()
Return a null List.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
A list of keyword definitions, which are a keyword followed by any number of values (e....
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
const dictionary & optionalSubDict(const word &) const
Find and return a sub-dictionary if found.
bool open(const fileName &libName, const bool verbose=true)
Open the named library, optionally with warnings if problems occur.
Finite volume options abstract base class.
fvConstraint(const word &name, const word &constraintType, const fvMesh &mesh, const dictionary &dict)
Construct from components.
virtual bool read(const dictionary &dict)
Read source dictionary.
virtual bool constrainsField(const word &fieldName) const
Return true if the given field is constrained.
virtual wordList constrainedFields() const
Return the list of constrained fields.
virtual ~fvConstraint()
Destructor.
static autoPtr< fvConstraint > New(const word &name, const fvMesh &mesh, const dictionary &dict)
Return a reference to the selected fvConstraint.
Mesh data needed to do the Finite Volume discretisation.
bool remove(const char)
Remove all occurrences of character returning true if string changed.
A class for handling words, derived from string.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
#define IMPLEMENT_FV_CONSTRAINT_CONSTRAIN_FIELD(Type, constraintType)
#define IMPLEMENT_FV_CONSTRAINT_CONSTRAIN(Type, constraintType)
errorManipArg< error, int > exit(error &err, const int errNo=1)
dlLibraryTable libs
Table of loaded dynamic libraries.
Ostream & decrIndent(Ostream &os)
Decrement the indent level.
defineRunTimeSelectionTable(reactionRateFlameArea, dictionary)
Ostream & endl(Ostream &os)
Add newline and flush stream.
word name(const bool)
Return a word representation of a bool.
Ostream & incrIndent(Ostream &os)
Increment the indent level.
defineTypeNameAndDebug(combustionModel, 0)
label findIndex(const ListType &, typename ListType::const_reference, const label start=0)
Find first occurrence of given element and return index,.
FOR_ALL_FIELD_TYPES(makeFieldSourceTypedef)
Ostream & indent(Ostream &os)
Indent stream.