polyMeshGenPoints.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  polyMeshGenPoints
26 
27 Description
28  Mesh with geometry information
29 
30 SourceFiles
31  polyMeshGenPoints.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef polyMeshGenPoints_H
36 #define polyMeshGenPoints_H
37 
38 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
39 
40 # ifdef ExtendSpecific
41 #include "foamTime.H"
42 # else
43 #include "Time.H"
44 # endif
45 #include "meshSubset.H"
46 #include "pointFieldPMG.H"
47 #include "DynList.H"
48 
49 #include <map>
50 
51 namespace Foam
52 {
53 
54 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
55 
57 {
58 protected:
59 
60  // Protected data
61  //- reference to the Time registry
62  const Time& runTime_;
63 
64  //- list of vertices
66 
67  //- map of point subsets
68  std::map<label, meshSubset> pointSubsets_;
69 
70  // Disallow bitwise assignment
71  void operator=(const polyMeshGenPoints&);
72 
74 
75 public:
76 
77  friend class polyMeshGenModifier;
78 
79  // Constructors
80  //- Null constructor
81  polyMeshGenPoints(const Time&);
82 
83  //- Construct from components without the boundary
85  (
86  const Time&,
87  const pointField& points
88  );
89 
90  // Destructor
92 
93  // Member functions
94  //- access to Time
95  inline const Time& returnTime() const;
96 
97  //- access to points
98  inline const pointFieldPMG& points() const;
99 
100  //- non-const access to points
101  inline pointFieldPMG& points();
102 
103  //- append a vertex to the end of the list
104  inline void appendVertex(const point& p);
105 
106  //- point subsets
107  label addPointSubset(const word&);
108  void removePointSubset(const label);
109  word pointSubsetName(const label) const;
110  label pointSubsetIndex(const word&) const;
111  inline void addPointToSubset(const label, const label);
112  inline void removePointFromSubset(const label, const label);
113  inline void pointInSubsets(const label, DynList<label>&) const;
114  inline void pointSubsetIndices(DynList<label>&) const;
115  template<class ListType>
116  inline void pointsInSubset(const label, ListType&) const;
117  template<class ListType>
118  inline void updatePointSubsets(const ListType&);
119 
120  // Read mesh
121  void read();
122 
123  // Write mesh
124  void write() const;
125 };
126 
127 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
128 
129 } // End namespace Foam
130 
131 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
132 
133 #include "polyMeshGenPointsI.H"
134 
135 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
136 
137 #endif
138 
139 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Foam::polyMeshGenPoints::polyMeshGenPoints
polyMeshGenPoints(const polyMeshGenPoints &)
Foam::polyMeshGenPoints::~polyMeshGenPoints
~polyMeshGenPoints()
Definition: polyMeshGenPoints.C:82
meshSubset.H
Foam::Time
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition: Time.H:68
p
p
Definition: pEqn.H:62
Foam::word
A class for handling words, derived from string.
Definition: word.H:59
foamTime.H
Foam::polyMeshGenPoints::removePointSubset
void removePointSubset(const label)
Definition: polyMeshGenPoints.C:114
polyMeshGenPointsI.H
Foam::polyMeshGenPoints::points
const pointFieldPMG & points() const
access to points
Definition: polyMeshGenPointsI.H:44
Foam::polyMeshGenPoints
Definition: polyMeshGenPoints.H:55
Foam::polyMeshGenPoints::pointSubsetIndex
label pointSubsetIndex(const word &) const
Definition: polyMeshGenPoints.C:135
Foam::polyMeshGenPoints::write
void write() const
Definition: polyMeshGenPoints.C:184
Foam::polyMeshGenPoints::read
void read()
Definition: polyMeshGenPoints.C:147
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::Field
Pre-declare SubField and related Field type.
Definition: Field.H:57
pointFieldPMG.H
Foam::polyMeshGenPoints::pointSubsetIndices
void pointSubsetIndices(DynList< label > &) const
Definition: polyMeshGenPointsI.H:106
Foam::polyMeshGenPoints::removePointFromSubset
void removePointFromSubset(const label, const label)
Definition: polyMeshGenPointsI.H:73
Foam::polyMeshGenPoints::pointSubsets_
std::map< label, meshSubset > pointSubsets_
map of point subsets
Definition: polyMeshGenPoints.H:67
Foam::polyMeshGenPoints::updatePointSubsets
void updatePointSubsets(const ListType &)
Definition: polyMeshGenPointsI.H:138
Foam::polyMeshGenPoints::addPointToSubset
void addPointToSubset(const label, const label)
Definition: polyMeshGenPointsI.H:60
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::polyMeshGenPoints::returnTime
const Time & returnTime() const
access to Time
Definition: polyMeshGenPointsI.H:39
Foam::DynList< label >
Foam::polyMeshGenPoints::pointsInSubset
void pointsInSubset(const label, ListType &) const
Definition: polyMeshGenPointsI.H:122
Foam::polyMeshGenModifier
Definition: polyMeshGenModifier.H:52
Foam::polyMeshGenPoints::pointSubsetName
word pointSubsetName(const label) const
Definition: polyMeshGenPoints.C:122
Foam::polyMeshGenPoints::pointInSubsets
void pointInSubsets(const label, DynList< label > &) const
Definition: polyMeshGenPointsI.H:86
Foam::Vector< scalar >
Foam::polyMeshGenPoints::runTime_
const Time & runTime_
reference to the Time registry
Definition: polyMeshGenPoints.H:61
Foam::polyMeshGenPoints::points_
pointFieldPMG points_
list of vertices
Definition: polyMeshGenPoints.H:64
Foam::pointFieldPMG
Definition: pointFieldPMG.H:50
Foam::polyMeshGenPoints::addPointSubset
label addPointSubset(const word &)
point subsets
Definition: polyMeshGenPoints.C:88
Foam::polyMeshGenPoints::operator=
void operator=(const polyMeshGenPoints &)
DynList.H
Foam::polyMeshGenPoints::appendVertex
void appendVertex(const point &p)
append a vertex to the end of the list
Definition: polyMeshGenPointsI.H:54