Code simplification: GeometricField<Type, fvsPatchField, surfaceMesh> -> SurfaceField<Type>

Using the SurfaceField<Type> partial specialisation of
GeometricField<Type, fvsPatchField, surfaceMesh>
simplifies the code and improves readability.
This commit is contained in:
Henry Weller
2022-12-02 19:02:15 +00:00
parent e84300d124
commit fe368d5332
138 changed files with 476 additions and 478 deletions

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -92,7 +92,7 @@ public:
template<class Type>
tmp<Field<Type>> getFaceField
(
const GeometricField<Type, fvsPatchField, surfaceMesh>&
const SurfaceField<Type>&
) const;
//- Write surfaceFields
@ -101,7 +101,7 @@ public:
(
const UPtrList
<
const GeometricField<Type, fvsPatchField, surfaceMesh>
const SurfaceField<Type>
>&
);
};

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -31,7 +31,7 @@ License
template<class Type>
Foam::tmp<Field<Type>> Foam::surfaceMeshWriter::getFaceField
(
const GeometricField<Type, fvsPatchField, surfaceMesh>& sfld
const SurfaceField<Type>& sfld
) const
{
const polyBoundaryMesh& patches = sfld.mesh().boundaryMesh();
@ -65,13 +65,13 @@ void Foam::surfaceMeshWriter::write
(
const UPtrList
<
const GeometricField<Type, fvsPatchField, surfaceMesh>
const SurfaceField<Type>
>& sflds
)
{
forAll(sflds, fieldi)
{
const GeometricField<Type, fvsPatchField, surfaceMesh>& fld =
const SurfaceField<Type>& fld =
sflds[fieldi];
os_ << fld.name() << ' ' << pTraits<Type>::nComponents << ' '