41 bool Foam::fvConstraint::constrainType
52 bool Foam::fvConstraint::constrainType(VolField<Type>& field)
const
63 const word& constraintType,
69 constraintType_(constraintType),
89 <<
"Selecting finite volume constraint type " << constraintType <<
endl;
93 !dictionaryConstructorTablePtr_
94 || dictionaryConstructorTablePtr_->find(constraintType)
95 == dictionaryConstructorTablePtr_->end()
104 dictionaryConstructorTablePtr_
111 if (!dictionaryConstructorTablePtr_)
114 <<
"Unknown constraint type "
115 << constraintType <<
nl <<
nl
116 <<
"Table of fvConstraints is empty"
121 dictionaryConstructorTable::iterator cstrIter =
122 dictionaryConstructorTablePtr_->find(constraintType);
124 if (cstrIter == dictionaryConstructorTablePtr_->end())
127 <<
"Unknown fvConstraint " << constraintType <<
nl <<
nl
128 <<
"Valid fvConstraints are:" <<
nl
129 << dictionaryConstructorTablePtr_->sortedToc()
154 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 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 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.
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
#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.
Ostream & incrIndent(Ostream &os)
Increment the indent level.
defineTypeNameAndDebug(combustionModel, 0)
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.
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.