ENH: type aliases for common GeometricField forms (#2348)

ENH: provide fieldTypes::surface names (as per fieldTypes::volume)

ENH: reduce number of files for surface fields

- combine face and point field declarations/definitions,
  simplify typeName definitions
This commit is contained in:
Mark Olesen
2022-02-01 19:51:32 +01:00
parent 4f8b8258fc
commit 7db2a29413
48 changed files with 382 additions and 562 deletions

View File

@ -62,7 +62,6 @@ Note
#include "triSurface.H" #include "triSurface.H"
#include "surfMesh.H" #include "surfMesh.H"
#include "surfFields.H" #include "surfFields.H"
#include "surfPointFields.H"
#include "MeshedSurfaces.H" #include "MeshedSurfaces.H"
#include "ModifiableMeshedSurface.H" #include "ModifiableMeshedSurface.H"

View File

@ -29,8 +29,8 @@ Description
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef fieldTypes_H #ifndef Foam_fieldTypes_H
#define fieldTypes_H #define Foam_fieldTypes_H
#include "label.H" #include "label.H"
#include "scalar.H" #include "scalar.H"
@ -40,9 +40,11 @@ Description
#include "tensor.H" #include "tensor.H"
#include "triad.H" #include "triad.H"
#include "macros.H" #include "macros.H"
#include "wordList.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#define CAPITALIZE_label Label
#define CAPITALIZE_scalar Scalar #define CAPITALIZE_scalar Scalar
#define CAPITALIZE_vector Vector #define CAPITALIZE_vector Vector
#define CAPITALIZE_sphericalTensor SphericalTensor #define CAPITALIZE_sphericalTensor SphericalTensor

View File

@ -41,8 +41,6 @@ SourceFiles
#include "pointPatchFields.H" #include "pointPatchFields.H"
#include "pointFieldsFwd.H" #include "pointFieldsFwd.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif #endif
// ************************************************************************* // // ************************************************************************* //

View File

@ -6,7 +6,7 @@
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2011 OpenFOAM Foundation Copyright (C) 2011 OpenFOAM Foundation
Copyright (C) 2018 OpenCFD Ltd. Copyright (C) 2018-2022 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -35,8 +35,8 @@ SourceFiles
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef pointFieldsFwd_H #ifndef Foam_pointFieldsFwd_H
#define pointFieldsFwd_H #define Foam_pointFieldsFwd_H
#include "fieldTypes.H" #include "fieldTypes.H"
@ -45,15 +45,26 @@ SourceFiles
namespace Foam namespace Foam
{ {
template<class Type, class GeoMesh> class DimensionedField;
template<class Type, template<class> class PatchField, class GeoMesh>
class GeometricField;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Forward Declarations // Forward Declarations
class pointMesh; class pointMesh;
template<class Type> class pointPatchField; template<class Type> class pointPatchField;
template<class Type, template<class> class PatchField, class GeoMesh>
class GeometricField; //- A point field for a given type
template<class Type>
using PointField = GeometricField<Type, pointPatchField, pointMesh>;
//- A point internal field for a given type
template<class Type>
using PointInternalField = DimensionedField<Type, pointMesh>;
// Typedefs // Typedefs

View File

@ -38,8 +38,8 @@ SourceFiles
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef areaFields_H #ifndef Foam_areaFields_H
#define areaFields_H #define Foam_areaFields_H
#include "objectRegistry.H" #include "objectRegistry.H"
#include "GeometricFields.H" #include "GeometricFields.H"

View File

@ -6,7 +6,7 @@
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2016-2017 Wikki Ltd Copyright (C) 2016-2017 Wikki Ltd
Copyright (C) 2018 OpenCFD Ltd. Copyright (C) 2018-2022 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -32,8 +32,8 @@ SourceFiles
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef areaFieldsFwd_H #ifndef Foam_areaFieldsFwd_H
#define areaFieldsFwd_H #define Foam_areaFieldsFwd_H
#include "fieldTypes.H" #include "fieldTypes.H"
@ -42,15 +42,25 @@ SourceFiles
namespace Foam namespace Foam
{ {
template<class Type, class GeoMesh> class DimensionedField;
template<class Type, template<class> class PatchField, class GeoMesh>
class GeometricField;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Forward Declarations // Forward Declarations
class areaMesh; class areaMesh;
template<class Type> class faPatchField; template<class Type> class faPatchField;
template<class Type, template<class> class PatchField, class GeoMesh>
class GeometricField; //- An area field for a given type
template<class Type>
using AreaField = GeometricField<Type, faPatchField, areaMesh>;
//- An area internal field for a given type
template<class Type>
using AreaInternalField = DimensionedField<Type, areaMesh>;
// Typedefs // Typedefs

View File

@ -50,8 +50,6 @@ SourceFiles
#include "edgeFieldsFwd.H" #include "edgeFieldsFwd.H"
#include "calculatedFaePatchFields.H" #include "calculatedFaePatchFields.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif #endif
// ************************************************************************* // // ************************************************************************* //

View File

@ -31,8 +31,8 @@ Description
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef edgeFieldsFwd_H #ifndef Foam_edgeFieldsFwd_H
#define edgeFieldsFwd_H #define Foam_edgeFieldsFwd_H
#include "fieldTypes.H" #include "fieldTypes.H"
@ -41,15 +41,21 @@ Description
namespace Foam namespace Foam
{ {
template<class Type, template<class> class PatchField, class GeoMesh>
class GeometricField;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Forward Declarations // Forward Declarations
class edgeMesh; class edgeMesh;
template<class Type> class faePatchField; template<class Type> class faePatchField;
template<class Type, template<class> class PatchField, class GeoMesh>
class GeometricField; /// Future? (TBD)
/// //- An (area) edge field for a given type
/// template<class Type>
/// using EdgeField = GeometricField<Type, faePatchField, edgeMesh>;
// Typedefs // Typedefs
@ -60,6 +66,7 @@ typedef GeometricField<sphericalTensor, faePatchField, edgeMesh>
typedef GeometricField<symmTensor, faePatchField, edgeMesh> edgeSymmTensorField; typedef GeometricField<symmTensor, faePatchField, edgeMesh> edgeSymmTensorField;
typedef GeometricField<tensor, faePatchField, edgeMesh> edgeTensorField; typedef GeometricField<tensor, faePatchField, edgeMesh> edgeTensorField;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam } // End namespace Foam

View File

@ -28,8 +28,8 @@ InClass
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef slicedSurfaceFields_H #ifndef Foam_slicedSurfaceFields_H
#define slicedSurfaceFields_H #define Foam_slicedSurfaceFields_H
#include "SlicedGeometricField.H" #include "SlicedGeometricField.H"
#include "slicedFvsPatchField.H" #include "slicedFvsPatchField.H"

View File

@ -6,6 +6,7 @@
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2011 OpenFOAM Foundation Copyright (C) 2011 OpenFOAM Foundation
Copyright (C) 2022 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -28,8 +29,8 @@ InClass
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef slicedSurfaceFieldsFwd_H #ifndef Foam_slicedSurfaceFieldsFwd_H
#define slicedSurfaceFieldsFwd_H #define Foam_slicedSurfaceFieldsFwd_H
#include "fieldTypes.H" #include "fieldTypes.H"
@ -38,16 +39,6 @@ InClass
namespace Foam namespace Foam
{ {
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
class surfaceMesh;
template<class Type>
class fvsPatchField;
template<class Type>
class slicedFvsPatchField;
template template
< <
class Type, class Type,
@ -57,6 +48,23 @@ template
> >
class SlicedGeometricField; class SlicedGeometricField;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Forward Declarations
class surfaceMesh;
template<class Type> class fvsPatchField;
template<class Type> class slicedFvsPatchField;
//- A (volume) surface field slice for a given type
template<class Type>
using SurfaceSliceField =
SlicedGeometricField<Type, fvsPatchField, slicedFvsPatchField, surfaceMesh>;
// Typedefs
typedef typedef
SlicedGeometricField<scalar, fvsPatchField, slicedFvsPatchField, surfaceMesh> SlicedGeometricField<scalar, fvsPatchField, slicedFvsPatchField, surfaceMesh>
slicedSurfaceScalarField; slicedSurfaceScalarField;
@ -89,6 +97,7 @@ typedef
SlicedGeometricField<tensor, fvsPatchField, slicedFvsPatchField, surfaceMesh> SlicedGeometricField<tensor, fvsPatchField, slicedFvsPatchField, surfaceMesh>
slicedSurfaceTensorField; slicedSurfaceTensorField;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam } // End namespace Foam

View File

@ -6,6 +6,7 @@
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2011-2016 OpenFOAM Foundation Copyright (C) 2011-2016 OpenFOAM Foundation
Copyright (C) 2022 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -71,4 +72,19 @@ defineTemplateTypeNameAndDebug(surfaceTensorField, 0);
} // End namespace Foam } // End namespace Foam
// * * * * * * * * * * * * * * * * Global Data * * * * * * * * * * * * * * * //
// Note hard-coded values are more reliable than other alternatives
const Foam::wordList Foam::fieldTypes::surface
({
"surfaceScalarField",
"surfaceVectorField",
"surfaceSphericalTensorField",
"surfaceSymmTensorField",
"surfaceTensorField"
});
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -34,8 +34,8 @@ SourceFiles
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef surfaceFields_H #ifndef Foam_surfaceFields_H
#define surfaceFields_H #define Foam_surfaceFields_H
#include "GeometricFields.H" #include "GeometricFields.H"
#include "surfaceMesh.H" #include "surfaceMesh.H"
@ -44,8 +44,6 @@ SourceFiles
#include "surfaceFieldsFwd.H" #include "surfaceFieldsFwd.H"
#include "calculatedFvsPatchFields.H" #include "calculatedFvsPatchFields.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif #endif
// ************************************************************************* // // ************************************************************************* //

View File

@ -6,6 +6,7 @@
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2011 OpenFOAM Foundation Copyright (C) 2011 OpenFOAM Foundation
Copyright (C) 2022 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -33,8 +34,8 @@ SourceFiles
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef surfaceFieldsFwd_H #ifndef Foam_surfaceFieldsFwd_H
#define surfaceFieldsFwd_H #define Foam_surfaceFieldsFwd_H
#include "fieldTypes.H" #include "fieldTypes.H"
@ -43,15 +44,21 @@ SourceFiles
namespace Foam namespace Foam
{ {
template<class Type, template<class> class PatchField, class GeoMesh>
class GeometricField;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Forward Declarations // Forward Declarations
class surfaceMesh; class surfaceMesh;
template<class Type> class fvsPatchField; template<class Type> class fvsPatchField;
template<class Type, template<class> class PatchField, class GeoMesh>
class GeometricField; //- A (volume) surface field for a given type
template<class Type>
using SurfaceField = GeometricField<Type, fvsPatchField, surfaceMesh>;
// Typedefs // Typedefs
@ -63,6 +70,19 @@ typedef GeometricField<symmTensor, fvsPatchField, surfaceMesh>
surfaceSymmTensorField; surfaceSymmTensorField;
typedef GeometricField<tensor, fvsPatchField, surfaceMesh> surfaceTensorField; typedef GeometricField<tensor, fvsPatchField, surfaceMesh> surfaceTensorField;
/*---------------------------------------------------------------------------*\
Namespace fieldTypes Declaration
\*---------------------------------------------------------------------------*/
namespace fieldTypes
{
//- Standard surface field types (scalar, vector, tensor, etc)
extern const wordList surface;
} // End namespace fieldTypes
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam } // End namespace Foam

View File

@ -28,16 +28,14 @@ InClass
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef slicedVolFields_H #ifndef Foam_slicedVolFields_H
#define slicedVolFields_H #define Foam_slicedVolFields_H
#include "SlicedGeometricField.H" #include "SlicedGeometricField.H"
#include "slicedFvPatchField.H" #include "slicedFvPatchField.H"
#include "volMesh.H" #include "volMesh.H"
#include "slicedVolFieldsFwd.H" #include "slicedVolFieldsFwd.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif #endif
// ************************************************************************* // // ************************************************************************* //

View File

@ -6,6 +6,7 @@
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2011 OpenFOAM Foundation Copyright (C) 2011 OpenFOAM Foundation
Copyright (C) 2022 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -28,8 +29,8 @@ InClass
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef slicedVolFieldsFwd_H #ifndef Foam_slicedVolFieldsFwd_H
#define slicedVolFieldsFwd_H #define Foam_slicedVolFieldsFwd_H
#include "fieldTypes.H" #include "fieldTypes.H"
@ -38,16 +39,6 @@ InClass
namespace Foam namespace Foam
{ {
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
class volMesh;
template<class Type>
class fvPatchField;
template<class Type>
class slicedFvPatchField;
template template
< <
class Type, class Type,
@ -57,6 +48,22 @@ template
> >
class SlicedGeometricField; class SlicedGeometricField;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Forward Declarations
class volMesh;
template<class Type> class fvPatchField;
template<class Type> class slicedFvPatchField;
//- A volume field slice for a given type
template<class Type>
using VolumeSliceField =
SlicedGeometricField<Type, fvPatchField, slicedFvPatchField, volMesh>;
// Typedefs
typedef typedef
SlicedGeometricField<scalar, fvPatchField, slicedFvPatchField, volMesh> SlicedGeometricField<scalar, fvPatchField, slicedFvPatchField, volMesh>
slicedVolScalarField; slicedVolScalarField;

View File

@ -6,7 +6,7 @@
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2011 OpenFOAM Foundation Copyright (C) 2011 OpenFOAM Foundation
Copyright (C) 2018 OpenCFD Ltd. Copyright (C) 2018-2022 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -35,26 +35,36 @@ SourceFiles
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef volFieldsFwd_H #ifndef Foam_volFieldsFwd_H
#define volFieldsFwd_H #define Foam_volFieldsFwd_H
#include "fieldTypes.H" #include "fieldTypes.H"
#include "wordList.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam namespace Foam
{ {
template<class Type, class GeoMesh> class DimensionedField;
template<class Type, template<class> class PatchField, class GeoMesh>
class GeometricField;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Forward Declarations // Forward Declarations
class volMesh; class volMesh;
template<class Type> class fvPatchField; template<class Type> class fvPatchField;
template<class Type, template<class> class PatchField, class GeoMesh>
class GeometricField; //- A volume field for a given type
template<class Type>
using VolumeField = GeometricField<Type, fvPatchField, volMesh>;
//- A volume internal field for a given Type
template<class Type>
using VolumeInternalField = DimensionedField<Type, volMesh>;
// Typedefs // Typedefs

View File

@ -81,7 +81,7 @@ meshSearch/meshSearch.C
meshSearch/meshSearchFACE_CENTRE_TRISMeshObject.C meshSearch/meshSearchFACE_CENTRE_TRISMeshObject.C
meshSearch/meshSearchMeshObject.C meshSearch/meshSearchMeshObject.C
fields/polyFields.C fields/polyMeshFields.C
meshTools/meshTools.C meshTools/meshTools.C
algorithms = algorithms algorithms = algorithms

View File

@ -31,8 +31,8 @@ Description
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef polyGeoMesh_H #ifndef Foam_polyGeoMesh_H
#define polyGeoMesh_H #define Foam_polyGeoMesh_H
#include "GeoMesh.H" #include "GeoMesh.H"
#include "polyMesh.H" #include "polyMesh.H"

View File

@ -25,13 +25,13 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "polyFields.H" #include "polyMeshFields.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam namespace Foam
{ {
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
// Naming to shadow volScalarField::Internal etc. // Naming to shadow volScalarField::Internal etc.
// keep synchronized with finiteVolume volFields.C // keep synchronized with finiteVolume volFields.C
@ -70,4 +70,5 @@ const word DimensionedField<tensor, polyGeoMesh>::typeName
} // End namespace Foam } // End namespace Foam
// ************************************************************************* // // ************************************************************************* //

View File

@ -5,7 +5,7 @@
\\ / A nd | www.openfoam.com \\ / A nd | www.openfoam.com
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2011 OpenFOAM Foundation Copyright (C) 2018 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -23,40 +23,25 @@ License
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
InClass
Foam::polyMeshFields
Description
A polyMesh-based naming and storage for internal volume fields when a
Foam::fvMesh is unavailable. Use sparingly.
SourceFields
polyMeshFields.C
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "surfPointFields.H" #ifndef Foam_polyMeshFields_H
#define Foam_polyMeshFields_H
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // #include "DimensionedField.H"
#include "polyGeoMesh.H"
#include "polyMeshFieldsFwd.H"
namespace Foam #endif
{
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
template<>
const word surfPointLabelField::typeName("surfPointLabelField");
template<>
const word surfPointScalarField::typeName("surfPointScalarField");
template<>
const word surfPointVectorField::typeName("surfPointVectorField");
template<>
const word surfPointSphericalTensorField::typeName
(
"surfPointSphericalTensorField"
);
template<>
const word surfPointSymmTensorField::typeName("surfPointSymmTensorField");
template<>
const word surfPointTensorField::typeName("surfPointTensorField");
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// ************************************************************************* // // ************************************************************************* //

View File

@ -5,7 +5,7 @@
\\ / A nd | www.openfoam.com \\ / A nd | www.openfoam.com
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2018 OpenCFD Ltd. Copyright (C) 2022 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -23,36 +23,32 @@ License
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
InClass
Foam::polyFields
Description
A polyMesh-based naming and storage for internal volume fields when a
Foam::fvMesh is unavailable. Use sparingly.
SourceFields
polyFields.C
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef polyFields_H #ifndef Foam_polyMeshFieldsFwd_H
#define polyFields_H #define Foam_polyMeshFieldsFwd_H
#include "DimensionedField.H" #include "fieldTypes.H"
#include "polyGeoMesh.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam namespace Foam
{ {
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // template<class Type, class GeoMesh> class DimensionedField;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Internal (volume) fields on a polyMesh
class polyGeoMesh;
typedef DimensionedField<scalar, polyGeoMesh> polyMeshScalarField;
typedef DimensionedField<vector, polyGeoMesh> polyMeshVectorField;
typedef DimensionedField<sphericalTensor, polyGeoMesh>
polyMeshSphericalTensorField;
typedef DimensionedField<symmTensor, polyGeoMesh> polyMeshSymmTensorField;
typedef DimensionedField<tensor, polyGeoMesh> polyMeshTensorField;
typedef DimensionedField<scalar,polyGeoMesh> polyScalarField;
typedef DimensionedField<vector,polyGeoMesh> polyVectorField;
typedef DimensionedField<sphericalTensor,polyGeoMesh> polySphericalTensorField;
typedef DimensionedField<symmTensor,polyGeoMesh> polySymmTensorField;
typedef DimensionedField<tensor,polyGeoMesh> polyTensorField;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -38,16 +38,6 @@ namespace Foam
} }
const Foam::wordList Foam::sampledSurface::surfaceFieldTypes
({
"surfaceScalarField",
"surfaceVectorField",
"surfaceSphericalTensorField",
"surfaceSymmTensorField",
"surfaceTensorField"
});
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
void Foam::sampledSurface::clearGeom() const void Foam::sampledSurface::clearGeom() const

View File

@ -98,16 +98,6 @@ class sampledSurface
: :
public meshedSurf public meshedSurf
{ {
public:
// Public Static Data
//- Class names for surface field types
static const wordList surfaceFieldTypes;
private:
// Private Data // Private Data
//- The name of the sample surface //- The name of the sample surface

View File

@ -31,6 +31,7 @@ License
#include "mapPolyMesh.H" #include "mapPolyMesh.H"
#include "volFields.H" #include "volFields.H"
#include "surfaceFields.H"
#include "HashOps.H" #include "HashOps.H"
#include "ListOps.H" #include "ListOps.H"
#include "Time.H" #include "Time.H"
@ -159,7 +160,7 @@ Foam::IOobjectList Foam::sampledSurfaces::preCheckFields()
{ {
nVolumeFields += n; nVolumeFields += n;
} }
else if (sampledSurface::surfaceFieldTypes.found(clsName)) else if (fieldTypes::surface.found(clsName))
{ {
nSurfaceFields += n; nSurfaceFields += n;
} }

View File

@ -31,7 +31,6 @@ License
#include "surfaceFields.H" #include "surfaceFields.H"
#include "polySurface.H" #include "polySurface.H"
#include "polySurfaceFields.H" #include "polySurfaceFields.H"
#include "polySurfacePointFields.H"
#include "surfMesh.H" #include "surfMesh.H"
#include "surfGeoMesh.H" #include "surfGeoMesh.H"

View File

@ -10,14 +10,12 @@ polySurface/polySurface.C
polySurface/polySurfaceClear.C polySurface/polySurfaceClear.C
polySurface/polySurfaceIO.C polySurface/polySurfaceIO.C
polySurface/fields/polySurfaceFields.C polySurface/fields/polySurfaceFields.C
polySurface/fields/polySurfacePointFields.C
surfaceRegistry/surfaceRegistry.C surfaceRegistry/surfaceRegistry.C
surfMesh/surfMesh.C surfMesh/surfMesh.C
surfMesh/surfMeshClear.C surfMesh/surfMeshClear.C
surfMesh/surfMeshIO.C surfMesh/surfMeshIO.C
surfMesh/fields/surfFields.C surfMesh/fields/surfFields.C
surfMesh/fields/surfPointFields.C
surfZone/surfZone.C surfZone/surfZone.C
surfZone/surfZoneIOList.C surfZone/surfZoneIOList.C

View File

@ -5,7 +5,7 @@
\\ / A nd | www.openfoam.com \\ / A nd | www.openfoam.com
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2019 OpenCFD Ltd. Copyright (C) 2019-2022 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -26,41 +26,36 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "polySurfaceFields.H" #include "polySurfaceFields.H"
#include "className.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam namespace Foam
{ {
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // // Face fields
template<> defineTemplateTypeName(polySurfaceLabelField);
const word polySurfaceLabelField::typeName defineTemplateTypeName(polySurfaceScalarField);
("polySurfaceLabelField"); defineTemplateTypeName(polySurfaceVectorField);
defineTemplateTypeName(polySurfaceSphericalTensorField);
defineTemplateTypeName(polySurfaceSymmTensorField);
defineTemplateTypeName(polySurfaceTensorField);
template<>
const word polySurfaceScalarField::typeName
("polySurfaceScalarField");
template<> // Point fields
const word polySurfaceVectorField::typeName
("polySurfaceVectorField");
template<> defineTemplateTypeName(polySurfacePointLabelField);
const word polySurfaceSphericalTensorField::typeName defineTemplateTypeName(polySurfacePointScalarField);
("polySurfaceSphericalTensorField"); defineTemplateTypeName(polySurfacePointVectorField);
defineTemplateTypeName(polySurfacePointSphericalTensorField);
template<> defineTemplateTypeName(polySurfacePointSymmTensorField);
const word polySurfaceSymmTensorField::typeName defineTemplateTypeName(polySurfacePointTensorField);
("polySurfaceSymmTensorField");
template<>
const word polySurfaceTensorField::typeName
("polySurfaceTensorField");
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam } // End namespace Foam
// ************************************************************************* // // ************************************************************************* //

View File

@ -27,22 +27,21 @@ InClass
Foam::polySurfaceFields Foam::polySurfaceFields
Description Description
Fields for polySurface Fields (face and point) for polySurface
SourceFiles SourceFiles
polySurfaceFields.C polySurfaceFields.C
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef polySurfaceFields_H #ifndef Foam_polySurfaceFields_H
#define polySurfaceFields_H #define Foam_polySurfaceFields_H
#include "DimensionedField.H" #include "DimensionedField.H"
#include "polySurfaceGeoMesh.H" #include "polySurfaceGeoMesh.H"
#include "polySurfacePointGeoMesh.H"
#include "polySurfaceFieldsFwd.H" #include "polySurfaceFieldsFwd.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif #endif
// ************************************************************************* // // ************************************************************************* //

View File

@ -5,7 +5,7 @@
\\ / A nd | www.openfoam.com \\ / A nd | www.openfoam.com
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2019 OpenCFD Ltd. Copyright (C) 2019-2022 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -25,24 +25,30 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef polySurfacePointFieldsFwd_H #ifndef Foam_polySurfaceFieldsFwd_H
#define polySurfacePointFieldsFwd_H #define Foam_polySurfaceFieldsFwd_H
#include "fieldTypes.H" #include "fieldTypes.H"
#include "polySurface.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam namespace Foam
{ {
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // template<class Type, class GeoMesh> class DimensionedField;
template<class Type, class GeoMesh>
class DimensionedField; // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Face Fields
class polySurfaceGeoMesh; class polySurfaceGeoMesh;
//- A field on polySurface faces for a given type
template<class Type>
using PolyFaceField = DimensionedField<Type, polySurfaceGeoMesh>;
// Typedefs
typedef DimensionedField<label, polySurfaceGeoMesh> typedef DimensionedField<label, polySurfaceGeoMesh>
polySurfaceLabelField; polySurfaceLabelField;
@ -62,8 +68,17 @@ typedef Foam::DimensionedField<tensor, polySurfaceGeoMesh>
polySurfaceTensorField; polySurfaceTensorField;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Point Fields
class polySurfacePointGeoMesh; class polySurfacePointGeoMesh;
//- A field on polySurface face points for a given type
template<class Type>
using PolyPointField = DimensionedField<Type, polySurfacePointGeoMesh>;
// Typedefs
typedef Foam::DimensionedField<label, polySurfacePointGeoMesh> typedef Foam::DimensionedField<label, polySurfacePointGeoMesh>
polySurfacePointLabelField; polySurfacePointLabelField;

View File

@ -31,8 +31,8 @@ Description
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef polySurfaceGeoMesh_H #ifndef Foam_polySurfaceGeoMesh_H
#define polySurfaceGeoMesh_H #define Foam_polySurfaceGeoMesh_H
#include "polySurface.H" #include "polySurface.H"
#include "GeoMesh.H" #include "GeoMesh.H"

View File

@ -1,66 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2019 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#include "polySurfacePointFields.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
template<>
const word polySurfacePointLabelField::typeName
("polySurfacePointLabelField");
template<>
const word polySurfacePointScalarField::typeName
("polySurfacePointScalarField");
template<>
const word polySurfacePointVectorField::typeName
("polySurfacePointVectorField");
template<>
const word polySurfacePointSphericalTensorField::typeName
("polySurfacePointSphericalTensorField");
template<>
const word polySurfacePointSymmTensorField::typeName
("polySurfacePointSymmTensorField");
template<>
const word polySurfacePointTensorField::typeName
("polySurfacePointTensorField");
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// ************************************************************************* //

View File

@ -1,48 +1,9 @@
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2019 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
InClass
Foam::polySurfacePointFields
Description Description
Point fields for polySurface Compatibility include (JAN-2022)
SourceFiles
polySurfacePointFields.C
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef polySurfacePointFields_H #include "polySurfaceFields.H"
#define polySurfacePointFields_H
#include "DimensionedField.H"
#include "polySurfacePointGeoMesh.H"
#include "polySurfacePointFieldsFwd.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* // // ************************************************************************* //

View File

@ -1,73 +1,9 @@
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
========= | Description
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox Compatibility include (JAN-2022)
\\ / O peration |
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2019 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef polySurfacePointFieldsFwd_H #include "polySurfaceFieldsFwd.H"
#define polySurfacePointFieldsFwd_H
#include "fieldTypes.H"
#include "polySurface.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
template<class Type, class GeoMesh>
class DimensionedField;
class polySurfacePointGeoMesh;
typedef Foam::DimensionedField<label, polySurfacePointGeoMesh>
polySurfacePointLabelField;
typedef Foam::DimensionedField<scalar, polySurfacePointGeoMesh>
polySurfacePointScalarField;
typedef Foam::DimensionedField<vector, polySurfacePointGeoMesh>
polySurfacePointVectorField;
typedef Foam::DimensionedField<sphericalTensor, polySurfacePointGeoMesh>
polySurfacePointSphericalTensorField;
typedef Foam::DimensionedField<symmTensor, polySurfacePointGeoMesh>
polySurfacePointSymmTensorField;
typedef Foam::DimensionedField<tensor, polySurfacePointGeoMesh>
polySurfacePointTensorField;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* // // ************************************************************************* //

View File

@ -31,8 +31,8 @@ Description
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef polySurfacePointGeoMesh_H #ifndef Foam_polySurfacePointGeoMesh_H
#define polySurfacePointGeoMesh_H #define Foam_polySurfacePointGeoMesh_H
#include "polySurface.H" #include "polySurface.H"
#include "GeoMesh.H" #include "GeoMesh.H"

View File

@ -5,7 +5,7 @@
\\ / A nd | www.openfoam.com \\ / A nd | www.openfoam.com
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2019-2021 OpenCFD Ltd. Copyright (C) 2019-2022 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -38,14 +38,13 @@ SourceFiles
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef polySurface_H #ifndef Foam_polySurface_H
#define polySurface_H #define Foam_polySurface_H
#include "objectRegistry.H" #include "objectRegistry.H"
#include "PrimitivePatch.H" #include "PrimitivePatch.H"
#include "meshedSurf.H" #include "meshedSurf.H"
#include "polySurfaceFieldsFwd.H" #include "polySurfaceFieldsFwd.H"
#include "polySurfacePointFieldsFwd.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -27,7 +27,6 @@ License
#include "polySurface.H" #include "polySurface.H"
#include "polySurfaceFields.H" #include "polySurfaceFields.H"
#include "polySurfacePointFields.H"
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //

View File

@ -6,6 +6,7 @@
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2011 OpenFOAM Foundation Copyright (C) 2011 OpenFOAM Foundation
Copyright (C) 2022 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -26,34 +27,36 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "surfFields.H" #include "surfFields.H"
#include "className.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam namespace Foam
{ {
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // // Face fields
template<> defineTemplateTypeName(surfLabelField);
const word surfLabelField::typeName("surfLabelField"); defineTemplateTypeName(surfScalarField);
defineTemplateTypeName(surfVectorField);
defineTemplateTypeName(surfSphericalTensorField);
defineTemplateTypeName(surfSymmTensorField);
defineTemplateTypeName(surfTensorField);
template<>
const word surfScalarField::typeName("surfScalarField");
template<> // Point fields
const word surfVectorField::typeName("surfVectorField");
template<> defineTemplateTypeName(surfPointLabelField);
const word surfSphericalTensorField::typeName("surfSphericalTensorField"); defineTemplateTypeName(surfPointScalarField);
defineTemplateTypeName(surfPointVectorField);
defineTemplateTypeName(surfPointSphericalTensorField);
defineTemplateTypeName(surfPointSymmTensorField);
defineTemplateTypeName(surfPointTensorField);
template<>
const word surfSymmTensorField::typeName("surfSymmTensorField");
template<>
const word surfTensorField::typeName("surfTensorField");
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam } // End namespace Foam
// ************************************************************************* // // ************************************************************************* //

View File

@ -6,6 +6,7 @@
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2011 OpenFOAM Foundation Copyright (C) 2011 OpenFOAM Foundation
Copyright (C) 2022 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -34,15 +35,14 @@ SourceFiles
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef surfFields_H #ifndef Foam_surfFields_H
#define surfFields_H #define Foam_surfFields_H
#include "DimensionedField.H" #include "DimensionedField.H"
#include "surfGeoMesh.H" #include "surfGeoMesh.H"
#include "surfPointGeoMesh.H"
#include "surfFieldsFwd.H" #include "surfFieldsFwd.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif #endif
// ************************************************************************* // // ************************************************************************* //

View File

@ -6,6 +6,7 @@
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2011 OpenFOAM Foundation Copyright (C) 2011 OpenFOAM Foundation
Copyright (C) 2022 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -25,8 +26,8 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef surfFieldsFwd_H #ifndef Foam_surfFieldsFwd_H
#define surfFieldsFwd_H #define Foam_surfFieldsFwd_H
#include "fieldTypes.H" #include "fieldTypes.H"
@ -35,19 +36,58 @@ License
namespace Foam namespace Foam
{ {
template<class Type, class GeoMesh> class DimensionedField;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Face Fields
class surfGeoMesh; class surfGeoMesh;
template<class Type, class GeoMesh> // Typedefs
class DimensionedField; typedef DimensionedField<label, surfGeoMesh>
surfLabelField;
typedef DimensionedField<scalar, surfGeoMesh>
surfScalarField;
typedef DimensionedField<vector, surfGeoMesh>
surfVectorField;
typedef DimensionedField<sphericalTensor, surfGeoMesh>
surfSphericalTensorField;
typedef DimensionedField<symmTensor, surfGeoMesh>
surfSymmTensorField;
typedef DimensionedField<tensor, surfGeoMesh>
surfTensorField;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Point Fields
class surfPointGeoMesh;
// Typedefs
typedef DimensionedField<label, surfPointGeoMesh>
surfPointLabelField;
typedef DimensionedField<scalar, surfPointGeoMesh>
surfPointScalarField;
typedef DimensionedField<vector, surfPointGeoMesh>
surfPointVectorField;
typedef DimensionedField<sphericalTensor, surfPointGeoMesh>
surfPointSphericalTensorField;
typedef DimensionedField<symmTensor, surfPointGeoMesh>
surfPointSymmTensorField;
typedef DimensionedField<tensor, surfPointGeoMesh>
surfPointTensorField;
typedef DimensionedField<label, surfGeoMesh> surfLabelField;
typedef DimensionedField<scalar, surfGeoMesh> surfScalarField;
typedef DimensionedField<vector, surfGeoMesh> surfVectorField;
typedef DimensionedField<sphericalTensor, surfGeoMesh> surfSphericalTensorField;
typedef DimensionedField<symmTensor, surfGeoMesh> surfSymmTensorField;
typedef DimensionedField<tensor, surfGeoMesh> surfTensorField;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -32,8 +32,8 @@ Description
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef surfGeoMesh_H #ifndef Foam_surfGeoMesh_H
#define surfGeoMesh_H #define Foam_surfGeoMesh_H
#include "GeoMesh.H" #include "GeoMesh.H"
#include "surfMesh.H" #include "surfMesh.H"

View File

@ -1,48 +1,9 @@
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011 OpenFOAM Foundation
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::surfPointFields
Description Description
Point fields for surfMesh Compatibility include (JAN-2022)
SourceFiles
surfPointFields.C
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef surfPointFields_H #include "surfFields.H"
#define surfPointFields_H
#include "DimensionedField.H"
#include "surfPointGeoMesh.H"
#include "surfPointFieldsFwd.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* // // ************************************************************************* //

View File

@ -1,66 +1,9 @@
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
========= | Description
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox Compatibility include (JAN-2022)
\\ / O peration |
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011 OpenFOAM Foundation
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef surfPointFieldsFwd_H #include "surfFieldsFwd.H"
#define surfPointFieldsFwd_H
#include "fieldTypes.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
class surfPointGeoMesh;
template<class Type, class GeoMesh>
class DimensionedField;
typedef DimensionedField<label, surfPointGeoMesh>
surfPointLabelField;
typedef DimensionedField<scalar, surfPointGeoMesh>
surfPointScalarField;
typedef DimensionedField<vector, surfPointGeoMesh>
surfPointVectorField;
typedef DimensionedField<sphericalTensor, surfPointGeoMesh>
surfPointSphericalTensorField;
typedef DimensionedField<symmTensor, surfPointGeoMesh>
surfPointSymmTensorField;
typedef DimensionedField<tensor, surfPointGeoMesh>
surfPointTensorField;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* // // ************************************************************************* //

View File

@ -34,8 +34,8 @@ Description
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef surfPointGeoMesh_H #ifndef Foam_surfPointGeoMesh_H
#define surfPointGeoMesh_H #define Foam_surfPointGeoMesh_H
#include "GeoMesh.H" #include "GeoMesh.H"
#include "surfMesh.H" #include "surfMesh.H"

View File

@ -6,6 +6,7 @@
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2011 OpenFOAM Foundation Copyright (C) 2011 OpenFOAM Foundation
Copyright (C) 2022 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -26,58 +27,34 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "triSurfaceFields.H" #include "triSurfaceFields.H"
#include "className.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam namespace Foam
{ {
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // // Face fields
defineTemplateTypeName(triSurfaceLabelField);
template<> defineTemplateTypeName(triSurfaceScalarField);
const word triSurfaceLabelField::typeName("triSurfaceLabelField"); defineTemplateTypeName(triSurfaceVectorField);
defineTemplateTypeName(triSurfaceSphericalTensorField);
template<> defineTemplateTypeName(triSurfaceSymmTensorField);
const word triSurfaceScalarField::typeName("triSurfaceScalarField"); defineTemplateTypeName(triSurfaceTensorField);
template<>
const word triSurfaceVectorField::typeName("triSurfaceVectorField");
template<>
const word triSurfaceSphericalTensorField::typeName
("triSurfaceSphericalTensorField");
template<>
const word triSurfaceSymmTensorField::typeName
("triSurfaceSymmTensorField");
template<>
const word triSurfaceTensorField::typeName("triSurfaceTensorField");
template<> // Point fields
const word triSurfacePointLabelField::typeName("triSurfacePointLabelField");
template<>
const word triSurfacePointScalarField::typeName("triSurfacePointScalarField");
template<>
const word triSurfacePointVectorField::typeName("triSurfacePointVectorField");
template<>
const word triSurfacePointSphericalTensorField::typeName
("triSurfacePointSphericalTensorField");
template<>
const word triSurfacePointSymmTensorField::typeName
("triSurfacePointSymmTensorField");
template<>
const word triSurfacePointTensorField::typeName("triSurfacePointTensorField");
defineTemplateTypeName(triSurfacePointLabelField);
defineTemplateTypeName(triSurfacePointScalarField);
defineTemplateTypeName(triSurfacePointVectorField);
defineTemplateTypeName(triSurfacePointSphericalTensorField);
defineTemplateTypeName(triSurfacePointSymmTensorField);
defineTemplateTypeName(triSurfacePointTensorField);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam } // End namespace Foam
// ************************************************************************* // // ************************************************************************* //

View File

@ -34,16 +34,14 @@ SourceFiles
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef triSurfaceFields_H #ifndef Foam_triSurfaceFields_H
#define triSurfaceFields_H #define Foam_triSurfaceFields_H
#include "DimensionedField.H" #include "DimensionedField.H"
#include "triSurfaceGeoMesh.H" #include "triSurfaceGeoMesh.H"
#include "triSurfacePointGeoMesh.H" #include "triSurfacePointGeoMesh.H"
#include "triSurfaceFieldsFwd.H" #include "triSurfaceFieldsFwd.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif #endif
// ************************************************************************* // // ************************************************************************* //

View File

@ -6,6 +6,7 @@
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2011 OpenFOAM Foundation Copyright (C) 2011 OpenFOAM Foundation
Copyright (C) 2022 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -25,52 +26,68 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef triSurfaceFieldsFwd_H #ifndef Foam_triSurfaceFieldsFwd_H
#define triSurfaceFieldsFwd_H #define Foam_triSurfaceFieldsFwd_H
#include "fieldTypes.H" #include "fieldTypes.H"
#include "triSurface.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam namespace Foam
{ {
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // template<class Type, class GeoMesh> class DimensionedField;
template<class Type, class GeoMesh>
class DimensionedField; // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Face Fields
class triSurfaceGeoMesh; class triSurfaceGeoMesh;
// Typedefs
typedef Foam::DimensionedField<label, triSurfaceGeoMesh> typedef Foam::DimensionedField<label, triSurfaceGeoMesh>
triSurfaceLabelField; triSurfaceLabelField;
typedef Foam::DimensionedField<scalar, triSurfaceGeoMesh> typedef Foam::DimensionedField<scalar, triSurfaceGeoMesh>
triSurfaceScalarField; triSurfaceScalarField;
typedef Foam::DimensionedField<vector, triSurfaceGeoMesh> typedef Foam::DimensionedField<vector, triSurfaceGeoMesh>
triSurfaceVectorField; triSurfaceVectorField;
typedef Foam::DimensionedField<sphericalTensor, triSurfaceGeoMesh> typedef Foam::DimensionedField<sphericalTensor, triSurfaceGeoMesh>
triSurfaceSphericalTensorField; triSurfaceSphericalTensorField;
typedef Foam::DimensionedField<symmTensor, triSurfaceGeoMesh> typedef Foam::DimensionedField<symmTensor, triSurfaceGeoMesh>
triSurfaceSymmTensorField; triSurfaceSymmTensorField;
typedef Foam::DimensionedField<tensor, triSurfaceGeoMesh> typedef Foam::DimensionedField<tensor, triSurfaceGeoMesh>
triSurfaceTensorField; triSurfaceTensorField;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Point Fields
class triSurfacePointGeoMesh; class triSurfacePointGeoMesh;
typedef Foam::DimensionedField<label, triSurfacePointGeoMesh> typedef Foam::DimensionedField<label, triSurfacePointGeoMesh>
triSurfacePointLabelField; triSurfacePointLabelField;
typedef Foam::DimensionedField<scalar, triSurfacePointGeoMesh> typedef Foam::DimensionedField<scalar, triSurfacePointGeoMesh>
triSurfacePointScalarField; triSurfacePointScalarField;
typedef Foam::DimensionedField<vector, triSurfacePointGeoMesh> typedef Foam::DimensionedField<vector, triSurfacePointGeoMesh>
triSurfacePointVectorField; triSurfacePointVectorField;
typedef Foam::DimensionedField<sphericalTensor, triSurfacePointGeoMesh> typedef Foam::DimensionedField<sphericalTensor, triSurfacePointGeoMesh>
triSurfacePointSphericalTensorField; triSurfacePointSphericalTensorField;
typedef Foam::DimensionedField<symmTensor, triSurfacePointGeoMesh> typedef Foam::DimensionedField<symmTensor, triSurfacePointGeoMesh>
triSurfacePointSymmTensorField; triSurfacePointSymmTensorField;
typedef Foam::DimensionedField<tensor, triSurfacePointGeoMesh> typedef Foam::DimensionedField<tensor, triSurfacePointGeoMesh>
triSurfacePointTensorField; triSurfacePointTensorField;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam } // End namespace Foam

View File

@ -32,8 +32,8 @@ Description
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef triSurfaceGeoMesh_H #ifndef Foam_triSurfaceGeoMesh_H
#define triSurfaceGeoMesh_H #define Foam_triSurfaceGeoMesh_H
#include "GeoMesh.H" #include "GeoMesh.H"
#include "triSurface.H" #include "triSurface.H"

View File

@ -32,8 +32,8 @@ Description
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef triSurfacePointGeoMesh_H #ifndef Foam_triSurfacePointGeoMesh_H
#define triSurfacePointGeoMesh_H #define Foam_triSurfacePointGeoMesh_H
#include "GeoMesh.H" #include "GeoMesh.H"
#include "triSurface.H" #include "triSurface.H"