diff --git a/src/OpenFOAM/containers/Bits/bitSet/PackedBoolList.H b/src/OpenFOAM/containers/Bits/bitSet/PackedBoolList.H index 2d8f5163ebe56fa13f8a6a77b04fa2f5de746eb3..801d2fb0ee610f3a4260aa419f97e3001341f6ca 100644 --- a/src/OpenFOAM/containers/Bits/bitSet/PackedBoolList.H +++ b/src/OpenFOAM/containers/Bits/bitSet/PackedBoolList.H @@ -8,8 +8,7 @@ Copyright (C) 2018 OpenCFD Ltd. ------------------------------------------------------------------------------- License - This file is part of OpenFOAM, licensed under GNU General Public License - <http://www.gnu.org/licenses/>. + This file is part of OpenFOAM, distributed under GPL-3.0-or-later. Typedef Foam::PackedBoolList diff --git a/src/OpenFOAM/meshes/meshShapes/cell/cell.C b/src/OpenFOAM/meshes/meshShapes/cell/cell.C index 484afafa07781b1fcefbd461f05ba4793b266763..33f6f71cf5023d807c3090e8a3915b4588146520 100644 --- a/src/OpenFOAM/meshes/meshShapes/cell/cell.C +++ b/src/OpenFOAM/meshes/meshShapes/cell/cell.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -32,17 +33,15 @@ License const char* const Foam::cell::typeName = "cell"; + // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // Foam::labelList Foam::cell::labels(const faceUList& f) const { - // return the unordered list of vertex labels supporting the cell - - // count the maximum size of all vertices - label maxVert = 0; - const labelList& faces = *this; + // Count the maximum size of all vertices + label maxVert = 0; forAll(faces, facei) { maxVert += f[faces[facei]].size(); @@ -65,6 +64,7 @@ Foam::labelList Foam::cell::labels(const faceUList& f) const // go through the rest of the faces. For each vertex, check if the point is // already inserted (up to maxVert, which now carries the number of real // points. If not, add it at the end of the list. + for (label facei = 1; facei < faces.size(); facei++) { const labelList& curFace = f[faces[facei]]; @@ -87,8 +87,7 @@ Foam::labelList Foam::cell::labels(const faceUList& f) const if (!found) { p[maxVert] = curPoint; - - maxVert++; + ++maxVert; } } } @@ -121,11 +120,8 @@ Foam::pointField Foam::cell::points Foam::edgeList Foam::cell::edges(const faceUList& f) const { - // return the lisf of cell edges - const labelList& curFaces = *this; - // create a list of edges label maxNoEdges = 0; forAll(curFaces, facei) @@ -140,10 +136,8 @@ Foam::edgeList Foam::cell::edges(const faceUList& f) const { const edgeList curFaceEdges = f[curFaces[facei]].edges(); - forAll(curFaceEdges, faceEdgeI) + for (const edge& curEdge : curFaceEdges) { - const edge& curEdge = curFaceEdges[faceEdgeI]; - bool edgeFound = false; for (label addedEdgeI = 0; addedEdgeI < nEdges; addedEdgeI++) @@ -160,7 +154,7 @@ Foam::edgeList Foam::cell::edges(const faceUList& f) const { // Add the new edge onto the list allEdges[nEdges] = curEdge; - nEdges++; + ++nEdges; } } } @@ -194,6 +188,7 @@ Foam::point Foam::cell::centre // first calculate the approximate cell centre as the average of all // face centres + vector cEst = Zero; scalar sumArea = 0; diff --git a/src/OpenFOAM/meshes/meshShapes/cell/cell.H b/src/OpenFOAM/meshes/meshShapes/cell/cell.H index e100379523711545c56212826a4d724d4c1e1381..afedec85433b4e5d07acf766fe9ba3c06aeb1257 100644 --- a/src/OpenFOAM/meshes/meshShapes/cell/cell.H +++ b/src/OpenFOAM/meshes/meshShapes/cell/cell.H @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011 OpenFOAM Foundation - Copyright (C) 2017 OpenCFD Ltd. + Copyright (C) 2017-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -56,27 +56,37 @@ class cell : public labelList { - public: - // Static data members + // Static Data Members static const char* const typeName; // Constructors - //- Construct null - inline cell(); + //- Default construct + constexpr cell() noexcept = default; //- Construct given size, with invalid point labels (-1) inline explicit cell(const label sz); - //- Copy construct from list of labels - inline explicit cell(const labelUList& lst); + //- Copy construct from list of face labels + inline explicit cell(const labelUList& list); + + //- Move construct from list of face labels + inline explicit cell(labelList&& list); + + //- Copy construct from list of face labels + template<unsigned N> + inline explicit cell(const FixedList<label, N>& list); - //- Move construct from list of labels - inline explicit cell(labelList&& lst); + //- Copy construct from subset of face labels + inline cell(const labelUList& list, const labelUList& indices); + + //- Copy construct from subset of face labels + template<unsigned N> + inline cell(const labelUList& list, const FixedList<label, N>& indices); //- Construct from Istream inline cell(Istream& is); @@ -88,17 +98,17 @@ public: inline label nFaces() const; //- Return unordered list of cell vertices given the list of faces - labelList labels(const faceUList& f) const; + labelList labels(const faceUList& meshFaces) const; //- Return the cell vertices given the list of faces and mesh points pointField points ( - const faceUList& f, + const faceUList& meshFaces, const UList<point>& meshPoints ) const; //- Return cell edges - edgeList edges(const faceUList& f) const; + edgeList edges(const faceUList& meshFaces) const; //- Return index of opposite face label opposingFaceLabel @@ -124,10 +134,18 @@ public: // future. //- Returns cell centre - point centre(const UList<point>& p, const faceUList& f) const; + point centre + ( + const UList<point>& meshPoints, + const faceUList& meshFaces + ) const; //- Returns cell volume - scalar mag(const UList<point>& p, const faceUList& f) const; + scalar mag + ( + const UList<point>& meshPoints, + const faceUList& meshFaces + ) const; }; diff --git a/src/OpenFOAM/meshes/meshShapes/cell/cellI.H b/src/OpenFOAM/meshes/meshShapes/cell/cellI.H index 50e9d3dd47fe108ec54305ed45f9d833411cc49b..56fe8947a613669d894ec9bb70bec8bd9c96654e 100644 --- a/src/OpenFOAM/meshes/meshShapes/cell/cellI.H +++ b/src/OpenFOAM/meshes/meshShapes/cell/cellI.H @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -27,25 +28,45 @@ License // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -inline Foam::cell::cell() +inline Foam::cell::cell(const label sz) +: + labelList(sz, -1) {} -inline Foam::cell::cell(const label sz) +inline Foam::cell::cell(const labelUList& list) : - labelList(sz, -1) + labelList(list) +{} + + +template<unsigned N> +inline Foam::cell::cell(const FixedList<label, N>& list) +: + labelList(list) +{} + + +inline Foam::cell::cell(labelList&& list) +: + labelList(std::move(list)) {} -inline Foam::cell::cell(const labelUList& lst) +inline Foam::cell::cell(const labelUList& list, const labelUList& indices) : - labelList(lst) + labelList(list, indices) {} -inline Foam::cell::cell(labelList&& lst) +template<unsigned N> +inline Foam::cell::cell +( + const labelUList& list, + const FixedList<label, N>& indices +) : - labelList(std::move(lst)) + labelList(list, indices) {} diff --git a/src/OpenFOAM/meshes/meshShapes/cellMatcher/cellMatcher.H b/src/OpenFOAM/meshes/meshShapes/cellMatcher/cellMatcher.H index b837c78786ab96e90282ab8d038024bf488c411c..178cf99470510085fcad294111be8a05d3557d52 100644 --- a/src/OpenFOAM/meshes/meshShapes/cellMatcher/cellMatcher.H +++ b/src/OpenFOAM/meshes/meshShapes/cellMatcher/cellMatcher.H @@ -80,8 +80,7 @@ SourceFiles #ifndef cellMatcher_H #define cellMatcher_H -#include "labelList.H" -#include "faceList.H" +#include "cellModel.H" #include "Map.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -89,11 +88,10 @@ SourceFiles namespace Foam { -// Forward declaration of classes -class primitiveMesh; +// Forward Declarations class cell; -class cellModel; class cellShape; +class primitiveMesh; /*---------------------------------------------------------------------------*\ Class cellMatcher Declaration @@ -103,7 +101,7 @@ class cellMatcher { protected: - // Static functions + // Static Functions //- Given start and end of edge generate unique key inline static label edgeKey @@ -116,7 +114,8 @@ protected: //- Step along face either in righthand or lefthand direction inline static label nextVert(const label, const label, const bool); - // Protected data + + // Protected Data // Map from mesh to local vertex numbering Map<label> localPoint_; @@ -174,11 +173,6 @@ protected: const label localFacei ) const; - -private: - - // Private Member Functions - //- No copy construct cellMatcher(const cellMatcher&) = delete; @@ -224,6 +218,7 @@ public: void write(Ostream& os) const; + // Cell shape dependent virtual label nVertPerCell() const = 0; @@ -271,7 +266,6 @@ public: const label celli, cellShape& shape ) = 0; - }; diff --git a/src/OpenFOAM/meshes/meshShapes/cellMatcher/cellMatcherI.H b/src/OpenFOAM/meshes/meshShapes/cellMatcher/cellMatcherI.H index ced5f1e02ebd08aac9b309ccd251c4519fa07c81..2e968546b7d52a813ef1994f5f16fe2e4039e0b5 100644 --- a/src/OpenFOAM/meshes/meshShapes/cellMatcher/cellMatcherI.H +++ b/src/OpenFOAM/meshes/meshShapes/cellMatcher/cellMatcherI.H @@ -25,9 +25,6 @@ License \*---------------------------------------------------------------------------*/ -#include "primitiveMesh.H" -#include "cellModel.H" - // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // inline const Foam::Map<Foam::label>& Foam::cellMatcher::localPoint() const diff --git a/src/OpenFOAM/meshes/meshShapes/cellMatcher/degenerateMatcher.C b/src/OpenFOAM/meshes/meshShapes/cellMatcher/degenerateMatcher.C index 5ed5a632f9c74c48b33433644ef0b244d935b613..a95c64fde13604e720ebb96f09b473e26b5f1698 100644 --- a/src/OpenFOAM/meshes/meshShapes/cellMatcher/degenerateMatcher.C +++ b/src/OpenFOAM/meshes/meshShapes/cellMatcher/degenerateMatcher.C @@ -26,6 +26,7 @@ License \*---------------------------------------------------------------------------*/ #include "degenerateMatcher.H" +#include "primitiveMesh.H" #include "ListOps.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // diff --git a/src/OpenFOAM/meshes/meshShapes/cellMatcher/degenerateMatcher.H b/src/OpenFOAM/meshes/meshShapes/cellMatcher/degenerateMatcher.H index 4cf14a5aea94925338d88a77e7225f7315f3a7b2..8cbe021e4a8f9055579ca6fd485cb1bb2e329ccd 100644 --- a/src/OpenFOAM/meshes/meshShapes/cellMatcher/degenerateMatcher.H +++ b/src/OpenFOAM/meshes/meshShapes/cellMatcher/degenerateMatcher.H @@ -60,8 +60,7 @@ namespace Foam class degenerateMatcher { - - // Static data members + // Static Data Members //- Matchers for all degenerate hex shapes static hexMatcher hex; @@ -71,7 +70,8 @@ class degenerateMatcher static pyrMatcher pyr; static tetMatcher tet; - // Static functions + + // Static Functions //- Recognize basic shape static cellShape match @@ -84,13 +84,13 @@ class degenerateMatcher public: - // Static data members + // Static Functions //- Recognize shape given faces of a cell static cellShape match(const faceList& faces); //- Recognize given uncollapsed shape (usually hex) with duplicate - // vertices. cellShape just used to extract faces. + //- vertices. cellShape just used to extract faces. static cellShape match(const cellShape& shape); //- Recognize shape given mesh and celli diff --git a/src/OpenFOAM/meshes/meshShapes/cellMatcher/hexMatcher.C b/src/OpenFOAM/meshes/meshShapes/cellMatcher/hexMatcher.C index fb99e1f3dd063074b7d3f2f32e053ad9fdb655fb..fc76b142b709e41943f2fc352f032ec321b209ff 100644 --- a/src/OpenFOAM/meshes/meshShapes/cellMatcher/hexMatcher.C +++ b/src/OpenFOAM/meshes/meshShapes/cellMatcher/hexMatcher.C @@ -38,17 +38,11 @@ Foam::hexMatcher::hexMatcher() vertPerCell, facePerCell, maxVertPerFace, - "hex" // same as cellModel::modelNames[cellModel::HEX] + "hex" // == cellModel::modelNames[cellModel::HEX] ) {} -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -Foam::hexMatcher::~hexMatcher() -{} - - // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // bool Foam::hexMatcher::matchShape diff --git a/src/OpenFOAM/meshes/meshShapes/cellMatcher/hexMatcher.H b/src/OpenFOAM/meshes/meshShapes/cellMatcher/hexMatcher.H index 6c3ae816649b153118e5d7e0de8389207a0abd23..04db020287d727d87d55d37d94f12cb671b405b3 100644 --- a/src/OpenFOAM/meshes/meshShapes/cellMatcher/hexMatcher.H +++ b/src/OpenFOAM/meshes/meshShapes/cellMatcher/hexMatcher.H @@ -76,11 +76,12 @@ public: // Constructors - //- Construct null + //- Default construct hexMatcher(); + //- Destructor - ~hexMatcher(); + ~hexMatcher() = default; // Member Functions diff --git a/src/OpenFOAM/meshes/meshShapes/cellMatcher/prismMatcher.C b/src/OpenFOAM/meshes/meshShapes/cellMatcher/prismMatcher.C index 2c3f7f4c013fbf845d4794bec4dd00159ca75321..566d4ed5223968e75b1cf5a1bda03f8f89a50ffd 100644 --- a/src/OpenFOAM/meshes/meshShapes/cellMatcher/prismMatcher.C +++ b/src/OpenFOAM/meshes/meshShapes/cellMatcher/prismMatcher.C @@ -38,14 +38,10 @@ Foam::prismMatcher::prismMatcher() vertPerCell, facePerCell, maxVertPerFace, - "prism" // same as cellModel::modelNames[cellModel::PRISM] + "prism" // == cellModel::modelNames[cellModel::PRISM] ) {} -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -Foam::prismMatcher::~prismMatcher() -{} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // diff --git a/src/OpenFOAM/meshes/meshShapes/cellMatcher/prismMatcher.H b/src/OpenFOAM/meshes/meshShapes/cellMatcher/prismMatcher.H index bfebb03de6a9f8be057245b7f08275fc92fb9f95..fae45ed7d65639040961fbf79e4c42dd37d4a4af 100644 --- a/src/OpenFOAM/meshes/meshShapes/cellMatcher/prismMatcher.H +++ b/src/OpenFOAM/meshes/meshShapes/cellMatcher/prismMatcher.H @@ -76,11 +76,12 @@ public: // Constructors - //- Construct + //- Default construct prismMatcher(); + //- Destructor - ~prismMatcher(); + ~prismMatcher() = default; // Member Functions diff --git a/src/OpenFOAM/meshes/meshShapes/cellMatcher/pyrMatcher.C b/src/OpenFOAM/meshes/meshShapes/cellMatcher/pyrMatcher.C index 8b4a8d599a15d6f90d31c5cfa4852420bf88ccfd..6667d5413accf61e5b5fcb02a8efb4f6bc94e43c 100644 --- a/src/OpenFOAM/meshes/meshShapes/cellMatcher/pyrMatcher.C +++ b/src/OpenFOAM/meshes/meshShapes/cellMatcher/pyrMatcher.C @@ -40,17 +40,11 @@ Foam::pyrMatcher::pyrMatcher() vertPerCell, facePerCell, maxVertPerFace, - "pyr" // same as cellModel::modelNames[cellModel::PYR] + "pyr" // == cellModel::modelNames[cellModel::PYR] ) {} -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -Foam::pyrMatcher::~pyrMatcher() -{} - - // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // bool Foam::pyrMatcher::matchShape diff --git a/src/OpenFOAM/meshes/meshShapes/cellMatcher/pyrMatcher.H b/src/OpenFOAM/meshes/meshShapes/cellMatcher/pyrMatcher.H index 6f2fb84f77754377afe7819a172cc74bd6696793..908dd98bfc265badba0fd94c766683ed77f85710 100644 --- a/src/OpenFOAM/meshes/meshShapes/cellMatcher/pyrMatcher.H +++ b/src/OpenFOAM/meshes/meshShapes/cellMatcher/pyrMatcher.H @@ -76,11 +76,12 @@ public: // Constructors - //- Construct null + //- Default construct pyrMatcher(); + //- Destructor - ~pyrMatcher(); + ~pyrMatcher() = default; // Member Functions diff --git a/src/OpenFOAM/meshes/meshShapes/cellMatcher/tetMatcher.C b/src/OpenFOAM/meshes/meshShapes/cellMatcher/tetMatcher.C index 5208fafd1219b056a2b6f353390731c165a49571..2d59c197837e01ca9277c00419c1ba1e5f0f3694 100644 --- a/src/OpenFOAM/meshes/meshShapes/cellMatcher/tetMatcher.C +++ b/src/OpenFOAM/meshes/meshShapes/cellMatcher/tetMatcher.C @@ -40,20 +40,13 @@ Foam::tetMatcher::tetMatcher() vertPerCell, facePerCell, maxVertPerFace, - "tet" // same as cellModel::modelNames[cellModel::TET] + "tet" // == cellModel::modelNames[cellModel::TET] ) {} -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -Foam::tetMatcher::~tetMatcher() -{} - - // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - bool Foam::tetMatcher::matchShape ( const bool checkOnly, diff --git a/src/OpenFOAM/meshes/meshShapes/cellMatcher/tetMatcher.H b/src/OpenFOAM/meshes/meshShapes/cellMatcher/tetMatcher.H index d00a203783961754538b6a94e27cf0fca4e69f63..f93c2042f39ee03da182c128af9a999293f3d98f 100644 --- a/src/OpenFOAM/meshes/meshShapes/cellMatcher/tetMatcher.H +++ b/src/OpenFOAM/meshes/meshShapes/cellMatcher/tetMatcher.H @@ -76,11 +76,12 @@ public: // Constructors - //- Construct null + //- Default construct tetMatcher(); + //- Destructor - ~tetMatcher(); + ~tetMatcher() = default; // Member Functions diff --git a/src/OpenFOAM/meshes/meshShapes/cellMatcher/tetWedgeMatcher.C b/src/OpenFOAM/meshes/meshShapes/cellMatcher/tetWedgeMatcher.C index babc274f9e22dc3fa706c6fac5e5cc4b58488d62..e85f543e953af60e2941483235e85d2cd0271a29 100644 --- a/src/OpenFOAM/meshes/meshShapes/cellMatcher/tetWedgeMatcher.C +++ b/src/OpenFOAM/meshes/meshShapes/cellMatcher/tetWedgeMatcher.C @@ -40,17 +40,11 @@ Foam::tetWedgeMatcher::tetWedgeMatcher() vertPerCell, facePerCell, maxVertPerFace, - "tetWedge" // same as cellModel::modelNames[cellModel::TETWEDGE] + "tetWedge" // == cellModel::modelNames[cellModel::TETWEDGE] ) {} -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -Foam::tetWedgeMatcher::~tetWedgeMatcher() -{} - - // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // bool Foam::tetWedgeMatcher::matchShape diff --git a/src/OpenFOAM/meshes/meshShapes/cellMatcher/tetWedgeMatcher.H b/src/OpenFOAM/meshes/meshShapes/cellMatcher/tetWedgeMatcher.H index 58791358f9657730c6207c294e07db22bc08f046..3322ce373a8e315af36154a7095e982d3be889d8 100644 --- a/src/OpenFOAM/meshes/meshShapes/cellMatcher/tetWedgeMatcher.H +++ b/src/OpenFOAM/meshes/meshShapes/cellMatcher/tetWedgeMatcher.H @@ -76,11 +76,12 @@ public: // Constructors - //- Construct null + //- Default construct tetWedgeMatcher(); + //- Destructor - ~tetWedgeMatcher(); + ~tetWedgeMatcher() = default; // Member Functions diff --git a/src/OpenFOAM/meshes/meshShapes/cellMatcher/wedgeMatcher.C b/src/OpenFOAM/meshes/meshShapes/cellMatcher/wedgeMatcher.C index 1304060efc0f934f1cbbcbbf571477b2c0f5eb5f..e3c76909d03d7099daa0b01e9639180d0b04d248 100644 --- a/src/OpenFOAM/meshes/meshShapes/cellMatcher/wedgeMatcher.C +++ b/src/OpenFOAM/meshes/meshShapes/cellMatcher/wedgeMatcher.C @@ -38,17 +38,11 @@ Foam::wedgeMatcher::wedgeMatcher() vertPerCell, facePerCell, maxVertPerFace, - "wedge" // same as cellModel::modelNames[cellModel::WEDGE] + "wedge" // == cellModel::modelNames[cellModel::WEDGE] ) {} -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -Foam::wedgeMatcher::~wedgeMatcher() -{} - - // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // bool Foam::wedgeMatcher::matchShape diff --git a/src/OpenFOAM/meshes/meshShapes/cellMatcher/wedgeMatcher.H b/src/OpenFOAM/meshes/meshShapes/cellMatcher/wedgeMatcher.H index 12c186f1d0b84065b2ddcf3b4dcfc5ef0e0724e5..376de912056bdc319772c7b10d99e987f21724c7 100644 --- a/src/OpenFOAM/meshes/meshShapes/cellMatcher/wedgeMatcher.H +++ b/src/OpenFOAM/meshes/meshShapes/cellMatcher/wedgeMatcher.H @@ -76,11 +76,12 @@ public: // Constructors - //- Construct null + //- Default construct wedgeMatcher(); + //- Destructor - ~wedgeMatcher(); + ~wedgeMatcher() = default; // Member Functions diff --git a/src/OpenFOAM/meshes/meshShapes/cellModel/cellModel.C b/src/OpenFOAM/meshes/meshShapes/cellModel/cellModel.C index b72d13a63b7c57dcf73368c4ef7333291b336f6a..926b07abde522ed9a80912b7042f7f43c085d594 100644 --- a/src/OpenFOAM/meshes/meshShapes/cellModel/cellModel.C +++ b/src/OpenFOAM/meshes/meshShapes/cellModel/cellModel.C @@ -27,7 +27,7 @@ License \*---------------------------------------------------------------------------*/ #include "cellModel.H" -#include "pyramid.H" +#include "pyramidPointFaceRef.H" // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // @@ -37,51 +37,37 @@ Foam::vector Foam::cellModel::centre const UList<point>& points ) const { - // Estimate centre of cell + // Estimate cell centre by averaging the cell points vector cEst = Zero; - - // Sum the points indicated by the label list - forAll(pointLabels, i) + for (const label pointi : pointLabels) { - cEst += points[pointLabels[i]]; + cEst += points[pointi]; } - - // Average by dividing by the number summed over. cEst /= scalar(pointLabels.size()); // Calculate the centre by breaking the cell into pyramids and // volume-weighted averaging their centres - scalar sumV = 0.0; - vector sumVc = Zero; - const faceList cellFaces = faces(pointLabels); + scalar sumV = 0; + vector sumVc = Zero; - forAll(cellFaces, i) + forAll(faces_, facei) { - const face& curFace = cellFaces[i]; + const Foam::face f(pointLabels, faces_[facei]); - scalar pyrVol = - pyramid<point, const point&, const face&> - ( - curFace, - cEst - ).mag(points); + const scalar pyrVol = pyramidPointFaceRef(f, cEst).mag(points); if (pyrVol > SMALL) { WarningInFunction << "zero or negative pyramid volume: " << -pyrVol - << " for face " << i + << " for face " << facei << endl; } - sumVc -= - pyrVol - *pyramid<point, const point&, const face&>(curFace, cEst) - .centre(points); - sumV -= pyrVol; + sumVc -= pyrVol * pyramidPointFaceRef(f, cEst).centre(points); } return sumVc/(sumV + VSMALL); @@ -94,16 +80,12 @@ Foam::scalar Foam::cellModel::mag const UList<point>& points ) const { - // Estimate centre of cell + // Estimate cell centre by averaging the cell points vector cEst = Zero; - - // Sum the points indicated by the label list - forAll(pointLabels, i) + for (const label pointi : pointLabels) { - cEst += points[pointLabels[i]]; + cEst += points[pointi]; } - - // Average by dividing by the number summed over. cEst /= scalar(pointLabels.size()); @@ -111,33 +93,27 @@ Foam::scalar Foam::cellModel::mag // The sign change is because the faces point outwards // and a pyramid is constructed from an inward pointing face // and the base centre-apex vector - scalar v = 0; - const faceList cellFaces = faces(pointLabels); + scalar sumV = 0; - forAll(cellFaces, i) + forAll(faces_, facei) { - const face& curFace =cellFaces[i]; + const Foam::face f(pointLabels, faces_[facei]); - scalar pyrVol = - pyramid<point, const point&, const face&> - ( - curFace, - cEst - ).mag(points); + const scalar pyrVol = pyramidPointFaceRef(f, cEst).mag(points); if (pyrVol > SMALL) { WarningInFunction << "zero or negative pyramid volume: " << -pyrVol - << " for face " << i + << " for face " << facei << endl; } - v -= pyrVol; + sumV -= pyrVol; } - return v; + return sumV; } diff --git a/src/OpenFOAM/meshes/meshShapes/cellModel/cellModel.H b/src/OpenFOAM/meshes/meshShapes/cellModel/cellModel.H index 6e67728106571cba84d87d503ae566431973f4ef..747ae7dd276e8923b7ce939521b7ae3dd8510957 100644 --- a/src/OpenFOAM/meshes/meshShapes/cellModel/cellModel.H +++ b/src/OpenFOAM/meshes/meshShapes/cellModel/cellModel.H @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2015 OpenFOAM Foundation - Copyright (C) 2017 OpenCFD Ltd. + Copyright (C) 2017-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -62,7 +62,7 @@ SourceFiles namespace Foam { -// Forward declarations +// Forward Declarations class cellModel; Ostream& operator<<(Ostream& os, const cellModel& cm); @@ -93,7 +93,7 @@ public: static const Enum<modelType> modelNames; - // Lookup Static Models + // Lookup Methods //- Look up pointer to cellModel by enumeration, or nullptr on failure. static const cellModel* ptr(const modelType model); @@ -155,9 +155,9 @@ public: // Constructors //- Construct from Istream - cellModel(Istream& is); + explicit cellModel(Istream& is); - //- Return a new cellModel on free-store created from Istream + //- Return a new cellModel created from Istream static autoPtr<cellModel> New(Istream& is) { return autoPtr<cellModel>::New(is); @@ -170,7 +170,7 @@ public: } - // Member functions + // Member Functions //- Return model name inline const word& name() const; @@ -193,12 +193,19 @@ public: //- Return a raw list of model faces inline const faceList& modelFaces() const; - //- Return list of edges + //- Return list of cell edges inline edgeList edges(const labelUList& pointLabels) const; - //- Return list of faces + //- Return list of cell faces inline faceList faces(const labelUList& pointLabels) const; + //- Return the cell face for specified model face + inline Foam::face face + ( + const label modelFacei, + const labelUList& pointLabels + ) const; + //- Vector centroid vector centre @@ -221,7 +228,7 @@ public: return *this; } - //- WriteData member function required by regIOobject + //- The writeData member function required by regIOobject bool writeData(Ostream& os) const { os << *this; @@ -229,20 +236,19 @@ public: } - // Ostream operator - - friend Ostream& operator<<(Ostream& os, const cellModel& cm); + // Ostream Operator + friend Ostream& operator<<(Ostream& os, const cellModel& cm); }; -// Ostream operators +// Ostream Operators template<> Ostream& operator<<(Ostream& os, const InfoProxy<cellModel>& ip); -// Global operators +// Global Operators //- Equality: true when model pointers are identical inline bool operator==(const cellModel& lhs, const cellModel& rhs); diff --git a/src/OpenFOAM/meshes/meshShapes/cellModel/cellModelI.H b/src/OpenFOAM/meshes/meshShapes/cellModel/cellModelI.H index 15281c736fcf49f7f98cfc20cf5d4614adb7bff2..cc5ba490721ee2b8239a185e361121e7ce1625a8 100644 --- a/src/OpenFOAM/meshes/meshShapes/cellModel/cellModelI.H +++ b/src/OpenFOAM/meshes/meshShapes/cellModel/cellModelI.H @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -69,55 +70,53 @@ inline const Foam::faceList& Foam::cellModel::modelFaces() const } -// Return the faces of a cellModel by untangling the geometry -// supplied in terms of the face labels inline Foam::edgeList Foam::cellModel::edges ( const labelUList& pointLabels ) const { - edgeList e(edges_.size()); + edgeList theEdges(edges_.size()); - // Translate model labels into global labels forAll(edges_, edgei) { - e[edgei] = - edge - ( - pointLabels[edges_[edgei].start()], - pointLabels[edges_[edgei].end()] - ); + // From model labels to global labels + theEdges[edgei] = + edge + ( + pointLabels[edges_[edgei].first()], + pointLabels[edges_[edgei].second()] + ); } - return e; + return theEdges; } -// Return the faces of a cellModel by untangling the geometry -// supplied in terms of the face labels inline Foam::faceList Foam::cellModel::faces ( const labelUList& pointLabels ) const { - faceList f(faces_.size()); + faceList theFaces(faces_.size()); - // Translate model labels into global labels forAll(faces_, facei) { - const labelList& curModelLabels = faces_[facei]; - - face& curFace = f[facei]; + // From model labels to global labels + theFaces[facei] = Foam::face(pointLabels, faces_[facei]); + } - curFace.setSize(curModelLabels.size()); + return theFaces; +} - forAll(curModelLabels, labeli) - { - curFace[labeli] = pointLabels[curModelLabels[labeli]]; - } - } - return f; +inline Foam::face Foam::cellModel::face +( + const label modelFacei, + const labelUList& pointLabels +) const +{ + // From model labels to global labels + return Foam::face(pointLabels, faces_[modelFacei]); } diff --git a/src/OpenFOAM/meshes/meshShapes/cellModel/cellModelIO.C b/src/OpenFOAM/meshes/meshShapes/cellModel/cellModelIO.C index bb62246078305d6c3ad085699bb14b4e0626ddf3..464b12ce35295f522d100e677bb232f5e1ff7a8b 100644 --- a/src/OpenFOAM/meshes/meshShapes/cellModel/cellModelIO.C +++ b/src/OpenFOAM/meshes/meshShapes/cellModel/cellModelIO.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2015 OpenFOAM Foundation + Copyright (C) 2018 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. diff --git a/src/OpenFOAM/meshes/meshShapes/cellModel/cellModeller.H b/src/OpenFOAM/meshes/meshShapes/cellModel/cellModeller.H index c73b17108376347f370f5fdcc1f8c3048c0a5095..b5eb5c84c80e658922b4d93dbbb5fde349561ebc 100644 --- a/src/OpenFOAM/meshes/meshShapes/cellModel/cellModeller.H +++ b/src/OpenFOAM/meshes/meshShapes/cellModel/cellModeller.H @@ -5,11 +5,10 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2017 OpenCFD Ltd. + Copyright (C) 2017-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License - This file is part of OpenFOAM, licensed under GNU General Public License - <http://www.gnu.org/licenses/>. + This file is part of OpenFOAM, distributed under GPL-3.0-or-later. Namespace Foam::cellModeller @@ -20,6 +19,7 @@ Description Superseded (NOV-2017) by cellModel methods. \*---------------------------------------------------------------------------*/ + #ifndef cellModeller_H #define cellModeller_H @@ -34,14 +34,16 @@ namespace cellModeller //- Deprecated(2017-11) equivalent to cellModel::ptr static method. // \deprecated(2017-11) use cellModel::ptr instead - inline const cellModel* lookup(const word& modelName) + FOAM_DEPRECATED_FOR(2017-11, "cellModel::ptr() static method") + const cellModel* lookup(const word& modelName) { return cellModel::ptr(modelName); } //- Deprecated(2017-11) equivalent to cellModel::ptr static method. // \deprecated(2017-11) use cellModel::ptr instead - inline const cellModel* lookup(const label modelIndex) + FOAM_DEPRECATED_FOR(2017-11, "cellModel::ptr() static method") + const cellModel* lookup(const label modelIndex) { return cellModel::ptr(modelIndex); } diff --git a/src/OpenFOAM/meshes/meshShapes/cellShape/cellShape.H b/src/OpenFOAM/meshes/meshShapes/cellShape/cellShape.H index fe674a3274ecdc38548163669cf77460e3005713..29c59981f72563e53f307bcc55748d83e7314d26 100644 --- a/src/OpenFOAM/meshes/meshShapes/cellShape/cellShape.H +++ b/src/OpenFOAM/meshes/meshShapes/cellShape/cellShape.H @@ -54,11 +54,8 @@ SourceFiles namespace Foam { -// Forward declaration of classes +// Forward Declarations class cell; - -// Forward declaration of friend functions and operators - class cellShape; bool operator==(const cellShape& a, const cellShape& b); Istream& operator>>(Istream& is, cellShape& s); @@ -73,7 +70,7 @@ class cellShape : public labelList { - // Private data + // Private Data //- Access to the cellShape's model const cellModel *m; @@ -83,10 +80,10 @@ public: // Constructors - //- Construct null - inline cellShape(); + //- Default construct + inline constexpr cellShape() noexcept; - //- Construct from components + //- Copy construct from components inline cellShape ( const cellModel& model, @@ -94,7 +91,7 @@ public: const bool doCollapse = false ); - //- Construct from components + //- Move construct from components inline cellShape ( const cellModel& model, @@ -102,7 +99,7 @@ public: const bool doCollapse = false ); - //- Construct from components + //- Copy construct from components inline cellShape ( const word& modelName, diff --git a/src/OpenFOAM/meshes/meshShapes/cellShape/cellShapeEqual.C b/src/OpenFOAM/meshes/meshShapes/cellShape/cellShapeEqual.C index 8fd430f6706c3b8f640b3f65baeb8578a21a8eee..9c9c021436d1c035cc0e5e6cf1b7e8d1db78e8cb 100644 --- a/src/OpenFOAM/meshes/meshShapes/cellShape/cellShapeEqual.C +++ b/src/OpenFOAM/meshes/meshShapes/cellShape/cellShapeEqual.C @@ -23,9 +23,6 @@ License You should have received a copy of the GNU General Public License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. -Description - Equality operator for cellShape class - \*---------------------------------------------------------------------------*/ #include "cellShape.H" diff --git a/src/OpenFOAM/meshes/meshShapes/cellShape/cellShapeI.H b/src/OpenFOAM/meshes/meshShapes/cellShape/cellShapeI.H index 30ca288e8ffa7e2a687a33765200ba5c300aba53..3f8273c6a243fb664ca2ceb764bd0334127a475f 100644 --- a/src/OpenFOAM/meshes/meshShapes/cellShape/cellShapeI.H +++ b/src/OpenFOAM/meshes/meshShapes/cellShape/cellShapeI.H @@ -31,8 +31,9 @@ License // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -inline Foam::cellShape::cellShape() +inline constexpr Foam::cellShape::cellShape() noexcept : + labelList(), m(nullptr) {} diff --git a/src/OpenFOAM/meshes/meshShapes/cellShape/cellShapeIO.C b/src/OpenFOAM/meshes/meshShapes/cellShape/cellShapeIO.C index ffc6abb872b4c3eea98b5fd85e7636dcf54a01b5..d9d92114f88004d528a3d47946014f663042c0e5 100644 --- a/src/OpenFOAM/meshes/meshShapes/cellShape/cellShapeIO.C +++ b/src/OpenFOAM/meshes/meshShapes/cellShape/cellShapeIO.C @@ -72,7 +72,7 @@ Foam::Istream& Foam::operator>>(Istream& is, cellShape& s) } // Check that a model was found - if (!s.m) + if (s.m == nullptr) { FatalIOErrorInFunction(is) << "CellShape has unknown model " << t.info() diff --git a/src/OpenFOAM/meshes/meshShapes/edge/edge.H b/src/OpenFOAM/meshes/meshShapes/edge/edge.H index 4c824e771fbda85ca606875728ec5dc5d0b64a5f..720788b992e771dd63686c52ec2ac22bd0d42f5d 100644 --- a/src/OpenFOAM/meshes/meshShapes/edge/edge.H +++ b/src/OpenFOAM/meshes/meshShapes/edge/edge.H @@ -74,16 +74,16 @@ public: // Constructors - //- Construct null with invalid point labels (-1) + //- Default construct, with invalid point labels (-1) inline edge(); //- Construct from two point labels inline edge(const label from, const label to); - //- Construct from pair of labels + //- Construct from pair of point labels inline edge(const labelPair& pair); - //- Construct from list + //- Construct from list of point labels inline edge(const FixedList<label, 2>& list); //- Construct from two point labels, sorted with first less-than second @@ -92,7 +92,7 @@ public: //- Construct from list, sorted with first less-than second inline edge(const FixedList<label, 2>& list, const bool doSort); - //- Copy construct from a subset of the input + //- Copy construct from a subset of point labels inline edge ( const UList<label>& list, diff --git a/src/OpenFOAM/meshes/meshShapes/face/face.H b/src/OpenFOAM/meshes/meshShapes/face/face.H index d1556e935de48624226a8b4221f3e8c481d92318..668d7781ce13478b9d3ead21f255824f881a129e 100644 --- a/src/OpenFOAM/meshes/meshShapes/face/face.H +++ b/src/OpenFOAM/meshes/meshShapes/face/face.H @@ -42,6 +42,7 @@ SourceFiles faceTemplates.C \*---------------------------------------------------------------------------*/ + #ifndef face_H #define face_H @@ -63,7 +64,6 @@ namespace Foam // Forward Declarations class face; class triFace; - template<class T, int SizeMin> class DynamicList; /*---------------------------------------------------------------------------*\ @@ -136,6 +136,7 @@ public: EDGE // Close to edge }; + // Static Data Members static const char* const typeName; @@ -144,23 +145,30 @@ public: // Constructors //- Default construct - face() = default; + constexpr face() noexcept = default; //- Construct given size, with invalid point labels (-1) inline explicit face(const label sz); - //- Copy construct from list of labels + //- Copy construct from list of point labels inline explicit face(const labelUList& list); - //- Copy construct from list of labels + //- Move construct from list of point labels + inline explicit face(labelList&& list); + + //- Copy construct from an initializer list of point labels + inline explicit face(std::initializer_list<label> list); + + //- Copy construct from list of point labels template<unsigned N> inline explicit face(const FixedList<label, N>& list); - //- Copy construct from an initializer list of labels - inline explicit face(std::initializer_list<label> list); + //- Copy construct from subset of point labels + inline face(const labelUList& list, const labelUList& indices); - //- Move construct from list of labels - inline explicit face(labelList&& list); + //- Copy construct from subset of point labels + template<unsigned N> + inline face(const labelUList& list, const FixedList<label, N>& indices); //- Copy construct from triFace face(const triFace& f); @@ -214,6 +222,7 @@ public: // The starting points of the original and reverse face are identical. face reverseFace() const; + // Navigation through face vertices //- Return true if the point label is found in face. @@ -238,7 +247,7 @@ public: ) const; //- Return the inertia tensor, with optional reference - // point and density specification + //- point and density specification tensor inertia ( const UList<point>& p, @@ -247,7 +256,7 @@ public: ) const; //- Return potential intersection with face with a ray starting - // at p, direction n (does not need to be normalized) + //- at p, direction n (does not need to be normalized) // Does face-centre decomposition and returns triangle intersection // point closest to p. Face-centre is calculated from point average. // For a hit, the distance is signed. Positive number @@ -450,6 +459,7 @@ struct offsetOp<face> //- Deprecated(2017-04) find the longest edge on a face. //- Face point labels index into pts. // \deprecated(2017-04) use class method instead +FOAM_DEPRECATED_FOR(2017-04, "use face::longestEdge() method") label longestEdge(const face& f, const UList<point>& pts); diff --git a/src/OpenFOAM/meshes/meshShapes/face/faceI.H b/src/OpenFOAM/meshes/meshShapes/face/faceI.H index fa3f26a23ae039e21c2f64bf9e77a071bc8f1c0f..631d8cad45b42911823fdfe8ff059cc4191559f4 100644 --- a/src/OpenFOAM/meshes/meshShapes/face/faceI.H +++ b/src/OpenFOAM/meshes/meshShapes/face/faceI.H @@ -54,6 +54,18 @@ inline Foam::face::face(const labelUList& list) {} +inline Foam::face::face(labelList&& list) +: + labelList(std::move(list)) +{} + + +inline Foam::face::face(std::initializer_list<label> list) +: + labelList(list) +{} + + template<unsigned N> inline Foam::face::face(const FixedList<label, N>& list) : @@ -61,15 +73,20 @@ inline Foam::face::face(const FixedList<label, N>& list) {} -inline Foam::face::face(std::initializer_list<label> list) +inline Foam::face::face(const labelUList& list, const labelUList& indices) : - labelList(list) + labelList(list, indices) {} -inline Foam::face::face(labelList&& list) +template<unsigned N> +inline Foam::face::face +( + const labelUList& list, + const FixedList<label, N>& indices +) : - labelList(std::move(list)) + labelList(list, indices) {} diff --git a/src/OpenFOAM/meshes/meshShapes/labelledTri/labelledTri.H b/src/OpenFOAM/meshes/meshShapes/labelledTri/labelledTri.H index 85e0d50caba8bfe8541e7dc3afc6138941bbcb98..039ef49bddf26e7b3fc1b1778176418820d935ed 100644 --- a/src/OpenFOAM/meshes/meshShapes/labelledTri/labelledTri.H +++ b/src/OpenFOAM/meshes/meshShapes/labelledTri/labelledTri.H @@ -51,7 +51,6 @@ class labelledTri; Istream& operator>>(Istream&, labelledTri&); Ostream& operator<<(Ostream&, const labelledTri&); - /*---------------------------------------------------------------------------*\ Class labelledTri Declaration \*---------------------------------------------------------------------------*/ @@ -60,7 +59,7 @@ class labelledTri : public triFace { - // Private data + // Private Data label region_; @@ -75,7 +74,7 @@ public: // Constructors - //- Construct null with invalid point labels and region (-1). + //- Default construct, with invalid point labels and region (-1). inline labelledTri(); //- Construct from triFace and region label. diff --git a/src/OpenFOAM/meshes/meshShapes/tetCell/tetCell.H b/src/OpenFOAM/meshes/meshShapes/tetCell/tetCell.H index b364b42126a738bcfb9d78f977cc5f4c5c0e3f80..93a1f408af3dd7e165c3520f636179bc60d80f87 100644 --- a/src/OpenFOAM/meshes/meshShapes/tetCell/tetCell.H +++ b/src/OpenFOAM/meshes/meshShapes/tetCell/tetCell.H @@ -64,7 +64,6 @@ class tetCell : public FixedList<label, 4> { - public: // Constructors @@ -87,7 +86,7 @@ public: //- Construct from FixedList of four point labels inline tetCell(const FixedList<label, 4>& list); - //- Copy construct from a subset of the input list + //- Copy construct from a subset of point labels inline tetCell ( const labelUList& list, diff --git a/src/OpenFOAM/meshes/meshShapes/triFace/triFace.H b/src/OpenFOAM/meshes/meshShapes/triFace/triFace.H index 6bfd6bfedb82d8d842a2dfeb9cd4d23bca63ec71..af08fc4a48fb6babe8c61b044c078bb9ca0494b5 100644 --- a/src/OpenFOAM/meshes/meshShapes/triFace/triFace.H +++ b/src/OpenFOAM/meshes/meshShapes/triFace/triFace.H @@ -63,7 +63,6 @@ class triFace; inline bool operator==(const triFace& a, const triFace& b); inline bool operator!=(const triFace& a, const triFace& b); - /*---------------------------------------------------------------------------*\ Class triFace Declaration \*---------------------------------------------------------------------------*/ @@ -76,7 +75,7 @@ public: // Constructors - //- Construct null with invalid point labels (-1) + //- Default construct, with invalid point labels (-1) inline triFace(); //- Construct from three point labels @@ -93,7 +92,7 @@ public: //- Copy construct from a list of three point labels. inline explicit triFace(const labelUList& list); - //- Copy construct from a subset of the input + //- Copy construct from a subset of point labels inline triFace ( const labelUList& list, diff --git a/src/OpenFOAM/meshes/polyMesh/polyMeshCheck/polyMeshTools.H b/src/OpenFOAM/meshes/polyMesh/polyMeshCheck/polyMeshTools.H index 1e93bcb7ab8f12c2560213f45689e64dbd8db685..0624c07f9b2023af8cf3f7578246d7eea9fd1ec4 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyMeshCheck/polyMeshTools.H +++ b/src/OpenFOAM/meshes/polyMesh/polyMeshCheck/polyMeshTools.H @@ -34,6 +34,7 @@ SourceFiles polyMeshTools.C \*---------------------------------------------------------------------------*/ + #ifndef polyMeshTools_H #define polyMeshTools_H diff --git a/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCheck/primitiveMeshTools.H b/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCheck/primitiveMeshTools.H index 4b108798b39723bad14173bc677cbd60b07ade28..9803acac367998e5d4dac590f335bd2cd8a14b6a 100644 --- a/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCheck/primitiveMeshTools.H +++ b/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCheck/primitiveMeshTools.H @@ -34,6 +34,7 @@ SourceFiles primitiveMeshTools.C \*---------------------------------------------------------------------------*/ + #ifndef primitiveMeshTools_H #define primitiveMeshTools_H diff --git a/src/OpenFOAM/meshes/primitiveShapes/line/linePoint2DRef.H b/src/OpenFOAM/meshes/primitiveShapes/line/linePoint2DRef.H index 09490747d9cd054547927b083730ddcd143fdc07..5422df65c0cb6357c1f10f959ce6b0a3c1fb1443 100644 --- a/src/OpenFOAM/meshes/primitiveShapes/line/linePoint2DRef.H +++ b/src/OpenFOAM/meshes/primitiveShapes/line/linePoint2DRef.H @@ -27,6 +27,7 @@ Typedef Foam::linePoint2DRef Description + A line using referred 2D points \*---------------------------------------------------------------------------*/ diff --git a/src/OpenFOAM/meshes/primitiveShapes/line/linePointRef.H b/src/OpenFOAM/meshes/primitiveShapes/line/linePointRef.H index 9732da33ca58d591d9eea21edf7d9517ec4e6906..fa49276f9e99dce510cc0fd3f8eeaf1e9d320f0a 100644 --- a/src/OpenFOAM/meshes/primitiveShapes/line/linePointRef.H +++ b/src/OpenFOAM/meshes/primitiveShapes/line/linePointRef.H @@ -27,7 +27,7 @@ Typedef Foam::linePointRef Description - Line using referred points + A line using referred points \*---------------------------------------------------------------------------*/ diff --git a/src/OpenFOAM/meshes/primitiveShapes/pyramid/pyramid.H b/src/OpenFOAM/meshes/primitiveShapes/pyramid/pyramid.H index 13ad33b6b36cfd2d9bcfa49db8b3f72428c9cb2c..9f3ee46b412734d9fbba7e87a94f3c397fd09694 100644 --- a/src/OpenFOAM/meshes/primitiveShapes/pyramid/pyramid.H +++ b/src/OpenFOAM/meshes/primitiveShapes/pyramid/pyramid.H @@ -44,7 +44,7 @@ SourceFiles namespace Foam { -// Forward declaration of friend functions and operators +// Forward Declarations template<class Point, class PointRef, class polygonRef> class pyramid; @@ -71,9 +71,10 @@ inline Ostream& operator<< template<class Point, class PointRef, class polygonRef> class pyramid { - // Private data + // Private Data polygonRef base_; + PointRef apex_; @@ -88,7 +89,7 @@ public: inline pyramid(Istream& is); - // Member functions + // Member Functions // Access diff --git a/src/OpenFOAM/meshes/meshShapes/cell/pyramidPointFaceRef.H b/src/OpenFOAM/meshes/primitiveShapes/pyramid/pyramidPointFaceRef.H similarity index 97% rename from src/OpenFOAM/meshes/meshShapes/cell/pyramidPointFaceRef.H rename to src/OpenFOAM/meshes/primitiveShapes/pyramid/pyramidPointFaceRef.H index 6821928e8113777ec4c5efba6276836b538cfb15..638e4d511de374026df257cedd0d5e81f7f94bdc 100644 --- a/src/OpenFOAM/meshes/meshShapes/cell/pyramidPointFaceRef.H +++ b/src/OpenFOAM/meshes/primitiveShapes/pyramid/pyramidPointFaceRef.H @@ -27,6 +27,7 @@ Typedef Foam::pyramidPointFaceRef Description + A pyramid using referred points and faces \*---------------------------------------------------------------------------*/ diff --git a/src/OpenFOAM/meshes/primitiveShapes/tetrahedron/tetPointRef.H b/src/OpenFOAM/meshes/primitiveShapes/tetrahedron/tetPointRef.H index 9964126d6c5c6c7cbb099769e4b8dcfbd7a0b27e..d7405deea894462fd988122a91af2a1cb7cf643d 100644 --- a/src/OpenFOAM/meshes/primitiveShapes/tetrahedron/tetPointRef.H +++ b/src/OpenFOAM/meshes/primitiveShapes/tetrahedron/tetPointRef.H @@ -27,6 +27,7 @@ Typedef Foam::tetPointRef Description + A tetrahedron using referred points \*---------------------------------------------------------------------------*/ diff --git a/src/OpenFOAM/meshes/primitiveShapes/triangle/triPointRef.H b/src/OpenFOAM/meshes/primitiveShapes/triangle/triPointRef.H index 34cc95b13cb12850cb6317b3b74ed7a5f39584c8..5aba23926e19d6a5d70a1d0ec1995b44d13d681d 100644 --- a/src/OpenFOAM/meshes/primitiveShapes/triangle/triPointRef.H +++ b/src/OpenFOAM/meshes/primitiveShapes/triangle/triPointRef.H @@ -27,6 +27,7 @@ Typedef Foam::triPointRef Description + A triangle using referred points \*---------------------------------------------------------------------------*/ diff --git a/src/OpenFOAM/primitives/ranges/scalarRange/scalarRange.H b/src/OpenFOAM/primitives/ranges/scalarRange/scalarRange.H index 12b6ac4366d8dbdea452aed656acdced1b128813..2fbf85a209e3750ac7853ed27616315c0516c708 100644 --- a/src/OpenFOAM/primitives/ranges/scalarRange/scalarRange.H +++ b/src/OpenFOAM/primitives/ranges/scalarRange/scalarRange.H @@ -43,6 +43,7 @@ SourceFiles scalarRange.C \*---------------------------------------------------------------------------*/ + #ifndef scalarRange_H #define scalarRange_H diff --git a/src/OpenFOAM/primitives/strings/parsing/parsing.H b/src/OpenFOAM/primitives/strings/parsing/parsing.H index 8ef439b756fc004b5d4f50c122d315ff672e2036..68720a3ca95cd0d00ce02c2eac54c5afc5a91e31 100644 --- a/src/OpenFOAM/primitives/strings/parsing/parsing.H +++ b/src/OpenFOAM/primitives/strings/parsing/parsing.H @@ -35,6 +35,7 @@ SourceFiles parsingI.H \*---------------------------------------------------------------------------*/ + #ifndef parsing_H #define parsing_H diff --git a/src/OpenFOAM/primitives/strings/wordRes/wordReListMatcher.H b/src/OpenFOAM/primitives/strings/wordRes/wordReListMatcher.H index 4da4654d1ea0857af9713c0ec8b2bbe6b815a109..6b1ec81af23e980cb42626b43637d36bb6ea6c9a 100644 --- a/src/OpenFOAM/primitives/strings/wordRes/wordReListMatcher.H +++ b/src/OpenFOAM/primitives/strings/wordRes/wordReListMatcher.H @@ -8,8 +8,7 @@ Copyright (C) 2017 OpenCFD Ltd. ------------------------------------------------------------------------------- License - This file is part of OpenFOAM, licensed under GNU General Public License - <http://www.gnu.org/licenses/>. + This file is part of OpenFOAM, distributed under GPL-3.0-or-later. Typedef Foam::wordReListMatcher diff --git a/src/conversion/ccm/common/ccmInternal.H b/src/conversion/ccm/common/ccmInternal.H index 302f5c28dfae54ec8ca3f4ed8e26e4b3c69fb4c3..27d43ec83ac54ac477b1c089d8f976363e61603f 100644 --- a/src/conversion/ccm/common/ccmInternal.H +++ b/src/conversion/ccm/common/ccmInternal.H @@ -27,6 +27,7 @@ Description Internal bits for wrapping libccmio - do not use directly \*---------------------------------------------------------------------------*/ + #ifndef ccmInternal_H #define ccmInternal_H diff --git a/src/conversion/ccm/reader/ccmBoundaryInfo.H b/src/conversion/ccm/reader/ccmBoundaryInfo.H index fd500413d5b626db77b30ac6e7c3485305bccc5e..5879ade6c209c7b249790edc88236a06ce16b281 100644 --- a/src/conversion/ccm/reader/ccmBoundaryInfo.H +++ b/src/conversion/ccm/reader/ccmBoundaryInfo.H @@ -27,6 +27,7 @@ Description Container for holding STARCCM boundary information \*---------------------------------------------------------------------------*/ + #ifndef ccmBoundaryInfo_H #define ccmBoundaryInfo_H diff --git a/src/conversion/ccm/reader/ccmInterfaceDefinitions.H b/src/conversion/ccm/reader/ccmInterfaceDefinitions.H index 67f9d79f1e642ebcd4b610163e7b89062661a300..fbd87b659ffda0b960647d5cacd5852089307bf1 100644 --- a/src/conversion/ccm/reader/ccmInterfaceDefinitions.H +++ b/src/conversion/ccm/reader/ccmInterfaceDefinitions.H @@ -27,6 +27,7 @@ Description Containers for holding STARCCM interface definitions \*---------------------------------------------------------------------------*/ + #ifndef ccmInterfaceDefinitions_H #define ccmInterfaceDefinitions_H diff --git a/src/conversion/ccm/reader/ccmSolutionTable.H b/src/conversion/ccm/reader/ccmSolutionTable.H index f9343380c056b02cd582da77d048bf67ee423fae..744015468625df84188f3bf3c3a851b60c12679f 100644 --- a/src/conversion/ccm/reader/ccmSolutionTable.H +++ b/src/conversion/ccm/reader/ccmSolutionTable.H @@ -27,6 +27,7 @@ Description Containers for holding ccm solution and field listings. \*---------------------------------------------------------------------------*/ + #ifndef ccmSolutionTable_H #define ccmSolutionTable_H diff --git a/src/conversion/ccm/writer/ccmWriter.H b/src/conversion/ccm/writer/ccmWriter.H index a5e06f9542a59996d0c1567787d4771cdb3ce1b2..2a2127da4fb423352a7726de46abe1c447f8ebd3 100644 --- a/src/conversion/ccm/writer/ccmWriter.H +++ b/src/conversion/ccm/writer/ccmWriter.H @@ -87,6 +87,7 @@ SourceFiles ccmWriterSolution.C \*---------------------------------------------------------------------------*/ + #ifndef ccmWriter_H #define ccmWriter_H diff --git a/src/dynamicMesh/fvMeshSubsetProxy/meshSubsetHelper.H b/src/dynamicMesh/fvMeshSubsetProxy/meshSubsetHelper.H index 7f8234fd9ff9ed17e2452417f48663e9dbe06b61..6cd1352633baa230994bc4bf678f48f04abd8cf3 100644 --- a/src/dynamicMesh/fvMeshSubsetProxy/meshSubsetHelper.H +++ b/src/dynamicMesh/fvMeshSubsetProxy/meshSubsetHelper.H @@ -8,14 +8,13 @@ Copyright (C) 2018 OpenCFD Ltd. ------------------------------------------------------------------------------- License - This file is part of OpenFOAM, licensed under GNU General Public License - <http://www.gnu.org/licenses/>. + This file is part of OpenFOAM, distributed under GPL-3.0-or-later. Typedef Foam::meshSubsetHelper Description - Compatibility name. Rename (JUL-2018) as Foam::fvMeshSubsetProxy + Compatibility name. Renamed (JUL-2018) as Foam::fvMeshSubsetProxy \*---------------------------------------------------------------------------*/ diff --git a/src/meshTools/coordinate/systems/coordinateSystems.H b/src/meshTools/coordinate/systems/coordinateSystems.H index 56c9611b5ad64a3f7320d27e6f83655f9f82ecb8..5fe6669a94b3cef31e1d43b320406e88ff44a3ed 100644 --- a/src/meshTools/coordinate/systems/coordinateSystems.H +++ b/src/meshTools/coordinate/systems/coordinateSystems.H @@ -58,6 +58,7 @@ SourceFiles coordinateSystems.C \*---------------------------------------------------------------------------*/ + #ifndef coordinateSystems_H #define coordinateSystems_H