PrimitivePatch: Simplified templating

This commit is contained in:
Will Bainbridge
2019-01-21 08:52:52 +00:00
parent 19c3584d4b
commit cd8aee2d76
46 changed files with 381 additions and 956 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -27,18 +27,10 @@ License
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
template
<
class Face,
template<class> class FaceList,
class PointField,
class PointType
>
Foam::labelListList
Foam::PatchTools::sortedPointEdges
template<class FaceList, class PointField>
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

View File

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

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -78,27 +78,27 @@ TemplateName(PrimitivePatch);
Class PrimitivePatch Declaration
\*---------------------------------------------------------------------------*/
template
<
class Face,
template<class> class FaceList,
class PointField,
class PointType=point
>
template<class FaceList, class PointField>
class PrimitivePatch
:
public PrimitivePatchName,
public FaceList<Face>
public FaceList
{
public:
// Public typedefs
typedef Face FaceType;
typedef FaceList<Face> FaceListType;
typedef FaceList FaceListType;
typedef typename std::remove_reference<FaceList>::type::value_type
FaceType;
typedef PointField PointFieldType;
typedef typename std::remove_reference<PointField>::type::value_type
PointType;
// Public data types
@ -147,7 +147,7 @@ private:
mutable labelListList* pointFacesPtr_;
//- Faces addressing into local point list
mutable List<Face>* localFacesPtr_;
mutable List<FaceType>* localFacesPtr_;
//- Labels of mesh points
mutable labelList* meshPointsPtr_;
@ -239,21 +239,21 @@ public:
//- Construct from components
PrimitivePatch
(
const FaceList<Face>& faces,
const FaceList& faces,
const Field<PointType>& points
);
//- Construct from components
PrimitivePatch
(
const Xfer<FaceList<Face>>& faces,
const Xfer<FaceList>& faces,
const Xfer<List<PointType>>& points
);
//- Construct from components, reuse storage
PrimitivePatch
(
FaceList<Face>& faces,
FaceList& faces,
Field<PointType>& points,
const bool reuse
);
@ -261,7 +261,7 @@ public:
//- Construct as copy
PrimitivePatch
(
const PrimitivePatch<Face, FaceList, PointField, PointType>&
const PrimitivePatch<FaceList, PointField>&
);
@ -336,7 +336,7 @@ public:
const labelListList& pointFaces() const;
//- Return patch faces addressing into local point list
const List<Face>& localFaces() const;
const List<FaceType>& localFaces() const;
// Addressing into mesh
@ -465,7 +465,7 @@ public:
//- Assignment
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
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -40,22 +40,12 @@ Description
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
template
<
class Face,
template<class> class FaceList,
class PointField,
class PointType
>
void
Foam::PrimitivePatch<Face, FaceList, PointField, PointType>::
calcAddressing() const
template<class FaceList, class PointField>
void Foam::PrimitivePatch<FaceList, PointField>::calcAddressing() const
{
if (debug)
{
Info<< "PrimitivePatch<Face, FaceList, PointField, PointType>::"
<< "calcAddressing() : calculating patch addressing"
<< endl;
InfoInFunction << "calculating patch addressing" << endl;
}
if (edgesPtr_ || faceFacesPtr_ || edgeFacesPtr_ || faceEdgesPtr_)
@ -68,7 +58,7 @@ calcAddressing() const
}
// get reference to localFaces
const List<Face>& locFcs = localFaces();
const List<FaceType>& locFcs = localFaces();
// get reference to pointFaces
const labelListList& pf = pointFaces();
@ -128,7 +118,7 @@ calcAddressing() const
forAll(locFcs, facei)
{
// 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];
// Record the neighbour face. Multiple connectivity allowed
@ -293,9 +283,7 @@ calcAddressing() const
if (debug)
{
Info<< "PrimitivePatch<Face, FaceList, PointField, PointType>::"
<< "calcAddressing() : finished calculating patch addressing"
<< endl;
InfoInFunction << "Finished calculating patch addressing" << endl;
}
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -475,7 +475,7 @@ Foam::tmp<Foam::pointField> Foam::triSurfaceMesh::coordinates() const
pointField& pt = tPts.ref();
// 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()),
triSurface::points()

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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