partTriMeshSimplex.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | cfMesh: A library for mesh generation
4  \\ / O peration |
5  \\ / A nd | Author: Franjo Juretic (franjo.juretic@c-fields.com)
6  \\/ M anipulation | Copyright (C) Creative Fields, Ltd.
7 -------------------------------------------------------------------------------
8 License
9  This file is part of cfMesh.
10 
11  cfMesh is free software; you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by the
13  Free Software Foundation; either version 3 of the License, or (at your
14  option) any later version.
15 
16  cfMesh is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with cfMesh. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  partTriMeshSimplex
26 
27 Description
28  A simplex which is used for smoothing purposes
29 
30 SourceFiles
31 
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef partTriMeshSimplex_H
36 #define partTriMeshSimplex_H
37 
38 #include "partTriMesh.H"
39 #include "triFace.H"
40 
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42 
43 namespace Foam
44 {
45 
46 // Forward declarations
47 class partTriMesh;
48 
49 /*---------------------------------------------------------------------------*\
50  Class partTriMeshSimplex Declaration
51 \*---------------------------------------------------------------------------*/
52 
54 {
55  // Private data
56  //- points making the simplex
58 
59  //- triangles making the simplex
61 
62  public:
63 
64  // Constructors
65  //- Construct from partTriMesh and point label
66  partTriMeshSimplex(const partTriMesh& tm, const label pI);
67 
68  // Destructor
70 
71  // Member functions
72  //- return points
73  inline DynList<point, 32>& pts()
74  {
75  return pts_;
76  }
77 
78  //- return points
79  inline const DynList<point, 32>& pts() const
80  {
81  return pts_;
82  }
83 
84  //- return triangles
85  inline const DynList<triFace, 32>& triangles() const
86  {
87  return trias_;
88  }
89 
90  //- return centre point coordinates
91  inline const point& centrePoint() const
92  {
93  return pts_[trias_[0][0]];
94  }
95 
96  //- return the normal of the simplex
97  vector normal() const;
98 };
99 
100 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
101 
102 } // End namespace Foam
103 
104 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
105 
106 #endif
107 
108 // ************************************************************************* //
Foam::partTriMeshSimplex
Definition: partTriMeshSimplex.H:52
partTriMesh
Triangulation of mesh surface needed for surface smoothing.
triFace.H
Foam::label
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
Foam::partTriMeshSimplex::centrePoint
const point & centrePoint() const
return centre point coordinates
Definition: partTriMeshSimplex.H:90
Foam::partTriMeshSimplex::pts
const DynList< point, 32 > & pts() const
return points
Definition: partTriMeshSimplex.H:78
Foam::partTriMeshSimplex::~partTriMeshSimplex
~partTriMeshSimplex()
Definition: partTriMeshSimplex.C:136
Foam::partTriMeshSimplex::trias_
DynList< triFace, 32 > trias_
triangles making the simplex
Definition: partTriMeshSimplex.H:59
Foam::partTriMeshSimplex::partTriMeshSimplex
partTriMeshSimplex(const partTriMesh &tm, const label pI)
Construct from partTriMesh and point label.
Definition: partTriMeshSimplex.C:41
Foam::partTriMeshSimplex::pts
DynList< point, 32 > & pts()
return points
Definition: partTriMeshSimplex.H:72
Foam::partTriMeshSimplex::normal
vector normal() const
return the normal of the simplex
Definition: partTriMeshSimplex.C:141
Foam::partTriMeshSimplex::pts_
DynList< point, 32 > pts_
points making the simplex
Definition: partTriMeshSimplex.H:56
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::DynList
Definition: DynList.H:53
Foam::partTriMesh
Definition: partTriMesh.H:59
Foam::Vector< scalar >
Foam::partTriMeshSimplex::triangles
const DynList< triFace, 32 > & triangles() const
return triangles
Definition: partTriMeshSimplex.H:84
partTriMesh.H