ENH: extend type aliases to include geometric boundary fields (#2348)

STYLE: LduInterfaceFieldPtrsList as alias instead of a class

STYLE: define patch lists typedefs when defining the base patch

- eg, polyPatchList typedef within polyPatch.H

INT: relocate GeometricField::Boundary -> GeometricBoundaryField

- was internal to GeometricField but moving it outside simplifies
  forward declarations etc. Code adapted from openfoam.org
This commit is contained in:
Mark Olesen
2022-03-25 19:26:25 +01:00
parent 39064f65e9
commit e98acdc4fc
58 changed files with 666 additions and 722 deletions

View File

@ -317,8 +317,7 @@ Foam::edgeInterpolationScheme<Type>::interpolate
// Interpolate across coupled patches using given lambdas
const typename GeometricField<Type, faPatchField, areaMesh>::Boundary&
vfb = vf.boundaryField();
const auto& vfb = vf.boundaryField();
forAll(lambdas.boundaryField(), pi)
{

View File

@ -123,8 +123,7 @@ Foam::tmp<Foam::edgeScalarField> Foam::faNVDscheme<Type,NVDweight>::weights
}
GeometricField<scalar, faePatchField, edgeMesh>::Boundary&
bWeights = weightingFactors.boundaryFieldRef();
auto& bWeights = weightingFactors.boundaryFieldRef();
forAll(bWeights, patchI)
{

View File

@ -33,7 +33,7 @@ License
template<class Type>
Foam::tmp<Foam::Field<Type>> Foam::volSurfaceMapping::mapToSurface
(
const typename GeometricField<Type, fvPatchField, volMesh>::Boundary& df
const GeometricBoundaryField<Type, fvPatchField, volMesh>& df
) const
{
// Grab labels for all faces in faMesh
@ -98,7 +98,7 @@ Foam::tmp<Foam::Field<Type>> Foam::volSurfaceMapping::mapToSurface
template<class Type>
Foam::tmp<Foam::Field<Type>> Foam::volSurfaceMapping::mapInternalToSurface
(
const typename GeometricField<Type, fvPatchField, volMesh>::Boundary& df
const GeometricBoundaryField<Type, fvPatchField, volMesh>& df
) const
{
// Grab labels for all faces in faMesh
@ -134,7 +134,7 @@ template<class Type>
void Foam::volSurfaceMapping::mapToVolume
(
const GeometricField<Type, faPatchField, areaMesh>& af,
typename GeometricField<Type, fvPatchField, volMesh>::Boundary& bf
GeometricBoundaryField<Type, fvPatchField, volMesh>& bf
) const
{
// Grab labels for all faces in faMesh
@ -166,7 +166,7 @@ template<class Type>
void Foam::volSurfaceMapping::mapToVolume
(
const tmp<GeometricField<Type, faPatchField, areaMesh>>& taf,
typename GeometricField<Type, fvPatchField, volMesh>::Boundary& bf
GeometricBoundaryField<Type, fvPatchField, volMesh>& bf
) const
{
mapToVolume(taf(), bf);

View File

@ -38,8 +38,8 @@ SourceFiles
\*---------------------------------------------------------------------------*/
#ifndef volSurfaceMapping_H
#define volSurfaceMapping_H
#ifndef Foam_volSurfaceMapping_H
#define Foam_volSurfaceMapping_H
#include "faMesh.H"
#include "volMesh.H"
@ -49,6 +49,7 @@ SourceFiles
namespace Foam
{
// Forward Declarations
template<class Type> class fvPatchField;
/*---------------------------------------------------------------------------*\
@ -86,12 +87,11 @@ public:
// Member Functions
//- Map Boundary field to surface
//- Map volume boundary field to surface
template<class Type>
tmp<Field<Type>> mapToSurface
(
const typename
GeometricField<Type, fvPatchField, volMesh>::Boundary& df
const GeometricBoundaryField<Type, fvPatchField, volMesh>& df
) const;
//- Map vol Field to surface Field
@ -102,8 +102,7 @@ public:
template<class Type>
tmp<Field<Type>> mapInternalToSurface
(
const typename
GeometricField<Type, fvPatchField, volMesh>::Boundary& df
const GeometricBoundaryField<Type, fvPatchField, volMesh>& df
) const;
//- Map surface field to volume boundary field
@ -111,7 +110,7 @@ public:
void mapToVolume
(
const GeometricField<Type, faPatchField, areaMesh>& af,
typename GeometricField<Type, fvPatchField, volMesh>::Boundary& bf
GeometricBoundaryField<Type, fvPatchField, volMesh>& bf
) const;
//- Map surface tmp field to volume boundary field
@ -119,7 +118,7 @@ public:
void mapToVolume
(
const tmp<GeometricField<Type, faPatchField, areaMesh>>& taf,
typename GeometricField<Type, fvPatchField, volMesh>::Boundary& bf
GeometricBoundaryField<Type, fvPatchField, volMesh>& bf
) const;
//- Map surface field to field