Code simplification: GeometricField<Type, pointPatchField, pointMesh> -> PointField<Type>

Using the PointField<Type> partial specialisation of GeometricField<Type,
pointPatchField, pointMesh> simplified the code and improves readability.
This commit is contained in:
Henry Weller
2022-12-02 15:24:50 +00:00
parent 5f7993dab4
commit e84300d124
52 changed files with 179 additions and 184 deletions

View File

@ -114,7 +114,7 @@ public:
//- Reconstruct field
template<class Type>
tmp<GeometricField<Type, pointPatchField, pointMesh>>
tmp<PointField<Type>>
reconstructField(const IOobject& fieldIoObject);
//- Reconstruct and write all fields

View File

@ -32,7 +32,7 @@ Foam::tmp<Foam::GeometricField<Type, Foam::pointPatchField, Foam::pointMesh>>
Foam::pointFieldReconstructor::reconstructField(const IOobject& fieldIoObject)
{
// Read the field for all the processors
PtrList<GeometricField<Type, pointPatchField, pointMesh>> procFields
PtrList<PointField<Type>> procFields
(
procMeshes_.size()
);
@ -42,7 +42,7 @@ Foam::pointFieldReconstructor::reconstructField(const IOobject& fieldIoObject)
procFields.set
(
proci,
new GeometricField<Type, pointPatchField, pointMesh>
new PointField<Type>
(
IOobject
(
@ -67,7 +67,7 @@ Foam::pointFieldReconstructor::reconstructField(const IOobject& fieldIoObject)
forAll(procMeshes_, proci)
{
const GeometricField<Type, pointPatchField, pointMesh>&
const PointField<Type>&
procField = procFields[proci];
// Get processor-to-global addressing for use in rmap
@ -118,9 +118,9 @@ Foam::pointFieldReconstructor::reconstructField(const IOobject& fieldIoObject)
// Construct and write the field
// setting the internalField and patchFields
return tmp<GeometricField<Type, pointPatchField, pointMesh>>
return tmp<PointField<Type>>
(
new GeometricField<Type, pointPatchField, pointMesh>
new PointField<Type>
(
IOobject
(
@ -149,7 +149,7 @@ void Foam::pointFieldReconstructor::reconstructFields
{
word fieldClassName
(
GeometricField<Type, pointPatchField, pointMesh>::typeName
PointField<Type>::typeName
);
IOobjectList fields = objects.lookupClass(fieldClassName);