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 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -38,7 +38,7 @@ using namespace Foam;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
typedef PrimitivePatch<face, List, const pointField&> myPrimitivePatch; typedef PrimitivePatch<faceList, const pointField&> myPrimitivePatch;
void writeObj(Ostream& os,const pointField& points) void writeObj(Ostream& os,const pointField& points)
@ -252,7 +252,7 @@ int main(int argc, char *argv[])
faceList patchFaces = patch; faceList patchFaces = patch;
pointField allPoints = patch.points(); pointField allPoints = patch.points();
PrimitivePatch<face, List, pointField, point> storedPatch PrimitivePatch<faceList, pointField> storedPatch
( (
patchFaces.xfer(), patchFaces.xfer(),
allPoints.xfer() allPoints.xfer()

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -62,26 +62,26 @@ class extrudedMesh
static bool sameOrder(const face&, const edge&); static bool sameOrder(const face&, const edge&);
//- Construct and return the extruded mesh points //- Construct and return the extruded mesh points
template<class Face, template<class> class FaceList, class PointField> template<class FaceList, class PointField>
Xfer<pointField> extrudedPoints Xfer<pointField> extrudedPoints
( (
const PrimitivePatch<Face, FaceList, PointField>& extrudePatch, const PrimitivePatch<FaceList, PointField>& extrudePatch,
const extrudeModel& const extrudeModel&
); );
//- Construct and return the extruded mesh faces //- Construct and return the extruded mesh faces
template<class Face, template<class> class FaceList, class PointField> template<class FaceList, class PointField>
Xfer<faceList> extrudedFaces Xfer<faceList> extrudedFaces
( (
const PrimitivePatch<Face, FaceList, PointField>& extrudePatch, const PrimitivePatch<FaceList, PointField>& extrudePatch,
const extrudeModel& const extrudeModel&
); );
//- Construct and return the extruded mesh cells //- Construct and return the extruded mesh cells
template<class Face, template<class> class FaceList, class PointField> template<class FaceList, class PointField>
Xfer<cellList> extrudedCells Xfer<cellList> extrudedCells
( (
const PrimitivePatch<Face, FaceList, PointField>& extrudePatch, const PrimitivePatch<FaceList, PointField>& extrudePatch,
const extrudeModel& const extrudeModel&
); );
@ -98,11 +98,11 @@ public:
// Constructors // Constructors
//- Construct from the primitivePatch to extrude //- Construct from the primitivePatch to extrude
template<class Face, template<class> class FaceList, class PointField> template<class FaceList, class PointField>
extrudedMesh extrudedMesh
( (
const IOobject&, const IOobject&,
const PrimitivePatch<Face, FaceList, PointField>& extrudePatch, const PrimitivePatch<FaceList, PointField>& extrudePatch,
const extrudeModel& const extrudeModel&
); );
}; };

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -28,15 +28,10 @@ License
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
template template<class FaceList, class PointField>
<
class Face,
template<class> class FaceList,
class PointField
>
Foam::Xfer<Foam::pointField> Foam::extrudedMesh::extrudedPoints Foam::Xfer<Foam::pointField> Foam::extrudedMesh::extrudedPoints
( (
const PrimitivePatch<Face, FaceList, PointField>& extrudePatch, const PrimitivePatch<FaceList, PointField>& extrudePatch,
const extrudeModel& model 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 Foam::Xfer<Foam::faceList> Foam::extrudedMesh::extrudedFaces
( (
const PrimitivePatch<Face, FaceList, PointField>& extrudePatch, const PrimitivePatch<FaceList, PointField>& extrudePatch,
const extrudeModel& model 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 Foam::Xfer<Foam::cellList> Foam::extrudedMesh::extrudedCells
( (
const PrimitivePatch<Face, FaceList, PointField>& extrudePatch, const PrimitivePatch<FaceList, PointField>& extrudePatch,
const extrudeModel& model const extrudeModel& model
) )
{ {
@ -302,16 +297,11 @@ Foam::Xfer<Foam::cellList> Foam::extrudedMesh::extrudedCells
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template template<class FaceList, class PointField>
<
class Face,
template<class> class FaceList,
class PointField
>
Foam::extrudedMesh::extrudedMesh Foam::extrudedMesh::extrudedMesh
( (
const IOobject& io, const IOobject& io,
const PrimitivePatch<Face, FaceList, PointField>& extrudePatch, const PrimitivePatch<FaceList, PointField>& extrudePatch,
const extrudeModel& model const extrudeModel& model
) )
: :

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -79,7 +79,7 @@ SourceFiles
namespace Foam namespace Foam
{ {
typedef PrimitivePatch<face, List, const pointField, point> bPatch; typedef PrimitivePatch<faceList, const pointField> bPatch;
typedef treeDataPrimitivePatch<bPatch> treeDataBPatch; typedef treeDataPrimitivePatch<bPatch> treeDataBPatch;
class Time; class Time;

View File

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

View File

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

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -44,8 +44,9 @@ namespace Foam
{ {
typedef PrimitivePatchInterpolation typedef PrimitivePatchInterpolation
< <
PrimitivePatch<face, SubList, const pointField&> PrimitivePatch<SubList<face>, const pointField&>
> primitivePatchInterpolation; >
primitivePatchInterpolation;
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -70,16 +70,10 @@ public:
//- Check for orientation issues. //- Check for orientation issues.
// Returns true if problems were found. // Returns true if problems were found.
// If a normal flips across an edge, places it in the HashSet // If a normal flips across an edge, places it in the HashSet
template template<class FaceList, class PointField>
<
class Face,
template<class> class FaceList,
class PointField,
class PointType
>
static bool checkOrientation static bool checkOrientation
( (
const PrimitivePatch<Face, FaceList, PointField, PointType>&, const PrimitivePatch<FaceList, PointField>&,
const bool report = false, const bool report = false,
labelHashSet* marked = 0 labelHashSet* marked = 0
); );
@ -88,17 +82,10 @@ public:
//- Fill faceZone with currentZone for every face reachable //- Fill faceZone with currentZone for every face reachable
// from facei without crossing edge marked in borderEdge. // from facei without crossing edge marked in borderEdge.
// Note: faceZone has to be sized nFaces before calling. // Note: faceZone has to be sized nFaces before calling.
template template<class BoolListType, class FaceList, class PointField>
<
class BoolListType,
class Face,
template<class> class FaceList,
class PointField,
class PointType
>
static void markZone static void markZone
( (
const PrimitivePatch<Face, FaceList, PointField, PointType>&, const PrimitivePatch<FaceList, PointField>&,
const BoolListType& borderEdge, const BoolListType& borderEdge,
const label facei, const label facei,
const label currentZone, const label currentZone,
@ -108,17 +95,10 @@ public:
//- Size and fills faceZone with zone of face. //- Size and fills faceZone with zone of face.
// Zone is area reachable by edge crossing without crossing borderEdge. // Zone is area reachable by edge crossing without crossing borderEdge.
// Returns number of zones. // Returns number of zones.
template template<class BoolListType, class FaceList, class PointField>
<
class BoolListType,
class Face,
template<class> class FaceList,
class PointField,
class PointType
>
static label markZones static label markZones
( (
const PrimitivePatch<Face, FaceList, PointField, PointType>&, const PrimitivePatch<FaceList, PointField>&,
const BoolListType& borderEdge, const BoolListType& borderEdge,
labelList& faceZone labelList& faceZone
); );
@ -129,78 +109,47 @@ public:
// \param[in] includeFaces faces to include // \param[in] includeFaces faces to include
// \param[out] pointMap mapping new to old localPoints // \param[out] pointMap mapping new to old localPoints
// \param[out] faceMap mapping new to old faces // \param[out] faceMap mapping new to old faces
template template<class BoolListType, class FaceList, class PointField>
<
class BoolListType,
class Face,
template<class> class FaceList,
class PointField,
class PointType
>
static void subsetMap static void subsetMap
( (
const PrimitivePatch<Face, FaceList, PointField, PointType>& p, const PrimitivePatch<FaceList, PointField>& p,
const BoolListType& includeFaces, const BoolListType& includeFaces,
labelList& pointMap, labelList& pointMap,
labelList& faceMap labelList& faceMap
); );
//- //-
template template<class FaceList, class PointField>
<
class Face,
template<class> class FaceList,
class PointField,
class PointType
>
static void calcBounds static void calcBounds
( (
const PrimitivePatch<Face, FaceList, PointField, PointType>& p, const PrimitivePatch<FaceList, PointField>& p,
boundBox& bb, boundBox& bb,
label& nPoints label& nPoints
); );
//- Return edge-face addressing sorted by angle around the edge. //- Return edge-face addressing sorted by angle around the edge.
// Orientation is anticlockwise looking from edge.vec(localPoints()) // Orientation is anticlockwise looking from edge.vec(localPoints())
template template<class FaceList, class PointField>
<
class Face,
template<class> class FaceList,
class PointField,
class PointType
>
static labelListList sortedEdgeFaces static labelListList sortedEdgeFaces
( (
const PrimitivePatch<Face, FaceList, PointField, PointType>& const PrimitivePatch<FaceList, PointField>&
); );
//- Return point-edge addressing sorted by order around the point. //- Return point-edge addressing sorted by order around the point.
template template<class FaceList, class PointField>
<
class Face,
template<class> class FaceList,
class PointField,
class PointType
>
static labelListList sortedPointEdges static labelListList sortedPointEdges
( (
const PrimitivePatch<Face, FaceList, PointField, PointType>& const PrimitivePatch<FaceList, PointField>&
); );
//- If 2 face neighbours: label of face where ordering of edge //- If 2 face neighbours: label of face where ordering of edge
// is consistent with righthand walk. // is consistent with righthand walk.
// If 1 neighbour: label of only face. // If 1 neighbour: label of only face.
// If >2 neighbours: undetermined. // If >2 neighbours: undetermined.
template template<class FaceList, class PointField>
<
class Face,
template<class> class FaceList,
class PointField,
class PointType
>
static labelList edgeOwner static labelList edgeOwner
( (
const PrimitivePatch<Face, FaceList, PointField, PointType>& const PrimitivePatch<FaceList, PointField>&
); );
@ -209,19 +158,15 @@ public:
// p2PointLabels : corresponding points on p2 // p2PointLabels : corresponding points on p2
template template
< <
class Face1, class FaceList1,
template<class> class FaceList1,
class PointField1, class PointField1,
class PointType1, class FaceList2,
class Face2, class PointField2
template<class> class FaceList2,
class PointField2,
class PointType2
> >
static void matchPoints static void matchPoints
( (
const PrimitivePatch<Face1, FaceList1, PointField1, PointType1>& p1, const PrimitivePatch<FaceList1, PointField1>& p1,
const PrimitivePatch<Face2, FaceList2, PointField2, PointType2>& p2, const PrimitivePatch<FaceList2, PointField2>& p2,
labelList& p1PointLabels, labelList& p1PointLabels,
labelList& p2PointLabels labelList& p2PointLabels
@ -233,19 +178,15 @@ public:
// sameOrientation : same orientation? // sameOrientation : same orientation?
template template
< <
class Face1, class FaceList1,
template<class> class FaceList1,
class PointField1, class PointField1,
class PointType1, class FaceList2,
class Face2, class PointField2
template<class> class FaceList2,
class PointField2,
class PointType2
> >
static void matchEdges static void matchEdges
( (
const PrimitivePatch<Face1, FaceList1, PointField1, PointType1>& p1, const PrimitivePatch<FaceList1, PointField1>& p1,
const PrimitivePatch<Face2, FaceList2, PointField2, PointType2>& p2, const PrimitivePatch<FaceList2, PointField2>& p2,
labelList& p1EdgeLabels, labelList& p1EdgeLabels,
labelList& p2EdgeLabels, labelList& p2EdgeLabels,
@ -254,33 +195,21 @@ public:
//- Return parallel consistent point normals for patches using mesh points. //- Return parallel consistent point normals for patches using mesh points.
template template<class FaceList, class PointField>
<
class Face,
template<class> class FaceList,
class PointField,
class PointType
>
static tmp<pointField> pointNormals static tmp<pointField> pointNormals
( (
const polyMesh&, const polyMesh&,
const PrimitivePatch<Face, FaceList, PointField, PointType>& const PrimitivePatch<FaceList, PointField>&
); );
//- Return parallel consistent edge normals for patches using mesh points. //- Return parallel consistent edge normals for patches using mesh points.
// Supply with patch matching info from matchEdges. // Supply with patch matching info from matchEdges.
template template<class FaceList, class PointField>
<
class Face,
template<class> class FaceList,
class PointField,
class PointType
>
static tmp<pointField> edgeNormals static tmp<pointField> edgeNormals
( (
const polyMesh&, const polyMesh&,
const PrimitivePatch<Face, FaceList, PointField, PointType>&, const PrimitivePatch<FaceList, PointField>&,
const labelList& patchEdges, const labelList& patchEdges,
const labelList& coupledEdges const labelList& coupledEdges
); );
@ -288,19 +217,15 @@ public:
//- Gather points and faces onto master and merge into single patch. //- Gather points and faces onto master and merge into single patch.
// Note: uses faces/points, not localFaces/localPoints. // Note: uses faces/points, not localFaces/localPoints.
template template<class FaceList, class PointField>
<
class Face,
template<class> class FaceList,
class PointField,
class PointType
>
static void gatherAndMerge static void gatherAndMerge
( (
const scalar mergeDist, const scalar mergeDist,
const PrimitivePatch<Face, FaceList, PointField, PointType>& p, const PrimitivePatch<FaceList, PointField>& p,
Field<PointType>& mergedPoints, Field<typename PrimitivePatch<FaceList, PointField>::PointType>&
List<Face>& mergedFaces, mergedPoints,
List<typename PrimitivePatch<FaceList, PointField>::FaceType>&
mergedFaces,
labelList& pointMergeMap labelList& pointMergeMap
); );

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -27,22 +27,16 @@ License
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
template template<class FaceList, class PointField>
< bool Foam::PatchTools::checkOrientation
class Face,
template<class> class FaceList,
class PointField,
class PointType
>
bool
Foam::PatchTools::checkOrientation
( (
const PrimitivePatch<Face, FaceList, PointField, PointType>& p, const PrimitivePatch<FaceList, PointField>& p,
const bool report, const bool report,
labelHashSet* setPtr labelHashSet* setPtr
) )
{ {
typedef typename PrimitivePatch<FaceList, PointField>::FaceType FaceType;
bool foundError = false; bool foundError = false;
// Check edge normals, face normals, point normals. // Check edge normals, face normals, point normals.
@ -91,7 +85,7 @@ Foam::PatchTools::checkOrientation
// //
//- Compute normal from 3 points, use the first as the origin //- Compute normal from 3 points, use the first as the origin
// minor warpage should not be a problem // minor warpage should not be a problem
const Face& f = p[facei]; const FaceType& f = p[facei];
const point& p0 = p.points()[f[0]]; const point& p0 = p.points()[f[0]];
const point& p1 = p.points()[f[1]]; const point& p1 = p.points()[f[1]];
const point& p2 = p.points()[f.last()]; const point& p2 = p.points()[f.last()];
@ -124,8 +118,8 @@ Foam::PatchTools::checkOrientation
{ {
// we use localFaces() since edges() are LOCAL // we use localFaces() since edges() are LOCAL
// these are both already available // these are both already available
const Face& faceA = p.localFaces()[neighbouringFaces[0]]; const FaceType& faceA = p.localFaces()[neighbouringFaces[0]];
const Face& faceB = p.localFaces()[neighbouringFaces[1]]; const FaceType& faceB = p.localFaces()[neighbouringFaces[1]];
// If the faces are correctly oriented, the edges must go in // If the faces are correctly oriented, the edges must go in
// different directions on connected faces. // different directions on connected faces.

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -27,23 +27,17 @@ License
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
template template<class FaceList, class PointField>
< Foam::labelList Foam::PatchTools::edgeOwner
class Face,
template<class> class FaceList,
class PointField,
class PointType
>
Foam::labelList
Foam::PatchTools::edgeOwner
( (
const PrimitivePatch<Face, FaceList, PointField, PointType>& p const PrimitivePatch<FaceList, PointField>& p
) )
{ {
typedef typename PrimitivePatch<FaceList, PointField>::FaceType FaceType;
const edgeList& edges = p.edges(); const edgeList& edges = p.edges();
const labelListList& edgeFaces = p.edgeFaces(); const labelListList& edgeFaces = p.edgeFaces();
const List<Face>& localFaces = p.localFaces(); const List<FaceType>& localFaces = p.localFaces();
// create the owner list // create the owner list
labelList edgeOwner(edges.size(), -1); labelList edgeOwner(edges.size(), -1);
@ -62,7 +56,7 @@ Foam::PatchTools::edgeOwner
// with multiply connected edges, this is the best we can do // with multiply connected edges, this is the best we can do
forAll(nbrFaces, i) forAll(nbrFaces, i)
{ {
const Face& f = localFaces[nbrFaces[i]]; const FaceType& f = localFaces[nbrFaces[i]];
if (f.edgeDirection(edges[edgeI]) > 0) if (f.edgeDirection(edges[edgeI]) > 0)
{ {
@ -77,7 +71,7 @@ Foam::PatchTools::edgeOwner
<< "Edge " << edgeI << " vertices:" << edges[edgeI] << "Edge " << edgeI << " vertices:" << edges[edgeI]
<< " is used by faces " << nbrFaces << " is used by faces " << nbrFaces
<< " vertices:" << " vertices:"
<< UIndirectList<Face>(localFaces, nbrFaces)() << UIndirectList<FaceType>(localFaces, nbrFaces)()
<< " none of which use the edge vertices in the same order" << " none of which use the edge vertices in the same order"
<< nl << "I give up" << abort(FatalError); << nl << "I give up" << abort(FatalError);
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2012-2018 OpenFOAM Foundation \\ / A nd | Copyright (C) 2012-2019 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -30,22 +30,20 @@ License
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template template<class FaceList, class PointField>
<
class Face,
template<class> class FaceList,
class PointField,
class PointType
>
void Foam::PatchTools::gatherAndMerge void Foam::PatchTools::gatherAndMerge
( (
const scalar mergeDist, const scalar mergeDist,
const PrimitivePatch<Face, FaceList, PointField, PointType>& p, const PrimitivePatch<FaceList, PointField>& p,
Field<PointType>& mergedPoints, Field<typename PrimitivePatch<FaceList, PointField>::PointType>&
List<Face>& mergedFaces, mergedPoints,
List<typename PrimitivePatch<FaceList, PointField>::FaceType>& mergedFaces,
labelList& pointMergeMap labelList& pointMergeMap
) )
{ {
typedef typename PrimitivePatch<FaceList, PointField>::FaceType FaceType;
typedef typename PrimitivePatch<FaceList, PointField>::PointType PointType;
// Collect points from all processors // Collect points from all processors
labelList pointSizes; labelList pointSizes;
{ {
@ -73,20 +71,20 @@ void Foam::PatchTools::gatherAndMerge
// Collect faces from all processors and renumber using sizes of // Collect faces from all processors and renumber using sizes of
// gathered points // gathered points
{ {
List<List<Face>> gatheredFaces(Pstream::nProcs()); List<List<FaceType>> gatheredFaces(Pstream::nProcs());
gatheredFaces[Pstream::myProcNo()] = p; gatheredFaces[Pstream::myProcNo()] = p;
Pstream::gatherList(gatheredFaces); Pstream::gatherList(gatheredFaces);
if (Pstream::master()) if (Pstream::master())
{ {
mergedFaces = static_cast<const List<Face>&> mergedFaces = static_cast<const List<FaceType>&>
( (
ListListOps::combineOffset<List<Face>> ListListOps::combineOffset<List<FaceType>>
( (
gatheredFaces, gatheredFaces,
pointSizes, pointSizes,
accessOp<List<Face>>(), accessOp<List<FaceType>>(),
offsetOp<Face>() offsetOp<FaceType>()
) )
); );
} }
@ -115,7 +113,7 @@ void Foam::PatchTools::gatherAndMerge
mergedPoints.transfer(newPoints); mergedPoints.transfer(newPoints);
// Relabel faces // Relabel faces
List<Face>& faces = mergedFaces; List<FaceType>& faces = mergedFaces;
forAll(faces, facei) forAll(faces, facei)
{ {

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -27,21 +27,11 @@ License
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
template template<class FaceList1, class PointField1, class FaceList2, class PointField2>
<
class Face1,
template<class> class FaceList1,
class PointField1,
class PointType1,
class Face2,
template<class> class FaceList2,
class PointField2,
class PointType2
>
void Foam::PatchTools::matchPoints void Foam::PatchTools::matchPoints
( (
const PrimitivePatch<Face1, FaceList1, PointField1, PointType1>& p1, const PrimitivePatch<FaceList1, PointField1>& p1,
const PrimitivePatch<Face2, FaceList2, PointField2, PointType2>& p2, const PrimitivePatch<FaceList2, PointField2>& p2,
labelList& p1PointLabels, labelList& p1PointLabels,
labelList& p2PointLabels labelList& p2PointLabels
@ -73,21 +63,11 @@ void Foam::PatchTools::matchPoints
} }
template template<class FaceList1, class PointField1, class FaceList2, class PointField2>
<
class Face1,
template<class> class FaceList1,
class PointField1,
class PointType1,
class Face2,
template<class> class FaceList2,
class PointField2,
class PointType2
>
void Foam::PatchTools::matchEdges void Foam::PatchTools::matchEdges
( (
const PrimitivePatch<Face1, FaceList1, PointField1, PointType1>& p1, const PrimitivePatch<FaceList1, PointField1>& p1,
const PrimitivePatch<Face2, FaceList2, PointField2, PointType2>& p2, const PrimitivePatch<FaceList2, PointField2>& p2,
labelList& p1EdgeLabels, labelList& p1EdgeLabels,
labelList& p2EdgeLabels, labelList& p2EdgeLabels,

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -30,19 +30,11 @@ License
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template template<class FaceList, class PointField>
< Foam::tmp<Foam::pointField> Foam::PatchTools::pointNormals
class Face,
template<class> class FaceList,
class PointField,
class PointType
>
Foam::tmp<Foam::pointField>
Foam::PatchTools::pointNormals
( (
const polyMesh& mesh, const polyMesh& mesh,
const PrimitivePatch<Face, FaceList, PointField, PointType>& p const PrimitivePatch<FaceList, PointField>& p
) )
{ {
const globalMeshData& globalData = mesh.globalData(); const globalMeshData& globalData = mesh.globalData();
@ -193,19 +185,11 @@ Foam::PatchTools::pointNormals
} }
template template<class FaceList, class PointField>
< Foam::tmp<Foam::pointField> Foam::PatchTools::edgeNormals
class Face,
template<class> class FaceList,
class PointField,
class PointType
>
Foam::tmp<Foam::pointField>
Foam::PatchTools::edgeNormals
( (
const polyMesh& mesh, const polyMesh& mesh,
const PrimitivePatch<Face, FaceList, PointField, PointType>& p, const PrimitivePatch<FaceList, PointField>& p,
const labelList& patchEdges, const labelList& patchEdges,
const labelList& coupledEdges const labelList& coupledEdges
) )

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -32,17 +32,10 @@ Description
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
template template<class BoolListType, class FaceList, class PointField>
<
class BoolListType,
class Face,
template<class> class FaceList,
class PointField,
class PointType
>
void Foam::PatchTools::markZone void Foam::PatchTools::markZone
( (
const PrimitivePatch<Face, FaceList, PointField, PointType>& p, const PrimitivePatch<FaceList, PointField>& p,
const BoolListType& borderEdge, const BoolListType& borderEdge,
const label facei, const label facei,
const label currentZone, const label currentZone,
@ -108,19 +101,10 @@ void Foam::PatchTools::markZone
} }
template template<class BoolListType, class FaceList, class PointField>
< Foam::label Foam::PatchTools::markZones
class BoolListType,
class Face,
template<class> class FaceList,
class PointField,
class PointType
>
Foam::label
Foam::PatchTools::markZones
( (
const PrimitivePatch<Face, FaceList, PointField, PointType>& p, const PrimitivePatch<FaceList, PointField>& p,
const BoolListType& borderEdge, const BoolListType& borderEdge,
labelList& faceZone labelList& faceZone
) )
@ -148,28 +132,21 @@ Foam::PatchTools::markZones
} }
template template<class BoolListType, class FaceList, class PointField>
< void Foam::PatchTools::subsetMap
class BoolListType,
class Face,
template<class> class FaceList,
class PointField,
class PointType
>
void
Foam::PatchTools::subsetMap
( (
const PrimitivePatch<Face, FaceList, PointField, PointType>& p, const PrimitivePatch<FaceList, PointField>& p,
const BoolListType& includeFaces, const BoolListType& includeFaces,
labelList& pointMap, labelList& pointMap,
labelList& faceMap labelList& faceMap
) )
{ {
typedef typename PrimitivePatch<FaceList, PointField>::FaceType FaceType;
label facei = 0; label facei = 0;
label pointi = 0; label pointi = 0;
const List<Face>& localFaces = p.localFaces(); const List<FaceType>& localFaces = p.localFaces();
faceMap.setSize(localFaces.size()); faceMap.setSize(localFaces.size());
pointMap.setSize(p.nPoints()); pointMap.setSize(p.nPoints());
@ -184,7 +161,7 @@ Foam::PatchTools::subsetMap
faceMap[facei++] = oldFacei; faceMap[facei++] = oldFacei;
// Renumber labels for face // Renumber labels for face
const Face& f = localFaces[oldFacei]; const FaceType& f = localFaces[oldFacei];
forAll(f, fp) forAll(f, fp)
{ {
@ -204,20 +181,16 @@ Foam::PatchTools::subsetMap
} }
template template<class FaceList, class PointField>
<
class Face,
template<class> class FaceList,
class PointField,
class PointType
>
void Foam::PatchTools::calcBounds void Foam::PatchTools::calcBounds
( (
const PrimitivePatch<Face, FaceList, PointField, PointType>& p, const PrimitivePatch<FaceList, PointField>& p,
boundBox& bb, boundBox& bb,
label& nPoints label& nPoints
) )
{ {
typedef typename PrimitivePatch<FaceList, PointField>::FaceType FaceType;
// Unfortunately nPoints constructs meshPoints() so do compact version // Unfortunately nPoints constructs meshPoints() so do compact version
// ourselves // ourselves
const PointField& points = p.points(); const PointField& points = p.points();
@ -229,7 +202,7 @@ void Foam::PatchTools::calcBounds
forAll(p, facei) forAll(p, facei)
{ {
const Face& f = p[facei]; const FaceType& f = p[facei];
forAll(f, fp) forAll(f, fp)
{ {

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -29,23 +29,18 @@ License
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
template template<class FaceList, class PointField>
< Foam::labelListList Foam::PatchTools::sortedEdgeFaces
class Face,
template<class> class FaceList,
class PointField,
class PointType
>
Foam::labelListList
Foam::PatchTools::sortedEdgeFaces
( (
const PrimitivePatch<Face, FaceList, PointField, PointType>& p const PrimitivePatch<FaceList, PointField>& p
) )
{ {
typedef typename PrimitivePatch<FaceList, PointField>::FaceType FaceType;
typedef typename PrimitivePatch<FaceList, PointField>::PointType PointType;
const edgeList& edges = p.edges(); const edgeList& edges = p.edges();
const labelListList& edgeFaces = p.edgeFaces(); const labelListList& edgeFaces = p.edgeFaces();
const List<Face>& localFaces = p.localFaces(); const List<FaceType>& localFaces = p.localFaces();
const Field<PointType>& localPoints = p.localPoints(); const Field<PointType>& localPoints = p.localPoints();
// create the lists for the various results. (resized on completion) // create the lists for the various results. (resized on completion)
@ -68,7 +63,7 @@ Foam::PatchTools::sortedEdgeFaces
// Get the vertex on 0th face that forms a vector with the first // Get the vertex on 0th face that forms a vector with the first
// edge point that has the largest angle with the edge // edge point that has the largest angle with the edge
const Face& f0 = localFaces[faceNbs[0]]; const FaceType& f0 = localFaces[faceNbs[0]];
scalar maxAngle = great; scalar maxAngle = great;
vector maxAngleEdgeDir(vector::max); vector maxAngleEdgeDir(vector::max);
@ -107,7 +102,7 @@ Foam::PatchTools::sortedEdgeFaces
{ {
// Get the vertex on face that forms a vector with the first // Get the vertex on face that forms a vector with the first
// edge point that has the largest angle with the edge // edge point that has the largest angle with the edge
const Face& f = localFaces[faceNbs[nbI]]; const FaceType& f = localFaces[faceNbs[nbI]];
maxAngle = great; maxAngle = great;
maxAngleEdgeDir = vector::max; maxAngleEdgeDir = vector::max;

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -27,18 +27,10 @@ License
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
template template<class FaceList, class PointField>
< Foam::labelListList Foam::PatchTools::sortedPointEdges
class Face,
template<class> class FaceList,
class PointField,
class PointType
>
Foam::labelListList
Foam::PatchTools::sortedPointEdges
( (
const PrimitivePatch<Face, FaceList, PointField, PointType>& p const PrimitivePatch<FaceList, PointField>& p
) )
{ {
// Now order the edges of each point according to whether they share a // Now order the edges of each point according to whether they share a

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -27,21 +27,14 @@ License
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template template<class FaceList, class PointField>
< Foam::PrimitivePatch<FaceList, PointField>::PrimitivePatch
class Face,
template<class> class FaceList,
class PointField,
class PointType
>
Foam::PrimitivePatch<Face, FaceList, PointField, PointType>::
PrimitivePatch
( (
const FaceList<Face>& faces, const FaceList& faces,
const Field<PointType>& points const Field<PointType>& points
) )
: :
FaceList<Face>(faces), FaceList(faces),
points_(points), points_(points),
edgesPtr_(nullptr), edgesPtr_(nullptr),
nInternalEdges_(-1), nInternalEdges_(-1),
@ -63,21 +56,14 @@ PrimitivePatch
{} {}
template template<class FaceList, class PointField>
< Foam::PrimitivePatch<FaceList, PointField>::PrimitivePatch
class Face,
template<class> class FaceList,
class PointField,
class PointType
>
Foam::PrimitivePatch<Face, FaceList, PointField, PointType>::
PrimitivePatch
( (
const Xfer<FaceList<Face>>& faces, const Xfer<FaceList>& faces,
const Xfer<List<PointType>>& points const Xfer<List<PointType>>& points
) )
: :
FaceList<Face>(faces), FaceList(faces),
points_(points), points_(points),
edgesPtr_(nullptr), edgesPtr_(nullptr),
nInternalEdges_(-1), nInternalEdges_(-1),
@ -99,22 +85,15 @@ PrimitivePatch
{} {}
template template<class FaceList, class PointField>
< Foam::PrimitivePatch<FaceList, PointField>::PrimitivePatch
class Face,
template<class> class FaceList,
class PointField,
class PointType
>
Foam::PrimitivePatch<Face, FaceList, PointField, PointType>::
PrimitivePatch
( (
FaceList<Face>& faces, FaceList& faces,
Field<PointType>& points, Field<PointType>& points,
const bool reuse const bool reuse
) )
: :
FaceList<Face>(faces, reuse), FaceList(faces, reuse),
points_(points, reuse), points_(points, reuse),
edgesPtr_(nullptr), edgesPtr_(nullptr),
nInternalEdges_(-1), nInternalEdges_(-1),
@ -136,21 +115,14 @@ PrimitivePatch
{} {}
template template<class FaceList, class PointField>
< Foam::PrimitivePatch<FaceList, PointField>::PrimitivePatch
class Face,
template<class> class FaceList,
class PointField,
class PointType
>
Foam::PrimitivePatch<Face, FaceList, PointField, PointType>::
PrimitivePatch
( (
const PrimitivePatch<Face, FaceList, PointField, PointType>& pp const PrimitivePatch<FaceList, PointField>& pp
) )
: :
PrimitivePatchName(), PrimitivePatchName(),
FaceList<Face>(pp), FaceList(pp),
points_(pp.points_), points_(pp.points_),
edgesPtr_(nullptr), edgesPtr_(nullptr),
nInternalEdges_(-1), nInternalEdges_(-1),
@ -174,15 +146,8 @@ PrimitivePatch
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
template template<class FaceList, class PointField>
< Foam::PrimitivePatch<FaceList, PointField>::~PrimitivePatch()
class Face,
template<class> class FaceList,
class PointField,
class PointType
>
Foam::PrimitivePatch<Face, FaceList, PointField, PointType>::
~PrimitivePatch()
{ {
clearOut(); clearOut();
} }
@ -190,23 +155,15 @@ Foam::PrimitivePatch<Face, FaceList, PointField, PointType>::
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template template<class FaceList, class PointField>
< void Foam::PrimitivePatch<FaceList, PointField>::movePoints
class Face,
template<class> class FaceList,
class PointField,
class PointType
>
void
Foam::PrimitivePatch<Face, FaceList, PointField, PointType>::
movePoints
( (
const Field<PointType>& const Field<PointType>&
) )
{ {
if (debug) if (debug)
{ {
Pout<< "PrimitivePatch<Face, FaceList, PointField, PointType>::" Pout<< "PrimitivePatch<FaceList, PointField>::"
<< "movePoints() : " << "movePoints() : "
<< "recalculating PrimitivePatch geometry following mesh motion" << "recalculating PrimitivePatch geometry following mesh motion"
<< endl; << endl;
@ -216,16 +173,8 @@ movePoints
} }
template template<class FaceList, class PointField>
< const Foam::edgeList& Foam::PrimitivePatch<FaceList, PointField>::edges() const
class Face,
template<class> class FaceList,
class PointField,
class PointType
>
const Foam::edgeList&
Foam::PrimitivePatch<Face, FaceList, PointField, PointType>::
edges() const
{ {
if (!edgesPtr_) if (!edgesPtr_)
{ {
@ -236,16 +185,8 @@ edges() const
} }
template template<class FaceList, class PointField>
< Foam::label Foam::PrimitivePatch<FaceList, PointField>::nInternalEdges() const
class Face,
template<class> class FaceList,
class PointField,
class PointType
>
Foam::label
Foam::PrimitivePatch<Face, FaceList, PointField, PointType>::
nInternalEdges() const
{ {
if (!edgesPtr_) if (!edgesPtr_)
{ {
@ -256,16 +197,9 @@ nInternalEdges() const
} }
template template<class FaceList, class PointField>
<
class Face,
template<class> class FaceList,
class PointField,
class PointType
>
const Foam::labelList& const Foam::labelList&
Foam::PrimitivePatch<Face, FaceList, PointField, PointType>:: Foam::PrimitivePatch<FaceList, PointField>::boundaryPoints() const
boundaryPoints() const
{ {
if (!boundaryPointsPtr_) if (!boundaryPointsPtr_)
{ {
@ -276,15 +210,9 @@ boundaryPoints() const
} }
template template<class FaceList, class PointField>
<
class Face,
template<class> class FaceList,
class PointField,
class PointType
>
const Foam::labelListList& const Foam::labelListList&
Foam::PrimitivePatch<Face, FaceList, PointField, PointType>:: Foam::PrimitivePatch<FaceList, PointField>::
faceFaces() const faceFaces() const
{ {
if (!faceFacesPtr_) if (!faceFacesPtr_)
@ -296,16 +224,9 @@ faceFaces() const
} }
template template<class FaceList, class PointField>
<
class Face,
template<class> class FaceList,
class PointField,
class PointType
>
const Foam::labelListList& const Foam::labelListList&
Foam::PrimitivePatch<Face, FaceList, PointField, PointType>:: Foam::PrimitivePatch<FaceList, PointField>::edgeFaces() const
edgeFaces() const
{ {
if (!edgeFacesPtr_) if (!edgeFacesPtr_)
{ {
@ -316,16 +237,9 @@ edgeFaces() const
} }
template template<class FaceList, class PointField>
<
class Face,
template<class> class FaceList,
class PointField,
class PointType
>
const Foam::labelListList& const Foam::labelListList&
Foam::PrimitivePatch<Face, FaceList, PointField, PointType>:: Foam::PrimitivePatch<FaceList, PointField>::faceEdges() const
faceEdges() const
{ {
if (!faceEdgesPtr_) if (!faceEdgesPtr_)
{ {
@ -336,16 +250,9 @@ faceEdges() const
} }
template template<class FaceList, class PointField>
<
class Face,
template<class> class FaceList,
class PointField,
class PointType
>
const Foam::labelListList& const Foam::labelListList&
Foam::PrimitivePatch<Face, FaceList, PointField, PointType>:: Foam::PrimitivePatch<FaceList, PointField>::pointEdges() const
pointEdges() const
{ {
if (!pointEdgesPtr_) if (!pointEdgesPtr_)
{ {
@ -356,16 +263,9 @@ pointEdges() const
} }
template template<class FaceList, class PointField>
<
class Face,
template<class> class FaceList,
class PointField,
class PointType
>
const Foam::labelListList& const Foam::labelListList&
Foam::PrimitivePatch<Face, FaceList, PointField, PointType>:: Foam::PrimitivePatch<FaceList, PointField>::pointFaces() const
pointFaces() const
{ {
if (!pointFacesPtr_) if (!pointFacesPtr_)
{ {
@ -376,16 +276,12 @@ pointFaces() const
} }
template template<class FaceList, class PointField>
const Foam::List
< <
class Face, typename Foam::PrimitivePatch<FaceList, PointField>::FaceType
template<class> class FaceList, >&
class PointField, Foam::PrimitivePatch<FaceList, PointField>::localFaces() const
class PointType
>
const Foam::List<Face>&
Foam::PrimitivePatch<Face, FaceList, PointField, PointType>::
localFaces() const
{ {
if (!localFacesPtr_) if (!localFacesPtr_)
{ {
@ -396,16 +292,9 @@ localFaces() const
} }
template template<class FaceList, class PointField>
<
class Face,
template<class> class FaceList,
class PointField,
class PointType
>
const Foam::labelList& const Foam::labelList&
Foam::PrimitivePatch<Face, FaceList, PointField, PointType>:: Foam::PrimitivePatch<FaceList, PointField>::meshPoints() const
meshPoints() const
{ {
if (!meshPointsPtr_) if (!meshPointsPtr_)
{ {
@ -416,16 +305,9 @@ meshPoints() const
} }
template template<class FaceList, class PointField>
<
class Face,
template<class> class FaceList,
class PointField,
class PointType
>
const Foam::Map<Foam::label>& const Foam::Map<Foam::label>&
Foam::PrimitivePatch<Face, FaceList, PointField, PointType>:: Foam::PrimitivePatch<FaceList, PointField>::meshPointMap() const
meshPointMap() const
{ {
if (!meshPointMapPtr_) if (!meshPointMapPtr_)
{ {
@ -436,16 +318,12 @@ meshPointMap() const
} }
template template<class FaceList, class PointField>
const Foam::Field
< <
class Face, typename Foam::PrimitivePatch<FaceList, PointField>::PointType
template<class> class FaceList, >&
class PointField, Foam::PrimitivePatch<FaceList, PointField>::localPoints() const
class PointType
>
const Foam::Field<PointType>&
Foam::PrimitivePatch<Face, FaceList, PointField, PointType>::
localPoints() const
{ {
if (!localPointsPtr_) if (!localPointsPtr_)
{ {
@ -456,16 +334,9 @@ localPoints() const
} }
template template<class FaceList, class PointField>
<
class Face,
template<class> class FaceList,
class PointField,
class PointType
>
const Foam::labelList& const Foam::labelList&
Foam::PrimitivePatch<Face, FaceList, PointField, PointType>:: Foam::PrimitivePatch<FaceList, PointField>::localPointOrder() const
localPointOrder() const
{ {
if (!localPointOrderPtr_) if (!localPointOrderPtr_)
{ {
@ -476,16 +347,8 @@ localPointOrder() const
} }
template template<class FaceList, class PointField>
< Foam::label Foam::PrimitivePatch<FaceList, PointField>::whichPoint
class Face,
template<class> class FaceList,
class PointField,
class PointType
>
Foam::label
Foam::PrimitivePatch<Face, FaceList, PointField, PointType>::
whichPoint
( (
const label gp const label gp
) const ) const
@ -504,16 +367,12 @@ whichPoint
} }
template template<class FaceList, class PointField>
const Foam::Field
< <
class Face, typename Foam::PrimitivePatch<FaceList, PointField>::PointType
template<class> class FaceList, >&
class PointField, Foam::PrimitivePatch<FaceList, PointField>::faceCentres() const
class PointType
>
const Foam::Field<PointType>&
Foam::PrimitivePatch<Face, FaceList, PointField, PointType>::
faceCentres() const
{ {
if (!faceCentresPtr_) if (!faceCentresPtr_)
{ {
@ -524,16 +383,12 @@ faceCentres() const
} }
template template<class FaceList, class PointField>
const Foam::Field
< <
class Face, typename Foam::PrimitivePatch<FaceList, PointField>::PointType
template<class> class FaceList, >&
class PointField, Foam::PrimitivePatch<FaceList, PointField>::faceNormals() const
class PointType
>
const Foam::Field<PointType>&
Foam::PrimitivePatch<Face, FaceList, PointField, PointType>::
faceNormals() const
{ {
if (!faceNormalsPtr_) if (!faceNormalsPtr_)
{ {
@ -544,16 +399,12 @@ faceNormals() const
} }
template template<class FaceList, class PointField>
const Foam::Field
< <
class Face, typename Foam::PrimitivePatch<FaceList, PointField>::PointType
template<class> class FaceList, >&
class PointField, Foam::PrimitivePatch<FaceList, PointField>::pointNormals() const
class PointType
>
const Foam::Field<PointType>&
Foam::PrimitivePatch<Face, FaceList, PointField, PointType>::
pointNormals() const
{ {
if (!pointNormalsPtr_) if (!pointNormalsPtr_)
{ {
@ -566,23 +417,15 @@ pointNormals() const
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
template template<class FaceList, class PointField>
< void Foam::PrimitivePatch<FaceList, PointField>::operator=
class Face,
template<class> class FaceList,
class PointField,
class PointType
>
void
Foam::PrimitivePatch<Face, FaceList, PointField, PointType>::
operator=
( (
const PrimitivePatch<Face, FaceList, PointField, PointType>& pp const PrimitivePatch<FaceList, PointField>& pp
) )
{ {
clearOut(); clearOut();
FaceList<Face>::shallowCopy(pp); FaceList::shallowCopy(pp);
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -78,27 +78,27 @@ TemplateName(PrimitivePatch);
Class PrimitivePatch Declaration Class PrimitivePatch Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
template template<class FaceList, class PointField>
<
class Face,
template<class> class FaceList,
class PointField,
class PointType=point
>
class PrimitivePatch class PrimitivePatch
: :
public PrimitivePatchName, public PrimitivePatchName,
public FaceList<Face> public FaceList
{ {
public: public:
// Public typedefs // Public typedefs
typedef Face FaceType; typedef FaceList FaceListType;
typedef FaceList<Face> FaceListType;
typedef typename std::remove_reference<FaceList>::type::value_type
FaceType;
typedef PointField PointFieldType; typedef PointField PointFieldType;
typedef typename std::remove_reference<PointField>::type::value_type
PointType;
// Public data types // Public data types
@ -147,7 +147,7 @@ private:
mutable labelListList* pointFacesPtr_; mutable labelListList* pointFacesPtr_;
//- Faces addressing into local point list //- Faces addressing into local point list
mutable List<Face>* localFacesPtr_; mutable List<FaceType>* localFacesPtr_;
//- Labels of mesh points //- Labels of mesh points
mutable labelList* meshPointsPtr_; mutable labelList* meshPointsPtr_;
@ -239,21 +239,21 @@ public:
//- Construct from components //- Construct from components
PrimitivePatch PrimitivePatch
( (
const FaceList<Face>& faces, const FaceList& faces,
const Field<PointType>& points const Field<PointType>& points
); );
//- Construct from components //- Construct from components
PrimitivePatch PrimitivePatch
( (
const Xfer<FaceList<Face>>& faces, const Xfer<FaceList>& faces,
const Xfer<List<PointType>>& points const Xfer<List<PointType>>& points
); );
//- Construct from components, reuse storage //- Construct from components, reuse storage
PrimitivePatch PrimitivePatch
( (
FaceList<Face>& faces, FaceList& faces,
Field<PointType>& points, Field<PointType>& points,
const bool reuse const bool reuse
); );
@ -261,7 +261,7 @@ public:
//- Construct as copy //- Construct as copy
PrimitivePatch PrimitivePatch
( (
const PrimitivePatch<Face, FaceList, PointField, PointType>& const PrimitivePatch<FaceList, PointField>&
); );
@ -336,7 +336,7 @@ public:
const labelListList& pointFaces() const; const labelListList& pointFaces() const;
//- Return patch faces addressing into local point list //- Return patch faces addressing into local point list
const List<Face>& localFaces() const; const List<FaceType>& localFaces() const;
// Addressing into mesh // Addressing into mesh
@ -465,7 +465,7 @@ public:
//- Assignment //- Assignment
void operator= void operator=
( (
const PrimitivePatch<Face, FaceList, PointField, PointType>& const PrimitivePatch<FaceList, PointField>&
); );
}; };

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -40,22 +40,12 @@ Description
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
template template<class FaceList, class PointField>
< void Foam::PrimitivePatch<FaceList, PointField>::calcAddressing() const
class Face,
template<class> class FaceList,
class PointField,
class PointType
>
void
Foam::PrimitivePatch<Face, FaceList, PointField, PointType>::
calcAddressing() const
{ {
if (debug) if (debug)
{ {
Info<< "PrimitivePatch<Face, FaceList, PointField, PointType>::" InfoInFunction << "calculating patch addressing" << endl;
<< "calcAddressing() : calculating patch addressing"
<< endl;
} }
if (edgesPtr_ || faceFacesPtr_ || edgeFacesPtr_ || faceEdgesPtr_) if (edgesPtr_ || faceFacesPtr_ || edgeFacesPtr_ || faceEdgesPtr_)
@ -68,7 +58,7 @@ calcAddressing() const
} }
// get reference to localFaces // get reference to localFaces
const List<Face>& locFcs = localFaces(); const List<FaceType>& locFcs = localFaces();
// get reference to pointFaces // get reference to pointFaces
const labelListList& pf = pointFaces(); const labelListList& pf = pointFaces();
@ -128,7 +118,7 @@ calcAddressing() const
forAll(locFcs, facei) forAll(locFcs, facei)
{ {
// Get reference to vertices of current face and corresponding edges. // Get reference to vertices of current face and corresponding edges.
const Face& curF = locFcs[facei]; const FaceType& curF = locFcs[facei];
const edgeList& curEdges = faceIntoEdges[facei]; const edgeList& curEdges = faceIntoEdges[facei];
// Record the neighbour face. Multiple connectivity allowed // Record the neighbour face. Multiple connectivity allowed
@ -293,9 +283,7 @@ calcAddressing() const
if (debug) if (debug)
{ {
Info<< "PrimitivePatch<Face, FaceList, PointField, PointType>::" InfoInFunction << "Finished calculating patch addressing" << endl;
<< "calcAddressing() : finished calculating patch addressing"
<< endl;
} }
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -28,16 +28,8 @@ License
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
template template<class FaceList, class PointField>
< void Foam::PrimitivePatch<FaceList, PointField>::calcBdryPoints() const
class Face,
template<class> class FaceList,
class PointField,
class PointType
>
void
Foam::PrimitivePatch<Face, FaceList, PointField, PointType>::
calcBdryPoints() const
{ {
if (debug) if (debug)
{ {

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -32,16 +32,8 @@ Description
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
template template<class FaceList, class PointField>
< void Foam::PrimitivePatch<FaceList, PointField>::visitPointRegion
class Face,
template<class> class FaceList,
class PointField,
class PointType
>
void
Foam::PrimitivePatch<Face, FaceList, PointField, PointType>::
visitPointRegion
( (
const label pointi, const label pointi,
const labelList& pFaces, const labelList& pFaces,
@ -107,16 +99,10 @@ visitPointRegion
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template template<class FaceList, class PointField>
<
class Face,
template<class> class FaceList,
class PointField,
class PointType
>
typename typename
Foam::PrimitivePatch<Face, FaceList, PointField, PointType>::surfaceTopo Foam::PrimitivePatch<FaceList, PointField>::surfaceTopo
Foam::PrimitivePatch<Face, FaceList, PointField, PointType>:: Foam::PrimitivePatch<FaceList, PointField>::
surfaceType() const surfaceType() const
{ {
if (debug) if (debug)
@ -155,15 +141,9 @@ surfaceType() const
} }
template template<class FaceList, class PointField>
<
class Face,
template<class> class FaceList,
class PointField,
class PointType
>
bool bool
Foam::PrimitivePatch<Face, FaceList, PointField, PointType>:: Foam::PrimitivePatch<FaceList, PointField>::
checkTopology checkTopology
( (
const bool report, const bool report,
@ -215,15 +195,9 @@ checkTopology
} }
template template<class FaceList, class PointField>
<
class Face,
template<class> class FaceList,
class PointField,
class PointType
>
bool bool
Foam::PrimitivePatch<Face, FaceList, PointField, PointType>:: Foam::PrimitivePatch<FaceList, PointField>::
checkPointManifold checkPointManifold
( (
const bool report, const bool report,

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -29,16 +29,8 @@ License
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template template<class FaceList, class PointField>
< void Foam::PrimitivePatch<FaceList, PointField>::clearGeom()
class Face,
template<class> class FaceList,
class PointField,
class PointType
>
void
Foam::PrimitivePatch<Face, FaceList, PointField, PointType>::
clearGeom()
{ {
if (debug) if (debug)
{ {
@ -52,16 +44,8 @@ clearGeom()
} }
template template<class FaceList, class PointField>
< void Foam::PrimitivePatch<FaceList, PointField>::clearTopology()
class Face,
template<class> class FaceList,
class PointField,
class PointType
>
void
Foam::PrimitivePatch<Face, FaceList, PointField, PointType>::
clearTopology()
{ {
if (debug) if (debug)
{ {
@ -92,16 +76,8 @@ clearTopology()
} }
template template<class FaceList, class PointField>
< void Foam::PrimitivePatch<FaceList, PointField>::clearPatchMeshAddr()
class Face,
template<class> class FaceList,
class PointField,
class PointType
>
void
Foam::PrimitivePatch<Face, FaceList, PointField, PointType>::
clearPatchMeshAddr()
{ {
if (debug) if (debug)
{ {
@ -114,16 +90,8 @@ clearPatchMeshAddr()
} }
template template<class FaceList, class PointField>
< void Foam::PrimitivePatch<FaceList, PointField>::clearOut()
class Face,
template<class> class FaceList,
class PointField,
class PointType
>
void
Foam::PrimitivePatch<Face, FaceList, PointField, PointType>::
clearOut()
{ {
clearGeom(); clearGeom();
clearTopology(); clearTopology();

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -32,16 +32,8 @@ Description
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template template<class FaceList, class PointField>
< void Foam::PrimitivePatch<FaceList, PointField>::calcEdgeLoops() const
class Face,
template<class> class FaceList,
class PointField,
class PointType
>
void
Foam::PrimitivePatch<Face, FaceList, PointField, PointType>::
calcEdgeLoops() const
{ {
if (debug) if (debug)
{ {
@ -155,16 +147,9 @@ calcEdgeLoops() const
} }
template template<class FaceList, class PointField>
<
class Face,
template<class> class FaceList,
class PointField,
class PointType
>
const Foam::labelListList& const Foam::labelListList&
Foam::PrimitivePatch<Face, FaceList, PointField, PointType>:: Foam::PrimitivePatch<FaceList, PointField>::edgeLoops() const
edgeLoops() const
{ {
if (!edgeLoopsPtr_) if (!edgeLoopsPtr_)
{ {

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -31,16 +31,8 @@ Description
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
template template<class FaceList, class PointField>
< void Foam::PrimitivePatch<FaceList, PointField>::calcLocalPointOrder() const
class Face,
template<class> class FaceList,
class PointField,
class PointType
>
void
Foam::PrimitivePatch<Face, FaceList, PointField, PointType>::
calcLocalPointOrder() const
{ {
// Note: Cannot use bandCompressing as point-point addressing does // Note: Cannot use bandCompressing as point-point addressing does
// not exist and is not considered generally useful. // not exist and is not considered generally useful.
@ -48,7 +40,7 @@ calcLocalPointOrder() const
if (debug) if (debug)
{ {
Pout<< "PrimitivePatch<Face, FaceList, PointField, PointType>::" Pout<< "PrimitivePatch<FaceList, PointField>::"
<< "calcLocalPointOrder() : " << "calcLocalPointOrder() : "
<< "calculating local point order" << "calculating local point order"
<< endl; << endl;
@ -63,7 +55,7 @@ calcLocalPointOrder() const
<< abort(FatalError); << abort(FatalError);
} }
const List<Face>& lf = localFaces(); const List<FaceType>& lf = localFaces();
const labelListList& ff = faceFaces(); const labelListList& ff = faceFaces();
@ -125,7 +117,7 @@ calcLocalPointOrder() const
if (debug) if (debug)
{ {
Pout<< "PrimitivePatch<Face, FaceList, PointField, PointType>::" Pout<< "PrimitivePatch<FaceList, PointField>::"
<< "calcLocalPointOrder() " << "calcLocalPointOrder() "
<< "finished calculating local point order" << "finished calculating local point order"
<< endl; << endl;

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -28,21 +28,12 @@ License
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
template template<class FaceList, class PointField>
< void Foam::PrimitivePatch<FaceList, PointField>::calcMeshData() const
class Face,
template<class> class FaceList,
class PointField,
class PointType
>
void
Foam::PrimitivePatch<Face, FaceList, PointField, PointType>::
calcMeshData() const
{ {
if (debug) if (debug)
{ {
Pout<< "PrimitivePatch<Face, FaceList, PointField, PointType>::" Pout<< "PrimitivePatch<FaceList, PointField>::calcMeshData() : "
"calcMeshData() : "
"calculating mesh data in PrimitivePatch" "calculating mesh data in PrimitivePatch"
<< endl; << endl;
} }
@ -71,7 +62,7 @@ calcMeshData() const
//// if the point is used, set the mark to 1 //// if the point is used, set the mark to 1
// forAll(*this, facei) // forAll(*this, facei)
//{ //{
// const Face& curPoints = this->operator[](facei); // const FaceType& curPoints = this->operator[](facei);
// //
// forAll(curPoints, pointi) // forAll(curPoints, pointi)
// { // {
@ -97,7 +88,7 @@ calcMeshData() const
DynamicList<label> meshPoints(2*this->size()); DynamicList<label> meshPoints(2*this->size());
forAll(*this, facei) forAll(*this, facei)
{ {
const Face& curPoints = this->operator[](facei); const FaceType& curPoints = this->operator[](facei);
forAll(curPoints, pointi) forAll(curPoints, pointi)
{ {
@ -114,12 +105,12 @@ calcMeshData() const
// Create local faces. Note that we start off from copy of original face // Create local faces. Note that we start off from copy of original face
// list (even though vertices are overwritten below). This is done so // list (even though vertices are overwritten below). This is done so
// additional data gets copied (e.g. region number of labelledTri) // additional data gets copied (e.g. region number of labelledTri)
localFacesPtr_ = new List<Face>(*this); localFacesPtr_ = new List<FaceType>(*this);
List<Face>& lf = *localFacesPtr_; List<FaceType>& lf = *localFacesPtr_;
forAll(*this, facei) forAll(*this, facei)
{ {
const Face& curFace = this->operator[](facei); const FaceType& curFace = this->operator[](facei);
lf[facei].setSize(curFace.size()); lf[facei].setSize(curFace.size());
forAll(curFace, labelI) forAll(curFace, labelI)
@ -130,29 +121,19 @@ calcMeshData() const
if (debug) if (debug)
{ {
Pout<< "PrimitivePatch<Face, FaceList, PointField, PointType>::" Pout<< "PrimitivePatch<FaceList, PointField>::calcMeshData() : "
"calcMeshData() : "
"finished calculating mesh data in PrimitivePatch" "finished calculating mesh data in PrimitivePatch"
<< endl; << endl;
} }
} }
template template<class FaceList, class PointField>
< void Foam::PrimitivePatch<FaceList, PointField>::calcMeshPointMap() const
class Face,
template<class> class FaceList,
class PointField,
class PointType
>
void
Foam::PrimitivePatch<Face, FaceList, PointField, PointType>::
calcMeshPointMap() const
{ {
if (debug) if (debug)
{ {
Pout<< "PrimitivePatch<Face, FaceList, PointField, PointType>::" Pout<< "PrimitivePatch<FaceList, PointField>::calcMeshPointMap() : "
"calcMeshPointMap() : "
"calculating mesh point map in PrimitivePatch" "calculating mesh point map in PrimitivePatch"
<< endl; << endl;
} }
@ -178,29 +159,19 @@ calcMeshPointMap() const
if (debug) if (debug)
{ {
Pout<< "PrimitivePatch<Face, FaceList, PointField, PointType>::" Pout<< "PrimitivePatch<FaceList, PointField>::calcMeshPointMap() : "
"calcMeshPointMap() : "
"finished calculating mesh point map in PrimitivePatch" "finished calculating mesh point map in PrimitivePatch"
<< endl; << endl;
} }
} }
template template<class FaceList, class PointField>
< void Foam::PrimitivePatch<FaceList, PointField>::calcLocalPoints() const
class Face,
template<class> class FaceList,
class PointField,
class PointType
>
void
Foam::PrimitivePatch<Face, FaceList, PointField, PointType>::
calcLocalPoints() const
{ {
if (debug) if (debug)
{ {
Pout<< "PrimitivePatch<Face, FaceList, PointField, PointType>::" Pout<< "PrimitivePatch<FaceList, PointField>::calcLocalPoints() : "
"calcLocalPoints() : "
"calculating localPoints in PrimitivePatch" "calculating localPoints in PrimitivePatch"
<< endl; << endl;
} }
@ -227,29 +198,19 @@ calcLocalPoints() const
if (debug) if (debug)
{ {
Pout<< "PrimitivePatch<Face, FaceList, PointField, PointType>::" Pout<< "PrimitivePatch<FaceList, PointField>::calcLocalPoints() : "
<< "calcLocalPoints() : "
<< "finished calculating localPoints in PrimitivePatch" << "finished calculating localPoints in PrimitivePatch"
<< endl; << endl;
} }
} }
template template<class FaceList, class PointField>
< void Foam::PrimitivePatch<FaceList, PointField>::calcPointNormals() const
class Face,
template<class> class FaceList,
class PointField,
class PointType
>
void
Foam::PrimitivePatch<Face, FaceList, PointField, PointType>::
calcPointNormals() const
{ {
if (debug) if (debug)
{ {
Pout<< "PrimitivePatch<Face, FaceList, PointField, PointType>::" Pout<< "PrimitivePatch<FaceList, PointField>::calcPointNormals() : "
"calcPointNormals() : "
"calculating pointNormals in PrimitivePatch" "calculating pointNormals in PrimitivePatch"
<< endl; << endl;
} }
@ -291,29 +252,19 @@ calcPointNormals() const
if (debug) if (debug)
{ {
Pout<< "PrimitivePatch<Face, FaceList, PointField, PointType>::" Pout<< "PrimitivePatch<FaceList, PointField>::calcPointNormals() : "
"calcPointNormals() : "
"finished calculating pointNormals in PrimitivePatch" "finished calculating pointNormals in PrimitivePatch"
<< endl; << endl;
} }
} }
template template<class FaceList, class PointField>
< void Foam::PrimitivePatch<FaceList, PointField>::calcFaceCentres() const
class Face,
template<class> class FaceList,
class PointField,
class PointType
>
void
Foam::PrimitivePatch<Face, FaceList, PointField, PointType>::
calcFaceCentres() const
{ {
if (debug) if (debug)
{ {
Pout<< "PrimitivePatch<Face, FaceList, PointField, PointType>::" Pout<< "PrimitivePatch<FaceList, PointField>::calcFaceCentres() : "
"calcFaceCentres() : "
"calculating faceCentres in PrimitivePatch" "calculating faceCentres in PrimitivePatch"
<< endl; << endl;
} }
@ -338,29 +289,19 @@ calcFaceCentres() const
if (debug) if (debug)
{ {
Pout<< "PrimitivePatch<Face, FaceList, PointField, PointType>::" Pout<< "PrimitivePatch<FaceList, PointField>::calcFaceCentres() : "
"calcFaceCentres() : "
"finished calculating faceCentres in PrimitivePatch" "finished calculating faceCentres in PrimitivePatch"
<< endl; << endl;
} }
} }
template template<class FaceList, class PointField>
< void Foam::PrimitivePatch<FaceList, PointField>::calcFaceNormals() const
class Face,
template<class> class FaceList,
class PointField,
class PointType
>
void
Foam::PrimitivePatch<Face, FaceList, PointField, PointType>::
calcFaceNormals() const
{ {
if (debug) if (debug)
{ {
Pout<< "PrimitivePatch<Face, FaceList, PointField, PointType>::" Pout<< "PrimitivePatch<FaceList, PointField>::calcFaceNormals() : "
"calcFaceNormals() : "
"calculating faceNormals in PrimitivePatch" "calculating faceNormals in PrimitivePatch"
<< endl; << endl;
} }
@ -385,8 +326,7 @@ calcFaceNormals() const
if (debug) if (debug)
{ {
Pout<< "PrimitivePatch<Face, FaceList, PointField, PointType>::" Pout<< "PrimitivePatch<FaceList, PointField>::calcFaceNormals() : "
"calcFaceNormals() : "
"finished calculating faceNormals in PrimitivePatch" "finished calculating faceNormals in PrimitivePatch"
<< endl; << endl;
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -28,16 +28,8 @@ License
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
template template<class FaceList, class PointField>
< Foam::labelList Foam::PrimitivePatch<FaceList, PointField>::meshEdges
class Face,
template<class> class FaceList,
class PointField,
class PointType
>
Foam::labelList
Foam::PrimitivePatch<Face, FaceList, PointField, PointType>::
meshEdges
( (
const edgeList& allEdges, const edgeList& allEdges,
const labelListList& cellEdges, const labelListList& cellEdges,
@ -46,10 +38,8 @@ meshEdges
{ {
if (debug) if (debug)
{ {
Info<< "labelList PrimitivePatch<Face, FaceList, PointField, PointType>" InfoInFunction
<< "::meshEdges() : " << "Calculating labels of patch edges in mesh edge list" << endl;
<< "calculating labels of patch edges in mesh edge list"
<< endl;
} }
// get reference to the list of edges on the patch // get reference to the list of edges on the patch
@ -105,16 +95,8 @@ meshEdges
} }
template template<class FaceList, class PointField>
< Foam::labelList Foam::PrimitivePatch<FaceList, PointField>::meshEdges
class Face,
template<class> class FaceList,
class PointField,
class PointType
>
Foam::labelList
Foam::PrimitivePatch<Face, FaceList, PointField, PointType>::
meshEdges
( (
const edgeList& allEdges, const edgeList& allEdges,
const labelListList& pointEdges const labelListList& pointEdges
@ -122,10 +104,8 @@ meshEdges
{ {
if (debug) if (debug)
{ {
Info<< "labelList PrimitivePatch<Face, FaceList, PointField, PointType>" InfoInFunction
<< "::meshEdges() : " << "Calculating labels of patch edges in mesh edge list" << endl;
<< "calculating labels of patch edges in mesh edge list"
<< endl;
} }
// get reference to the list of edges on the patch // get reference to the list of edges on the patch
@ -162,16 +142,8 @@ meshEdges
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template template<class FaceList, class PointField>
< Foam::label Foam::PrimitivePatch<FaceList, PointField>::whichEdge
class Face,
template<class> class FaceList,
class PointField,
class PointType
>
Foam::label
Foam::PrimitivePatch<Face, FaceList, PointField, PointType>::
whichEdge
( (
const edge& e const edge& e
) const ) const

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -33,16 +33,8 @@ Description
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
template template<class FaceList, class PointField>
< void Foam::PrimitivePatch<FaceList, PointField>::calcPointEdges() const
class Face,
template<class> class FaceList,
class PointField,
class PointType
>
void
Foam::PrimitivePatch<Face, FaceList, PointField, PointType>::
calcPointEdges() const
{ {
if (debug) if (debug)
{ {
@ -71,16 +63,8 @@ calcPointEdges() const
} }
template template<class FaceList, class PointField>
< void Foam::PrimitivePatch<FaceList, PointField>::calcPointFaces() const
class Face,
template<class> class FaceList,
class PointField,
class PointType
>
void
Foam::PrimitivePatch<Face, FaceList, PointField, PointType>::
calcPointFaces() const
{ {
if (debug) if (debug)
{ {
@ -96,14 +80,14 @@ calcPointFaces() const
<< abort(FatalError); << abort(FatalError);
} }
const List<Face>& f = localFaces(); const List<FaceType>& f = localFaces();
// set up storage for pointFaces // set up storage for pointFaces
List<SLList<label>> pointFcs(meshPoints().size()); List<SLList<label>> pointFcs(meshPoints().size());
forAll(f, facei) forAll(f, facei)
{ {
const Face& curPoints = f[facei]; const FaceType& curPoints = f[facei];
forAll(curPoints, pointi) forAll(curPoints, pointi)
{ {

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -34,17 +34,10 @@ Description
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template template<class FaceList, class PointField>
<
class Face,
template<class> class FaceList,
class PointField,
class PointType
>
template<class ToPatch> template<class ToPatch>
Foam::List<Foam::objectHit> Foam::List<Foam::objectHit>
Foam::PrimitivePatch<Face, FaceList, PointField, PointType>:: Foam::PrimitivePatch<FaceList, PointField>::projectPoints
projectPoints
( (
const ToPatch& targetPatch, const ToPatch& targetPatch,
const Field<PointType>& projectionDirection, const Field<PointType>& projectionDirection,
@ -277,17 +270,10 @@ projectPoints
} }
template template<class FaceList, class PointField>
<
class Face,
template<class> class FaceList,
class PointField,
class PointType
>
template<class ToPatch> template<class ToPatch>
Foam::List<Foam::objectHit> Foam::List<Foam::objectHit>
Foam::PrimitivePatch<Face, FaceList, PointField, PointType>:: Foam::PrimitivePatch<FaceList, PointField>::projectFaceCentres
projectFaceCentres
( (
const ToPatch& targetPatch, const ToPatch& targetPatch,
const Field<PointType>& projectionDirection, const Field<PointType>& projectionDirection,
@ -326,8 +312,7 @@ projectFaceCentres
// Result // Result
List<objectHit> result(this->size()); List<objectHit> result(this->size());
const PrimitivePatch<Face, FaceList, PointField, PointType>& slaveFaces = const PrimitivePatch<FaceList, PointField>& slaveFaces = *this;
*this;
const PointField& slaveGlobalPoints = points(); const PointField& slaveGlobalPoints = points();

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -41,7 +41,7 @@ Description
namespace Foam namespace Foam
{ {
typedef PrimitivePatch<face, IndirectList, const pointField&> typedef PrimitivePatch<IndirectList<face>, const pointField&>
indirectPrimitivePatch; indirectPrimitivePatch;
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -41,8 +41,7 @@ Description
namespace Foam namespace Foam
{ {
typedef PrimitivePatch<face, List, const pointField&> typedef PrimitivePatch<List<face>, const pointField&> primitiveFacePatch;
primitiveFacePatch;
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -41,8 +41,7 @@ Description
namespace Foam namespace Foam
{ {
typedef PrimitivePatch<face, SubList, const pointField&> typedef PrimitivePatch<SubList<face>, const pointField&> primitivePatch;
primitivePatch;
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -41,7 +41,7 @@ Description
namespace Foam namespace Foam
{ {
typedef PrimitivePatch<face, UIndirectList, const pointField&> typedef PrimitivePatch<UIndirectList<face>, const pointField&>
uindirectPrimitivePatch; uindirectPrimitivePatch;
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -34,15 +34,14 @@ Description
#define bMesh_H #define bMesh_H
#include "PrimitivePatch.H" #include "PrimitivePatch.H"
#include "face.H" #include "faceList.H"
#include "List.H"
#include "pointField.H" #include "pointField.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam namespace Foam
{ {
typedef PrimitivePatch<face, List, const pointField> bMesh; typedef PrimitivePatch<faceList, const pointField> bMesh;
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -535,7 +535,7 @@ void Foam::boundaryMesh::read(const polyMesh& mesh)
// //
// Temporary primitivePatch to calculate compact points & faces. // Temporary primitivePatch to calculate compact points & faces.
PrimitivePatch<face, List, const pointField&> globalPatch PrimitivePatch<faceList, const pointField&> globalPatch
( (
bFaces, bFaces,
mesh.points() mesh.points()

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -43,7 +43,7 @@ SourceFiles
namespace Foam namespace Foam
{ {
typedef PrimitivePatch<face, List, const pointField> bPatch; typedef PrimitivePatch<faceList, const pointField> bPatch;
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -426,7 +426,7 @@ Foam::extendedEdgeMesh::extendedEdgeMesh
Foam::extendedEdgeMesh::extendedEdgeMesh Foam::extendedEdgeMesh::extendedEdgeMesh
( (
const PrimitivePatch<face, List, pointField, point>& surf, const PrimitivePatch<faceList, pointField>& surf,
const labelList& featureEdges, const labelList& featureEdges,
const labelList& regionFeatureEdges, const labelList& regionFeatureEdges,
const labelList& featurePoints const labelList& featurePoints

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -278,7 +278,7 @@ public:
//- Construct from PrimitivePatch //- Construct from PrimitivePatch
extendedEdgeMesh extendedEdgeMesh
( (
const PrimitivePatch<face, List, pointField, point>& surf, const PrimitivePatch<faceList, pointField>& surf,
const labelList& featureEdges, const labelList& featureEdges,
const labelList& regionFeatureEdges, const labelList& regionFeatureEdges,
const labelList& featurePoints const labelList& featurePoints

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -120,7 +120,7 @@ Foam::extendedFeatureEdgeMesh::extendedFeatureEdgeMesh
Foam::extendedFeatureEdgeMesh::extendedFeatureEdgeMesh Foam::extendedFeatureEdgeMesh::extendedFeatureEdgeMesh
( (
const IOobject& io, const IOobject& io,
const PrimitivePatch<face, List, pointField, point>& surf, const PrimitivePatch<faceList, pointField>& surf,
const labelList& featureEdges, const labelList& featureEdges,
const labelList& regionFeatureEdges, const labelList& regionFeatureEdges,
const labelList& featurePoints const labelList& featurePoints

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -90,7 +90,7 @@ public:
extendedFeatureEdgeMesh extendedFeatureEdgeMesh
( (
const IOobject&, const IOobject&,
const PrimitivePatch<face, List, pointField, point>& surf, const PrimitivePatch<faceList, pointField>& surf,
const labelList& featureEdges, const labelList& featureEdges,
const labelList& regionFeatureEdges, const labelList& regionFeatureEdges,
const labelList& featurePoints const labelList& featurePoints

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -475,7 +475,7 @@ Foam::tmp<Foam::pointField> Foam::triSurfaceMesh::coordinates() const
pointField& pt = tPts.ref(); pointField& pt = tPts.ref();
// Use copy to calculate face centres so they don't get stored // Use copy to calculate face centres so they don't get stored
pt = PrimitivePatch<triSurface::FaceType, SubList, const pointField&> pt = PrimitivePatch<SubList<triSurface::FaceType>, const pointField&>
( (
SubList<triSurface::FaceType>(*this, triSurface::size()), SubList<triSurface::FaceType>(*this, triSurface::size()),
triSurface::points() triSurface::points()

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -59,12 +59,8 @@ class triSurfaceRegionSearch
{ {
// Private typedefs // Private typedefs
typedef PrimitivePatch typedef PrimitivePatch<IndirectList<labelledTri>, const pointField&>
< indirectTriSurface;
labelledTri,
IndirectList,
const pointField&
> indirectTriSurface;
typedef treeDataPrimitivePatch<indirectTriSurface> typedef treeDataPrimitivePatch<indirectTriSurface>
treeDataIndirectTriSurface; treeDataIndirectTriSurface;

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -176,7 +176,7 @@ private:
void triangulateOutside void triangulateOutside
( (
const bool filterDiag, const bool filterDiag,
const PrimitivePatch<face, SubList, const pointField&>& pp, const PrimitivePatch<SubList<face>, const pointField&>& pp,
const boolList& pointFromDiag, const boolList& pointFromDiag,
const labelList& pointToFace, const labelList& pointToFace,
const label cellID, const label cellID,

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -81,7 +81,7 @@ template<class Face> class UnsortedMeshedSurface;
template<class Face> template<class Face>
class MeshedSurface class MeshedSurface
: :
public PrimitivePatch<Face, ::Foam::List, pointField, point>, public PrimitivePatch<::Foam::List<Face>, pointField>,
public fileFormats::surfaceFormatsCore public fileFormats::surfaceFormatsCore
{ {
// friends - despite different face representationsx // friends - despite different face representationsx
@ -94,14 +94,7 @@ private:
// Private typedefs for convenience // Private typedefs for convenience
typedef PrimitivePatch typedef PrimitivePatch<::Foam::List<Face>, pointField> ParentType;
<
Face,
::Foam::List,
pointField,
point
>
ParentType;
typedef UnsortedMeshedSurface<Face> FriendType; typedef UnsortedMeshedSurface<Face> FriendType;
typedef MeshedSurfaceProxy<Face> ProxyType; typedef MeshedSurfaceProxy<Face> ProxyType;

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -57,7 +57,7 @@ class surfMesh
: :
public surfaceRegistry, public surfaceRegistry,
private MeshedSurfaceIOAllocator, private MeshedSurfaceIOAllocator,
public PrimitivePatch<face, ::Foam::UList, ::Foam::SubField<point>, point> public PrimitivePatch<::Foam::UList<face>, ::Foam::SubField<point>>
{ {
// friends // friends
template<class Face> friend class MeshedSurface; template<class Face> friend class MeshedSurface;
@ -85,13 +85,7 @@ private:
typedef MeshedSurfaceIOAllocator Allocator; typedef MeshedSurfaceIOAllocator Allocator;
typedef PrimitivePatch typedef PrimitivePatch<::Foam::UList<face>, ::Foam::SubField<point>>
<
face,
::Foam::UList,
::Foam::SubField<point>,
point
>
MeshReference; MeshReference;

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -299,7 +299,7 @@ void Foam::fileFormats::AC3DsurfaceFormat<Face>::write
// Temporary PrimitivePatch to calculate compact points & faces // Temporary PrimitivePatch to calculate compact points & faces
// use 'UList' to avoid allocations! // use 'UList' to avoid allocations!
PrimitivePatch<Face, UList, const pointField&> patch PrimitivePatch<UList<Face>, const pointField&> patch
( (
SubList<Face> SubList<Face>
( (

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -66,19 +66,13 @@ Ostream& operator<<(Ostream&, const triSurface&);
class triSurface class triSurface
: :
public PrimitivePatch<labelledTri, ::Foam::List, pointField, point> public PrimitivePatch<::Foam::List<labelledTri>, pointField>
{ {
// Private typedefs // Private typedefs
//- Typedefs for convenience //- Typedefs for convenience
typedef labelledTri Face; typedef labelledTri Face;
typedef PrimitivePatch typedef PrimitivePatch<::Foam::List<labelledTri>, pointField>
<
labelledTri,
::Foam::List,
pointField,
point
>
ParentType; ParentType;