functionObjects/field: Simplified code using the VolField and SurfaceField partial specialisations

replacing the inconsistently named local typedefs and direct use of the more
complex GeometricField template types.
This commit is contained in:
Henry Weller
2022-12-01 22:01:54 +00:00
parent e8078ca235
commit 73c5624acf
21 changed files with 100 additions and 146 deletions

View File

@ -44,14 +44,12 @@ namespace functionObjects
template<class Type>
bool Foam::functionObjects::reconstruct::calcReconstruction()
{
typedef GeometricField<Type, fvsPatchField, surfaceMesh> SurfaceFieldType;
if (foundObject<SurfaceFieldType>(fieldName_))
if (foundObject<SurfaceField<Type>>(fieldName_))
{
return store
(
resultName_,
fvc::reconstruct(lookupObject<SurfaceFieldType>(fieldName_)),
fvc::reconstruct(lookupObject<SurfaceField<Type>>(fieldName_)),
mesh_.changing() && mesh_.solution().cache(resultName_)
);
}