functionObjects::fieldValues::volFieldValue: Added support for VolInternalField
It is now possible to calculate field values of VolInternalFields, e.g. the
cached kEpsilon:G field in the
tutorials/modules/incompressibleFluid/pitzDailySteady case:
#includeFunc cellMax(kEpsilon:G)
This commit is contained in:
@ -34,7 +34,11 @@ bool Foam::functionObjects::fieldValues::volFieldValue::validField
|
||||
const word& fieldName
|
||||
) const
|
||||
{
|
||||
if (obr_.foundObject<VolField<Type>>(fieldName))
|
||||
if
|
||||
(
|
||||
obr_.foundObject<VolField<Type>>(fieldName)
|
||||
|| obr_.foundObject<VolInternalField<Type>>(fieldName)
|
||||
)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@ -55,6 +59,14 @@ Foam::functionObjects::fieldValues::volFieldValue::getFieldValues
|
||||
return filterField(obr_.lookupObject<VolField<Type>>(fieldName));
|
||||
}
|
||||
|
||||
if (obr_.foundObject<VolInternalField<Type>>(fieldName))
|
||||
{
|
||||
return filterField
|
||||
(
|
||||
obr_.lookupObject<VolInternalField<Type>>(fieldName)
|
||||
);
|
||||
}
|
||||
|
||||
FatalErrorInFunction
|
||||
<< "Field " << fieldName << " not found in database"
|
||||
<< abort(FatalError);
|
||||
|
||||
@ -61,15 +61,6 @@ class fieldsExpression
|
||||
{
|
||||
protected:
|
||||
|
||||
// Protected typedefs
|
||||
|
||||
//- Internal field typedef that doesn't go via the
|
||||
// GeometricField::Internal typedef, and therefore allows template
|
||||
// argument deduction of the Type
|
||||
template<class Type>
|
||||
using VolInternalField = DimensionedField<Type, volMesh>;
|
||||
|
||||
|
||||
// Protected member data
|
||||
|
||||
//- Names of fields to process
|
||||
|
||||
Reference in New Issue
Block a user