diff --git a/applications/test/barycentric/Make/files b/applications/test/barycentric/Make/files new file mode 100644 index 0000000000..a4628d5cd4 --- /dev/null +++ b/applications/test/barycentric/Make/files @@ -0,0 +1,3 @@ +Test-barycentric.C + +EXE = $(FOAM_USER_APPBIN)/Test-barycentric diff --git a/applications/test/barycentric/Make/options b/applications/test/barycentric/Make/options new file mode 100644 index 0000000000..18e6fe47af --- /dev/null +++ b/applications/test/barycentric/Make/options @@ -0,0 +1,2 @@ +/* EXE_INC = */ +/* EXE_LIBS = */ diff --git a/applications/test/barycentric/Test-barycentric.C b/applications/test/barycentric/Test-barycentric.C new file mode 100644 index 0000000000..2fbb060a49 --- /dev/null +++ b/applications/test/barycentric/Test-barycentric.C @@ -0,0 +1,93 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | www.openfoam.com + \\/ M anipulation | +------------------------------------------------------------------------------- + Copyright (C) 2022 OpenCFD Ltd. +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +Application + Test-barycentric + +Description + Some simple tests for barycentric coordinates and transforms + +\*---------------------------------------------------------------------------*/ + +#include "barycentricTensor.H" +#include "tetrahedron.H" +#include "vectorField.H" +#include "IOstreams.H" + +using namespace Foam; + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +// Main program: + +int main(int argc, char *argv[]) +{ + // Tets to test + tetPoints tetA + ( + point(0, 0, 0), + point(1, 0, 0), + point(1, 1, 0), + point(1, 1, 1) + ); + + const barycentricTensor baryT(tetA[0], tetA[1], tetA[2], tetA[3]); + + Info<< nl << "Tet: " << tetA << nl; + Info<< "tens:" << baryT << nl; + + for + ( + const barycentric& bary : + List + ({ + {0.25, 0.25, 0.25, 0.25}, + {1, 0, 0, 0}, + {0, 1, 0, 0}, + {0, 0, 1, 0}, + {0, 0, 0, 1}, + {0, 0, 0, 0} // Not really valid + }) + ) + { + vector v(tetA.tet().barycentricToPoint(bary)); + barycentric b(tetA.tet().pointToBarycentric(v)); + + Info<< nl + << "bary: " << bary << nl + << "vec: " << v << nl + // << "Vec: " << baryT.inner(bary) << nl + << "Vec: " << (baryT & bary) << nl + << "bary: " << b << nl + // This won't work (needs a differently defined tensor) + // << "Bary: " << (v & baryT) << nl + ; + } + + Info<< "\nEnd\n" << nl; + + return 0; +} + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/applications/test/momentOfInertia/Test-momentOfInertia.C b/applications/test/momentOfInertia/Test-momentOfInertia.C index 6af16dbec9..0d5e82286a 100644 --- a/applications/test/momentOfInertia/Test-momentOfInertia.C +++ b/applications/test/momentOfInertia/Test-momentOfInertia.C @@ -38,7 +38,7 @@ Description #include "polyMesh.H" #include "ListOps.H" #include "face.H" -#include "tetPointRef.H" +#include "tetrahedron.H" #include "triFaceList.H" #include "OFstream.H" #include "meshTools.H" diff --git a/applications/test/tetTetOverlap/Test-tetTetOverlap.C b/applications/test/tetTetOverlap/Test-tetTetOverlap.C index 8e770b8a81..0bd390db1d 100644 --- a/applications/test/tetTetOverlap/Test-tetTetOverlap.C +++ b/applications/test/tetTetOverlap/Test-tetTetOverlap.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2012-2017 OpenFOAM Foundation + Copyright (C) 2022 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -31,7 +32,7 @@ Description \*---------------------------------------------------------------------------*/ -#include "tetPointRef.H" +#include "tetrahedron.H" #include "OFstream.H" #include "meshTools.H" #include "cut.H" @@ -44,12 +45,12 @@ void writeOBJ ( Ostream& os, label& vertI, - const FixedList& tet + const tetPoints& tet ) { - forAll(tet, fp) + for (const point& p : tet) { - meshTools::writeOBJ(os, tet[fp]); + meshTools::writeOBJ(os, p); } os << "l " << vertI+1 << ' ' << vertI+2 << nl << "l " << vertI+1 << ' ' << vertI+3 << nl @@ -61,33 +62,27 @@ void writeOBJ } -tetPointRef makeTetPointRef(const FixedList& p) -{ - return tetPointRef(p[0], p[1], p[2], p[3]); -} - - int main(int argc, char *argv[]) { // Tets to test - FixedList tetA - ({ + tetPoints tetA + ( point(0, 0, 0), point(1, 0, 0), point(1, 1, 0), point(1, 1, 1) - }); - FixedList tetB - ({ + ); + tetPoints tetB + ( point(0.1, 0.1, 0.1), point(1.1, 0.1, 0.1), point(1.1, 1.1, 0.1), point(1.1, 1.1, 1.1) - }); + ); // Do intersection - typedef DynamicList> tetList; + typedef DynamicList tetList; tetList tetsIn1, tetsIn2, tetsOut; cut::appendOp tetOpIn1(tetsIn1); cut::appendOp tetOpIn2(tetsIn2); @@ -155,25 +150,25 @@ int main(int argc, char *argv[]) // Check the volumes - Info<< "Vol A: " << makeTetPointRef(tetA).mag() << endl; + Info<< "Vol A: " << tetA.tet().mag() << endl; scalar volIn = 0; - forAll(tetsIn, i) + for (const auto& t : tetsIn) { - volIn += makeTetPointRef(tetsIn[i]).mag(); + volIn += t.tet().mag(); } Info<< "Vol A inside B: " << volIn << endl; scalar volOut = 0; - forAll(tetsOut, i) + for (const auto& t : tetsOut) { - volOut += makeTetPointRef(tetsOut[i]).mag(); + volOut += t.tet().mag(); } Info<< "Vol A outside B: " << volOut << endl; Info<< "Sum inside and outside: " << volIn + volOut << endl; - if (mag(volIn + volOut - makeTetPointRef(tetA).mag()) > SMALL) + if (mag(volIn + volOut - tetA.tet().mag()) > SMALL) { FatalErrorInFunction << "Tet volumes do not sum up to input tet." diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellShapeControl/cellShapeControlMesh/cellShapeControlMesh.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellShapeControl/cellShapeControlMesh/cellShapeControlMesh.C index f1c8d5018c..0277cbfa59 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellShapeControl/cellShapeControlMesh/cellShapeControlMesh.C +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellShapeControl/cellShapeControlMesh/cellShapeControlMesh.C @@ -31,7 +31,7 @@ License #include "pointIOField.H" #include "scalarIOField.H" #include "triadIOField.H" -#include "tetPointRef.H" +#include "tetrahedron.H" #include "plane.H" #include "transform.H" #include "meshTools.H" diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellShapeControl/cellSizeAndAlignmentControl/fileControl/fileControl.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellShapeControl/cellSizeAndAlignmentControl/fileControl/fileControl.C index 9943738775..93381d0b3e 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellShapeControl/cellSizeAndAlignmentControl/fileControl/fileControl.C +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellShapeControl/cellSizeAndAlignmentControl/fileControl/fileControl.C @@ -27,7 +27,6 @@ License #include "fileControl.H" #include "addToRunTimeSelectionTable.H" -#include "tetPointRef.H" #include "scalarList.H" #include "vectorTools.H" #include "pointIOField.H" @@ -50,9 +49,6 @@ addToRunTimeSelectionTable } -// * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * // - - // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // Foam::fileControl::fileControl diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellShapeControl/cellSizeAndAlignmentControl/searchableSurfaceControl/searchableSurfaceControl.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellShapeControl/cellSizeAndAlignmentControl/searchableSurfaceControl/searchableSurfaceControl.C index 16edb18b5c..d6c20276f8 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellShapeControl/cellSizeAndAlignmentControl/searchableSurfaceControl/searchableSurfaceControl.C +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellShapeControl/cellSizeAndAlignmentControl/searchableSurfaceControl/searchableSurfaceControl.C @@ -31,7 +31,6 @@ License #include "cellSizeFunction.H" #include "triSurfaceMesh.H" #include "searchableBox.H" -#include "tetPointRef.H" #include "vectorTools.H" #include "quaternion.H" diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedCell/indexedCellChecks.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedCell/indexedCellChecks.C index 8659e13a2e..b22855935c 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedCell/indexedCellChecks.C +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedCell/indexedCellChecks.C @@ -26,7 +26,7 @@ License \*---------------------------------------------------------------------------*/ #include "plane.H" -#include "tetPointRef.H" +#include "tetrahedron.H" #include "pointConversion.H" #include "CGALTriangulation3DKernel.H" diff --git a/applications/utilities/mesh/manipulation/checkMesh/writeFields.C b/applications/utilities/mesh/manipulation/checkMesh/writeFields.C index 7f1f0f3f37..94dccc6712 100644 --- a/applications/utilities/mesh/manipulation/checkMesh/writeFields.C +++ b/applications/utilities/mesh/manipulation/checkMesh/writeFields.C @@ -4,7 +4,7 @@ #include "polyMeshTools.H" #include "zeroGradientFvPatchFields.H" #include "syncTools.H" -#include "tetPointRef.H" +#include "tetrahedron.H" #include "regionSplit.H" #include "wallDist.H" #include "cellAspectRatio.H" diff --git a/src/OpenFOAM/algorithms/dynamicIndexedOctree/dynamicIndexedOctree.C b/src/OpenFOAM/algorithms/dynamicIndexedOctree/dynamicIndexedOctree.C index d9fc921789..2998a768db 100644 --- a/src/OpenFOAM/algorithms/dynamicIndexedOctree/dynamicIndexedOctree.C +++ b/src/OpenFOAM/algorithms/dynamicIndexedOctree/dynamicIndexedOctree.C @@ -27,7 +27,7 @@ License \*---------------------------------------------------------------------------*/ #include "dynamicIndexedOctree.H" -#include "linePointRef.H" +#include "line.H" #include "OFstream.H" #include "ListOps.H" diff --git a/src/OpenFOAM/algorithms/dynamicIndexedOctree/dynamicIndexedOctree.H b/src/OpenFOAM/algorithms/dynamicIndexedOctree/dynamicIndexedOctree.H index 92e38b62cd..e0277fd2b6 100644 --- a/src/OpenFOAM/algorithms/dynamicIndexedOctree/dynamicIndexedOctree.H +++ b/src/OpenFOAM/algorithms/dynamicIndexedOctree/dynamicIndexedOctree.H @@ -35,8 +35,8 @@ SourceFiles \*---------------------------------------------------------------------------*/ -#ifndef dynamicIndexedOctree_H -#define dynamicIndexedOctree_H +#ifndef Foam_dynamicIndexedOctree_H +#define Foam_dynamicIndexedOctree_H #include "treeBoundBox.H" #include "pointIndexHit.H" @@ -54,7 +54,7 @@ namespace Foam typedef DynamicList>> contentListList; -// Forward declaration of classes +// Forward Declarations template class dynamicIndexedOctree; template Ostream& operator<< diff --git a/src/OpenFOAM/algorithms/dynamicIndexedOctree/dynamicTreeDataPoint.H b/src/OpenFOAM/algorithms/dynamicIndexedOctree/dynamicTreeDataPoint.H index 58c797db3d..673f9e14e4 100644 --- a/src/OpenFOAM/algorithms/dynamicIndexedOctree/dynamicTreeDataPoint.H +++ b/src/OpenFOAM/algorithms/dynamicIndexedOctree/dynamicTreeDataPoint.H @@ -39,12 +39,12 @@ SourceFiles \*---------------------------------------------------------------------------*/ -#ifndef dynamicTreeDataPoint_H -#define dynamicTreeDataPoint_H +#ifndef Foam_dynamicTreeDataPoint_H +#define Foam_dynamicTreeDataPoint_H #include "pointField.H" #include "treeBoundBox.H" -#include "linePointRef.H" +#include "line.H" #include "volumeType.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -52,7 +52,7 @@ SourceFiles namespace Foam { -// Forward declaration of classes +// Forward Declarations template class dynamicIndexedOctree; /*---------------------------------------------------------------------------*\ diff --git a/src/OpenFOAM/algorithms/indexedOctree/indexedOctree.C b/src/OpenFOAM/algorithms/indexedOctree/indexedOctree.C index 0111a703a2..a9c99e965d 100644 --- a/src/OpenFOAM/algorithms/indexedOctree/indexedOctree.C +++ b/src/OpenFOAM/algorithms/indexedOctree/indexedOctree.C @@ -27,7 +27,7 @@ License \*---------------------------------------------------------------------------*/ #include "indexedOctree.H" -#include "linePointRef.H" +#include "line.H" #include "OFstream.H" #include "ListOps.H" #include "memInfo.H" diff --git a/src/OpenFOAM/algorithms/indexedOctree/indexedOctree.H b/src/OpenFOAM/algorithms/indexedOctree/indexedOctree.H index 05647aa887..13bf6956b2 100644 --- a/src/OpenFOAM/algorithms/indexedOctree/indexedOctree.H +++ b/src/OpenFOAM/algorithms/indexedOctree/indexedOctree.H @@ -34,8 +34,8 @@ SourceFiles \*---------------------------------------------------------------------------*/ -#ifndef indexedOctree_H -#define indexedOctree_H +#ifndef Foam_indexedOctree_H +#define Foam_indexedOctree_H #include "treeBoundBox.H" #include "pointIndexHit.H" @@ -51,7 +51,7 @@ SourceFiles namespace Foam { -// Forward declaration of classes +// Forward Declarations template class indexedOctree; template Ostream& operator<<(Ostream&, const indexedOctree&); class Istream; diff --git a/src/OpenFOAM/meshes/meshShapes/cell/cell.C b/src/OpenFOAM/meshes/meshShapes/cell/cell.C index 293537c85e..2ec1846256 100644 --- a/src/OpenFOAM/meshes/meshShapes/cell/cell.C +++ b/src/OpenFOAM/meshes/meshShapes/cell/cell.C @@ -27,7 +27,7 @@ License \*---------------------------------------------------------------------------*/ #include "cell.H" -#include "pyramidPointFaceRef.H" +#include "pyramid.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // diff --git a/src/OpenFOAM/meshes/meshShapes/cellModel/cellModel.C b/src/OpenFOAM/meshes/meshShapes/cellModel/cellModel.C index 926b07abde..da60911c43 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 "pyramidPointFaceRef.H" +#include "pyramid.H" // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // diff --git a/src/OpenFOAM/meshes/meshShapes/edge/edge.H b/src/OpenFOAM/meshes/meshShapes/edge/edge.H index e029daf60d..a30a723593 100644 --- a/src/OpenFOAM/meshes/meshShapes/edge/edge.H +++ b/src/OpenFOAM/meshes/meshShapes/edge/edge.H @@ -45,11 +45,11 @@ SourceFiles \*---------------------------------------------------------------------------*/ -#ifndef edge_H -#define edge_H +#ifndef Foam_edge_H +#define Foam_edge_H #include "labelPair.H" -#include "linePointRef.H" +#include "line.H" #include "pointField.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/OpenFOAM/meshes/meshShapes/face/face.C b/src/OpenFOAM/meshes/meshShapes/face/face.C index 0b47dc7000..3a96a556e7 100644 --- a/src/OpenFOAM/meshes/meshShapes/face/face.C +++ b/src/OpenFOAM/meshes/meshShapes/face/face.C @@ -28,7 +28,7 @@ License #include "face.H" #include "triFace.H" -#include "triPointRef.H" +#include "triangle.H" #include "mathematicalConstants.H" #include "Circulator.H" #include diff --git a/src/OpenFOAM/meshes/meshShapes/face/face.H b/src/OpenFOAM/meshes/meshShapes/face/face.H index a3a4776370..1e64cd1881 100644 --- a/src/OpenFOAM/meshes/meshShapes/face/face.H +++ b/src/OpenFOAM/meshes/meshShapes/face/face.H @@ -43,8 +43,8 @@ SourceFiles \*---------------------------------------------------------------------------*/ -#ifndef face_H -#define face_H +#ifndef Foam_face_H +#define Foam_face_H #include "pointField.H" #include "labelList.H" @@ -435,6 +435,12 @@ public: static bool sameVertices(const face& a, const face& b); + // Member Operators + + //- Increment (offset) vertices by given amount + inline void operator+=(const label vertexOffset); + + // Hashing //- The symmetric hash value for face. @@ -494,19 +500,11 @@ template<> struct Hash : face::hasher {}; template<> struct offsetOp { - inline face operator() - ( - const face& x, - const label offset - ) const + face operator()(const face& x, const label offset) const { - face result(x.size()); - - forAll(x, i) - { - result[i] = x[i] + offset; - } - return result; + face f(x); + f += offset; + return f; } }; diff --git a/src/OpenFOAM/meshes/meshShapes/face/faceI.H b/src/OpenFOAM/meshes/meshShapes/face/faceI.H index cf500465e3..f9379903c2 100644 --- a/src/OpenFOAM/meshes/meshShapes/face/faceI.H +++ b/src/OpenFOAM/meshes/meshShapes/face/faceI.H @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011 OpenFOAM Foundation - Copyright (C) 2017-2021 OpenCFD Ltd. + Copyright (C) 2017-2022 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -190,6 +190,20 @@ inline Foam::label Foam::face::nTriangles() const } +// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // + +inline void Foam::face::operator+=(const label vertexOffset) +{ + if (vertexOffset) + { + for (label& vrt : static_cast(*this)) + { + vrt += vertexOffset; + } + } +} + + // * * * * * * * * * * * * * * * Global Operators * * * * * * * * * * * * * // inline bool Foam::operator==(const face& a, const face& b) diff --git a/src/OpenFOAM/meshes/meshShapes/face/faceIntersection.C b/src/OpenFOAM/meshes/meshShapes/face/faceIntersection.C index d338e648e5..b5c00bd97b 100644 --- a/src/OpenFOAM/meshes/meshShapes/face/faceIntersection.C +++ b/src/OpenFOAM/meshes/meshShapes/face/faceIntersection.C @@ -27,7 +27,7 @@ License #include "face.H" #include "pointHit.H" -#include "triPointRef.H" +#include "triangle.H" #include "line.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/OpenFOAM/meshes/meshShapes/face/oppositeFace.H b/src/OpenFOAM/meshes/meshShapes/face/oppositeFace.H index 2907707382..7ed69b1e04 100644 --- a/src/OpenFOAM/meshes/meshShapes/face/oppositeFace.H +++ b/src/OpenFOAM/meshes/meshShapes/face/oppositeFace.H @@ -30,13 +30,10 @@ Description Class containing opposite face for a prismatic cell with addressing and a possibility of failure. -SourceFiles - oppositeFace.C - \*---------------------------------------------------------------------------*/ -#ifndef oppositeFace_H -#define oppositeFace_H +#ifndef Foam_oppositeFace_H +#define Foam_oppositeFace_H #include "face.H" @@ -53,7 +50,7 @@ class oppositeFace : public face { - // Private data + // Private Data //- Master face index const label masterIndex_; @@ -84,19 +81,19 @@ public: // Member Functions //- Master face index - inline label masterIndex() const + label masterIndex() const noexcept { return masterIndex_; } - //- Slave face index - inline label oppositeIndex() const + //- Opposite face index + label oppositeIndex() const noexcept { return oppositeIndex_; } //- Does the opposite face exist? - inline bool found() const + bool found() const noexcept { return oppositeIndex_ >= 0; } diff --git a/src/OpenFOAM/meshes/meshShapes/labelledTri/labelledTri.H b/src/OpenFOAM/meshes/meshShapes/labelledTri/labelledTri.H index 1295830239..967a876f23 100644 --- a/src/OpenFOAM/meshes/meshShapes/labelledTri/labelledTri.H +++ b/src/OpenFOAM/meshes/meshShapes/labelledTri/labelledTri.H @@ -35,8 +35,8 @@ SourceFiles \*---------------------------------------------------------------------------*/ -#ifndef labelledTri_H -#define labelledTri_H +#ifndef Foam_labelledTri_H +#define Foam_labelledTri_H #include "triFace.H" #include "ListListOps.H" @@ -91,9 +91,9 @@ public: //- and optional region index (0 if unspecified) inline labelledTri ( - const label a, - const label b, - const label c, + const label p0, + const label p1, + const label p2, const label region = 0 ); @@ -179,13 +179,9 @@ struct offsetOp { labelledTri operator()(const labelledTri& x, const label offset) const { - labelledTri result(x); - - forAll(x, xi) - { - result[xi] = x[xi] + offset; - } - return result; + labelledTri f(x); + f += offset; + return f; } }; diff --git a/src/OpenFOAM/meshes/meshShapes/labelledTri/labelledTriI.H b/src/OpenFOAM/meshes/meshShapes/labelledTri/labelledTriI.H index 84f1671176..8151b6d261 100644 --- a/src/OpenFOAM/meshes/meshShapes/labelledTri/labelledTriI.H +++ b/src/OpenFOAM/meshes/meshShapes/labelledTri/labelledTriI.H @@ -77,13 +77,13 @@ inline Foam::labelledTri::labelledTri inline Foam::labelledTri::labelledTri ( - const label a, - const label b, - const label c, + const label p0, + const label p1, + const label p2, const label region ) : - triFace(a, b, c), + triFace(p0, p1, p2), index_(region) {} diff --git a/src/OpenFOAM/meshes/meshShapes/tetCell/tetCell.H b/src/OpenFOAM/meshes/meshShapes/tetCell/tetCell.H index 9659aac1b5..427fc8bddd 100644 --- a/src/OpenFOAM/meshes/meshShapes/tetCell/tetCell.H +++ b/src/OpenFOAM/meshes/meshShapes/tetCell/tetCell.H @@ -40,15 +40,15 @@ SourceFiles \*---------------------------------------------------------------------------*/ -#ifndef tetCell_H -#define tetCell_H +#ifndef Foam_tetCell_H +#define Foam_tetCell_H #include "FixedList.H" #include "triFace.H" #include "faceList.H" #include "edgeList.H" #include "pointField.H" -#include "tetPointRef.H" +#include "tetrahedron.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -85,10 +85,10 @@ public: //- Construct from four point labels inline tetCell ( - const label a, - const label b, - const label c, - const label d + const label p0, + const label p1, + const label p2, + const label p3 ); //- Construct from an initializer list of four point labels diff --git a/src/OpenFOAM/meshes/meshShapes/tetCell/tetCellI.H b/src/OpenFOAM/meshes/meshShapes/tetCell/tetCellI.H index 66f90767ff..d9b0b74502 100644 --- a/src/OpenFOAM/meshes/meshShapes/tetCell/tetCellI.H +++ b/src/OpenFOAM/meshes/meshShapes/tetCell/tetCellI.H @@ -36,16 +36,16 @@ inline Foam::tetCell::tetCell() inline Foam::tetCell::tetCell ( - const label a, - const label b, - const label c, - const label d + const label p0, + const label p1, + const label p2, + const label p3 ) { - operator[](0) = a; - operator[](1) = b; - operator[](2) = c; - operator[](3) = d; + operator[](0) = p0; + operator[](1) = p1; + operator[](2) = p2; + operator[](3) = p3; } diff --git a/src/OpenFOAM/meshes/meshShapes/triFace/triFace.H b/src/OpenFOAM/meshes/meshShapes/triFace/triFace.H index 28cd39a33f..4444dc9587 100644 --- a/src/OpenFOAM/meshes/meshShapes/triFace/triFace.H +++ b/src/OpenFOAM/meshes/meshShapes/triFace/triFace.H @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation - Copyright (C) 2017-2021 OpenCFD Ltd. + Copyright (C) 2017-2022 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -48,7 +48,7 @@ SourceFiles #include "pointHit.H" #include "intersection.H" #include "pointField.H" -#include "triPointRef.H" +#include "triangle.H" #include "ListListOps.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -79,12 +79,7 @@ public: inline triFace(); //- Construct from three point labels - inline triFace - ( - const label a, - const label b, - const label c - ); + inline triFace(const label p0, const label p1, const label p2); //- Construct from an initializer list of three point labels inline explicit triFace(std::initializer_list