50 const DimensionedField<Type, volMesh>& iF
69 parent_bctype(
rhs,
p, iF, mapper),
72 driver_(this->patch(),
rhs.driver_, dict_)
92 expressions::patchExprFieldBase::expectedTypes::VALUE_TYPE
108 driver_(this->patch(), dict_)
111 <<
"Use uniformFixedValue with an expression Function1 instead." <<
nl
112 <<
" This boundary condition will be removed in the future" <<
endl;
118 if (this->valueExpr_.empty())
121 <<
"The valueExpr was not defined!" <<
nl
126 driver_.readDict(dict_);
131 if (!this->readValueEntry(
dict))
134 this->extrapolateInternal();
138 <<
"No value defined for "
139 << this->internalField().name() <<
" on "
140 << this->
patch().name() <<
" - using patch internal field" <<
endl;
144 if (this->evalOnConstruct_)
155 const exprFixedValueFvPatchField<Type>&
rhs
159 expressions::patchExprFieldBase(
rhs),
161 driver_(this->patch(),
rhs.driver_, dict_)
175 parent_bctype(
rhs, iF),
178 driver_(this->patch(),
rhs.driver_, dict_)
198 <<
"Value: " << this->valueExpr_ <<
nl
200 driver_.writeVariableStrings(
Info) <<
nl;
207 bool evalValue = (!this->valueExpr_.empty() && this->valueExpr_ !=
"0");
210 driver_.clearVariables();
214 (*this) == driver_.evaluate<Type>(this->valueExpr_);
222 this->parent_bctype::updateCoeffs();
229 this->parent_bctype::write(
os);
232 driver_.writeCommon(
os, this->debug_ || debug);
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
readOption
Enumeration defining read preferences.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
A wrapper for dictionary content, without operators that could affect inheritance patterns.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
A fixed value boundary condition with expressions.
exprFixedValueFvPatchField(const fvPatch &p, const DimensionedField< Type, volMesh > &)
Construct from patch and internal field.
dictionary dict_
Dictionary contents for the boundary condition.
expressions::patchExpr::parseDriver driver_
The expression driver.
virtual void write(Ostream &os) const
Write.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
void setDebug()
Set debug ON if "debug" is enabled.
void write(Ostream &os) const
Write.
expectedTypes
Enumeration of expected expressions.
patchExprFieldBase()
Default construct.
expressions::exprString valueExpr_
bool debug_
Add debugging.
virtual void write(Ostream &) const
Write includes "value" entry.
virtual void readDict(const dictionary &dict)
Read dictionary entries.
const fvPatch & patch() const noexcept
Return the patch.
bool updated() const noexcept
True if the boundary condition has already been updated.
A FieldMapper for finite-volume patch fields.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
virtual void evaluate(const Pstream::commsTypes commsType=Pstream::commsTypes::buffered)
Evaluate the patch field, sets updated() to false.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
OBJstream os(runTime.globalPath()/outputName)
#define WarningInFunction
Report a warning using Foam::Warning.
#define DeprecatedInFunction(afterVersion)
Report a warning using Foam::Warning.
#define DebugInFunction
Report an information message using Foam::Info.
#define InfoInFunction
Report an information message using Foam::Info.
Namespace for handling debugging switches.
A namespace for expression-related classes/traits etc.
const std::string patch
OpenFOAM patch number as a std::string.
string evaluate(label fieldWidth, const std::string &s, size_t pos=0, size_t len=std::string::npos)
String evaluation with specified (positive, non-zero) field width.
List< word > wordList
List of word.
messageStream Info
Information stream (stdout output on master, null elsewhere).
Ostream & endl(Ostream &os)
Add newline and flush stream.
IOerror FatalIOError
Error stream (stdout output on all processes), with additional 'FOAM FATAL IO ERROR' header text and ...
void rhs(fvMatrix< typename Expr::value_type > &m, const Expr &expression)
static constexpr const zero Zero
Global zero (0).
errorManipArg< error, int > exit(error &err, const int errNo=1)
constexpr char nl
The newline '\n' character (0x0a).