PrimitivePatch: Simplified templating

This commit is contained in:
Will Bainbridge
2019-01-21 08:52:52 +00:00
parent 19c3584d4b
commit cd8aee2d76
46 changed files with 381 additions and 956 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-2019 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -62,26 +62,26 @@ class extrudedMesh
static bool sameOrder(const face&, const edge&);
//- Construct and return the extruded mesh points
template<class Face, template<class> class FaceList, class PointField>
template<class FaceList, class PointField>
Xfer<pointField> extrudedPoints
(
const PrimitivePatch<Face, FaceList, PointField>& extrudePatch,
const PrimitivePatch<FaceList, PointField>& extrudePatch,
const extrudeModel&
);
//- Construct and return the extruded mesh faces
template<class Face, template<class> class FaceList, class PointField>
template<class FaceList, class PointField>
Xfer<faceList> extrudedFaces
(
const PrimitivePatch<Face, FaceList, PointField>& extrudePatch,
const PrimitivePatch<FaceList, PointField>& extrudePatch,
const extrudeModel&
);
//- Construct and return the extruded mesh cells
template<class Face, template<class> class FaceList, class PointField>
template<class FaceList, class PointField>
Xfer<cellList> extrudedCells
(
const PrimitivePatch<Face, FaceList, PointField>& extrudePatch,
const PrimitivePatch<FaceList, PointField>& extrudePatch,
const extrudeModel&
);
@ -98,11 +98,11 @@ public:
// Constructors
//- Construct from the primitivePatch to extrude
template<class Face, template<class> class FaceList, class PointField>
template<class FaceList, class PointField>
extrudedMesh
(
const IOobject&,
const PrimitivePatch<Face, FaceList, PointField>& extrudePatch,
const PrimitivePatch<FaceList, PointField>& extrudePatch,
const extrudeModel&
);
};

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-2019 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -28,15 +28,10 @@ License
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
template
<
class Face,
template<class> class FaceList,
class PointField
>
template<class FaceList, class PointField>
Foam::Xfer<Foam::pointField> Foam::extrudedMesh::extrudedPoints
(
const PrimitivePatch<Face, FaceList, PointField>& extrudePatch,
const PrimitivePatch<FaceList, PointField>& extrudePatch,
const extrudeModel& model
)
{
@ -67,10 +62,10 @@ Foam::Xfer<Foam::pointField> Foam::extrudedMesh::extrudedPoints
}
template<class Face, template<class> class FaceList, class PointField>
template<class FaceList, class PointField>
Foam::Xfer<Foam::faceList> Foam::extrudedMesh::extrudedFaces
(
const PrimitivePatch<Face, FaceList, PointField>& extrudePatch,
const PrimitivePatch<FaceList, PointField>& extrudePatch,
const extrudeModel& model
)
{
@ -193,10 +188,10 @@ Foam::Xfer<Foam::faceList> Foam::extrudedMesh::extrudedFaces
}
template<class Face, template<class> class FaceList, class PointField>
template<class FaceList, class PointField>
Foam::Xfer<Foam::cellList> Foam::extrudedMesh::extrudedCells
(
const PrimitivePatch<Face, FaceList, PointField>& extrudePatch,
const PrimitivePatch<FaceList, PointField>& extrudePatch,
const extrudeModel& model
)
{
@ -302,16 +297,11 @@ Foam::Xfer<Foam::cellList> Foam::extrudedMesh::extrudedCells
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template
<
class Face,
template<class> class FaceList,
class PointField
>
template<class FaceList, class PointField>
Foam::extrudedMesh::extrudedMesh
(
const IOobject& io,
const PrimitivePatch<Face, FaceList, PointField>& extrudePatch,
const PrimitivePatch<FaceList, PointField>& extrudePatch,
const extrudeModel& model
)
:

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-2019 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -79,7 +79,7 @@ SourceFiles
namespace Foam
{
typedef PrimitivePatch<face, List, const pointField, point> bPatch;
typedef PrimitivePatch<faceList, const pointField> bPatch;
typedef treeDataPrimitivePatch<bPatch> treeDataBPatch;
class Time;

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2012-2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2019 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -197,8 +197,9 @@ Foam::tmp<Foam::triSurfacePointScalarField> Foam::automatic::load()
PrimitivePatchInterpolation
<
PrimitivePatch<labelledTri, ::Foam::List, pointField, point>
> patchInterpolate(surface_);
PrimitivePatch<::Foam::List<labelledTri>, pointField>
>
patchInterpolate(surface_);
const Map<label>& meshPointMap = surface_.meshPointMap();

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2012-2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2019 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -62,8 +62,9 @@ protected:
typedef PrimitivePatchInterpolation
<
PrimitivePatch<labelledTri, List, pointField, point>
> primitivePatchInterpolation;
PrimitivePatch<List<labelledTri>, pointField>
>
primitivePatchInterpolation;
// Private data