40 refValueFunc_(nullptr),
41 refGradFunc_(nullptr),
42 valueFractionFunc_(nullptr)
55 refValueFunc_(nullptr),
56 refGradFunc_(nullptr),
57 valueFractionFunc_(nullptr)
91 valueFractionFunc_(
nullptr)
100 valueFractionFunc_.reset
102 Function1<scalar>::New
105 "uniformValueFraction",
112 else if (!refGradFunc_)
116 <<
"For " << this->internalField().name() <<
" on " 118 <<
"Require either or both: uniformValue and uniformGradient" 119 <<
" (possibly uniformValueFraction as well)" <<
nl 124 if (!this->readValueEntry(
dict))
127 this->extrapolateInternal();
138 const uniformMixedFaPatchField<Type>& ptf,
140 const DimensionedField<Type, areaMesh>& iF,
141 const faPatchFieldMapper& mapper
144 mixedFaPatchField<Type>(ptf,
p, iF, mapper),
145 refValueFunc_(ptf.refValueFunc_.clone()),
146 refGradFunc_(ptf.refGradFunc_.clone()),
147 valueFractionFunc_(ptf.valueFractionFunc_.clone())
158 refValueFunc_(ptf.refValueFunc_.clone()),
159 refGradFunc_(ptf.refGradFunc_.clone()),
160 valueFractionFunc_(ptf.valueFractionFunc_.clone())
172 refValueFunc_(ptf.refValueFunc_.clone()),
173 refGradFunc_(ptf.refGradFunc_.clone()),
174 valueFractionFunc_(ptf.valueFractionFunc_.clone())
177 if (ptf.refValueFunc_ || ptf.refGradFunc_)
194 const scalar t = this->db().time().timeOutputValue();
198 this->refValue() = refValueFunc_->value(t);
203 this->valueFraction() = valueFractionFunc_->value(t);
208 this->valueFraction() = 1;
213 this->refValue() =
Zero;
214 this->valueFraction() = 0;
218 this->refGrad() = refGradFunc_->value(t);
222 this->refGrad() =
Zero;
239 refValueFunc_->writeData(
os);
243 refGradFunc_->writeData(
os);
245 if (valueFractionFunc_)
247 valueFractionFunc_->writeData(
os);
virtual void write(Ostream &os) const
Write.
errorManipArg< error, int > exit(error &err, const int errNo=1)
A list of keyword definitions, which are a keyword followed by a number of values (eg...
This boundary condition provides a base class for 'mixed' type boundary conditions, i.e. conditions that mix fixed value and patch-normal gradient conditions.
constexpr char nl
The newline '\n' character (0x0a)
virtual void evaluate(const Pstream::commsTypes commsType=Pstream::commsTypes::buffered)
Evaluate the patch field.
virtual void readDict(const dictionary &dict)
Read dictionary entries.
void writeValueEntry(Ostream &os) const
Write *this field as a "value" entry.
Generic templated field type.
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.
const objectRegistry & db() const noexcept
Return the local objectRegistry.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
OBJstream os(runTime.globalPath()/outputName)
static autoPtr< Function1< Type > > NewIfPresent(const word &entryName, const dictionary &dict, const word &redirectType, const objectRegistry *obrPtr=nullptr)
An optional selector, with fallback redirection.
Finite area patch class. Used for 2-D non-Euclidian finite area method.
gmvFile<< "tracers "<< particles.size()<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().x()<< ' ';}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().y()<< ' ';}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().z()<< ' ';}gmvFile<< nl;for(const word &name :lagrangianScalarNames){ IOField< scalar > fld(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
const std::string patch
OpenFOAM patch number as a std::string.
A class representing the concept of 0 (zero) that can be used to avoid manipulating objects known to ...
IOerror FatalIOError
Error stream (stdout output on all processes), with additional 'FOAM FATAL IO ERROR' header text and ...
static constexpr const zero Zero
Global zero (0)