ENH: use readValueEntry, readMixedEntries for simpler program control

This commit is contained in:
Mark Olesen
2023-02-15 15:49:06 +01:00
parent 42dba36832
commit b17422ef1a
111 changed files with 328 additions and 677 deletions

View File

@ -149,27 +149,16 @@ externalCoupledTemperatureMixedFvPatchScalarField
Tref_ = Function1<scalar>::New("Tref", dict, &db());
}
if (dict.found("refValue"))
if (this->readMixedEntries(dict))
{
// Initialise same way as mixed
this->refValue() = scalarField("refValue", dict, p.size());
this->refGrad() = scalarField("refGradient", dict, p.size());
this->valueFraction() = scalarField("valueFraction", dict, p.size());
evaluate();
}
else
{
// For convenience: initialise as fixedValue with either read value
// or extrapolated value
if (dict.found("value"))
{
fvPatchField<scalar>::operator=
(
scalarField("value", dict, p.size())
);
}
else
if (!this->readValueEntry(dict))
{
fvPatchField<scalar>::operator=(this->patchInternalField());
}