triSurfPoints.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  triSurfPoints
26 
27 Description
28  Point coordinates information for triangulated surface
29 
30 SourceFiles
31  triSurfPoints.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef triSurfPoints_H
36 #define triSurfPoints_H
37 
38 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
39 
40 #include "meshSubset.H"
41 #include "pointField.H"
42 #include "DynList.H"
43 #include "Map.H"
44 
45 namespace Foam
46 {
47 
48 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49 
50 class triSurfPoints
51 {
52 protected:
53 
54  // Protected data
55  //- list of vertices
57 
58  //- map of point subsets
60 
61  // Disallow bitwise assignment
62  void operator=(const triSurfPoints&);
63 
65 
66 public:
67 
68  // Constructors
69  //- Null constructor
70  triSurfPoints();
71 
72  //- Construct from vertices
74 
75  // Destructor
77 
78  // Member functions
79  //- return the number of points
80  inline label nPoints() const;
81 
82  //- access to points
83  inline const pointField& points() const;
84 
85  //- append a vertex to the end of the list
86  inline void appendVertex(const point& p);
87 
88  //- point subsets
89  label addPointSubset(const word&);
90  void removePointSubset(const label);
91  word pointSubsetName(const label) const;
92  label pointSubsetIndex(const word&) const;
93  inline void addPointToSubset(const label, const label);
94  inline void removePointFromSubset(const label, const label);
95  inline void pointInSubsets(const label, DynList<label>&) const;
96  inline void pointSubsetIndices(DynList<label>&) const;
97  template<class ListType>
98  inline void pointsInSubset(const label, ListType&) const;
99  template<class ListType>
100  inline void updatePointSubsets(const ListType&);
101 };
102 
103 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
104 
105 } // End namespace Foam
106 
107 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
108 
109 #include "triSurfPointsI.H"
110 
111 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
112 
113 #endif
114 
115 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Foam::triSurfPoints::pointsInSubset
void pointsInSubset(const label, ListType &) const
Definition: triSurfPointsI.H:117
meshSubset.H
triSurfPointsI.H
Foam::triSurfPoints::pointSubsetName
word pointSubsetName(const label) const
Definition: triSurfPoints.C:84
p
p
Definition: pEqn.H:62
Foam::word
A class for handling words, derived from string.
Definition: word.H:59
Foam::triSurfPoints::pointInSubsets
void pointInSubsets(const label, DynList< label > &) const
Definition: triSurfPointsI.H:83
Foam::triSurfPoints::triSurfPoints
triSurfPoints()
Null constructor.
Definition: triSurfPoints.C:35
Foam::triSurfPoints::points
const pointField & points() const
access to points
Definition: triSurfPointsI.H:44
Foam::triSurfPoints::updatePointSubsets
void updatePointSubsets(const ListType &)
Definition: triSurfPointsI.H:133
Foam::Map
A HashTable to objects of type <T> with a label key.
Definition: PrimitivePatchTemplate.H:68
Foam::triSurfPoints::addPointSubset
label addPointSubset(const word &)
point subsets
Definition: triSurfPoints.C:54
Foam::triSurfPoints::appendVertex
void appendVertex(const point &p)
append a vertex to the end of the list
Definition: triSurfPointsI.H:49
Foam::triSurfPoints::nPoints
label nPoints() const
return the number of points
Definition: triSurfPointsI.H:39
Map.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::triSurfPoints::operator=
void operator=(const triSurfPoints &)
Foam::Field
Pre-declare SubField and related Field type.
Definition: Field.H:57
Foam::triSurfPoints::addPointToSubset
void addPointToSubset(const label, const label)
Definition: triSurfPointsI.H:57
Foam::triSurfPoints::removePointFromSubset
void removePointFromSubset(const label, const label)
Definition: triSurfPointsI.H:70
Foam::triSurfPoints::removePointSubset
void removePointSubset(const label)
Definition: triSurfPoints.C:76
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::triSurfPoints::pointSubsets_
Map< meshSubset > pointSubsets_
map of point subsets
Definition: triSurfPoints.H:58
Foam::DynList< label >
Foam::triSurfPoints::pointSubsetIndices
void pointSubsetIndices(DynList< label > &) const
Definition: triSurfPointsI.H:102
Foam::triSurfPoints
Definition: triSurfPoints.H:49
pointField.H
Foam::triSurfPoints::pointSubsetIndex
label pointSubsetIndex(const word &) const
Definition: triSurfPoints.C:96
Foam::Vector< scalar >
Foam::triSurfPoints::points_
pointField points_
list of vertices
Definition: triSurfPoints.H:55
DynList.H
Foam::triSurfPoints::~triSurfPoints
~triSurfPoints()
Definition: triSurfPoints.C:49