41 bool Foam::fvConstraint::constrainType
52 bool Foam::fvConstraint::constrainType(VolField<Type>& field)
const
63 const word& constraintType,
69 constraintType_(constraintType),
90 !dictionaryConstructorTablePtr_
91 || dictionaryConstructorTablePtr_->find(
type)
92 == dictionaryConstructorTablePtr_->end()
101 dictionaryConstructorTablePtr_
108 if (!dictionaryConstructorTablePtr_)
111 <<
"Unknown constraint type "
113 <<
"Table of fvConstraints is empty"
118 dictionaryConstructorTable::iterator cstrIter =
119 dictionaryConstructorTablePtr_->find(
type);
121 if (cstrIter == dictionaryConstructorTablePtr_->end())
124 <<
"Unknown fvConstraint " <<
type <<
nl <<
nl
125 <<
"Valid fvConstraints are:" <<
nl
126 << dictionaryConstructorTablePtr_->sortedToc()
153 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.
Enables the printing of a dictionary and subsequently looked-up defaulted entries.
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 & endl(Ostream &os)
Add newline and flush stream.
FOR_ALL_FIELD_TYPES(makeDimensionedPointFieldFunctions)
defineRunTimeSelectionTable(fvConstraint, dictionary)
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.
Ostream & indentOrNl(Ostream &os)
Indent stream or add newline if indent level == 0.
label findIndex(const ListType &, typename ListType::const_reference, const label start=0)
Find first occurrence of given element and return index,.
defineTypeNameAndDebug(atmosphericBoundaryLayer, 0)
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.