Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev

This commit is contained in:
Henry Weller
2021-08-30 10:31:30 +01:00
2 changed files with 5 additions and 30 deletions

View File

@ -74,38 +74,17 @@ void Foam::fv::massSource::readCoeffs()
const dictionary& fieldCoeffs = coeffs().subDict("fieldValues");
forAllConstIter(dictionary, fieldCoeffs, iter)
{
fieldValues_.set(iter().keyword(), nullptr);
fieldValues_.set
(
iter().keyword(),
new unknownTypeFunction1(iter().keyword(), fieldCoeffs)
);
}
#define callReadFieldValues(Type, nullArg) readFieldValues<Type>();
FOR_ALL_FIELD_TYPES(callReadFieldValues);
#undef callReadFieldValues
massFlowRate_.reset(Function1<scalar>::New("massFlowRate", coeffs()).ptr());
}
template<class Type>
void Foam::fv::massSource::readFieldValues()
{
const dictionary& fieldCoeffs = coeffs().subDict("fieldValues");
forAllConstIter(dictionary, fieldCoeffs, iter)
{
const word& fieldName = iter().keyword();
if (mesh().foundObject<VolField<Type>>(fieldName))
{
fieldValues_.set
(
fieldName,
new unknownTypeFunction1(fieldName, fieldCoeffs)
);
}
}
}
template<class Type>
void Foam::fv::massSource::addGeneralSupType
(

View File

@ -112,10 +112,6 @@ class massSource
//- Non-virtual read
void readCoeffs();
//- Read field values for a given primitive type
template<class Type>
void readFieldValues();
// Sources