40 refValueFunc_(nullptr),
41 refGradFunc_(nullptr),
42 valueFractionFunc_(nullptr)
55 refValueFunc_(nullptr),
56 refGradFunc_(nullptr),
57 valueFractionFunc_(nullptr)
89 valueFractionFunc_(
nullptr)
98 valueFractionFunc_.reset
100 Function1<scalar>::New
103 "uniformValueFraction",
109 else if (!refGradFunc_)
113 <<
"For " << this->internalField().name() <<
" on " 115 <<
"Require either or both: uniformValue and uniformGradient" 116 <<
" (possibly uniformValueFraction as well)" <<
nl 121 if (!this->readValueEntry(
dict))
124 this->extrapolateInternal();
135 const uniformMixedFaPatchField<Type>& ptf,
137 const DimensionedField<Type, areaMesh>& iF,
138 const faPatchFieldMapper& mapper
141 mixedFaPatchField<Type>(ptf,
p, iF, mapper),
142 refValueFunc_(ptf.refValueFunc_.clone()),
143 refGradFunc_(ptf.refGradFunc_.clone()),
144 valueFractionFunc_(ptf.valueFractionFunc_.clone())
155 refValueFunc_(ptf.refValueFunc_.clone()),
156 refGradFunc_(ptf.refGradFunc_.clone()),
157 valueFractionFunc_(ptf.valueFractionFunc_.clone())
169 refValueFunc_(ptf.refValueFunc_.clone()),
170 refGradFunc_(ptf.refGradFunc_.clone()),
171 valueFractionFunc_(ptf.valueFractionFunc_.clone())
174 if (ptf.refValueFunc_ || ptf.refGradFunc_)
191 const scalar t = this->db().time().timeOutputValue();
195 this->refValue() = refValueFunc_->value(t);
200 this->valueFraction() = valueFractionFunc_->value(t);
205 this->valueFraction() = 1;
210 this->refValue() =
Zero;
211 this->valueFraction() = 0;
215 this->refGrad() = refGradFunc_->value(t);
219 this->refGrad() =
Zero;
236 refValueFunc_->writeData(
os);
240 refGradFunc_->writeData(
os);
242 if (valueFractionFunc_)
244 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 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.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
virtual void evaluate(const Pstream::commsTypes commsType=Pstream::commsTypes::blocking)
Evaluate the patch field.
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)