Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
CurvaturePoint.hpp
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////////////
2 //
3 // File: Curavturepoint.hpp
4 //
5 // For more information, please see: http://www.nektar.info/
6 //
7 // The MIT License
8 //
9 // Copyright (c) 2006 Division of Applied Mathematics, Brown University (USA),
10 // Department of Aeronautics, Imperial College London (UK), and Scientific
11 // Computing and Imaging Institute, University of Utah (USA).
12 //
13 // License for the specific language governing rights and limitations under
14 // Permission is hereby granted, free of charge, to any person obtaining a
15 // copy of this software and associated documentation files (the "Software"),
16 // to deal in the Software without restriction, including without limitation
17 // the rights to use, copy, modify, merge, publish, distribute, sublicense,
18 // and/or sell copies of the Software, and to permit persons to whom the
19 // Software is furnished to do so, subject to the following conditions:
20 //
21 // The above copyright notice and this permission notice shall be included
22 // in all copies or substantial portions of the Software.
23 //
24 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
25 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
26 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
27 // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
28 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
29 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
30 // DEALINGS IN THE SOFTWARE.
31 //
32 // Description: class and methods of curvature sampling point
33 //
34 ////////////////////////////////////////////////////////////////////////////////
35 
36 #ifndef NekMeshUtils_OCTREE_CURAVTUREPOINT
37 #define NekMeshUtils_OCTREE_CURAVTUREPOINT
38 
41 
42 namespace Nektar
43 {
44 namespace NekMeshUtils
45 {
46 
47 /**
48  * @brief class for a curvature samlping Point
49  */
51 {
52 public:
54 
55  /**
56  * @brief constructor for a valid point (has radius of curvature)
57  */
61  NekDouble d,
62  bool bnd = true)
63  : sid(i), m_uv(uv), m_loc(l), m_delta(d), m_boundary(bnd)
64  {
65  m_valid = true;
66  }
67 
68  /**
69  * @brief constructor for a invalid point
70  */
72  : sid(i), m_uv(uv), m_loc(l)
73  {
74  m_delta = -1;
75  m_valid = false;
76  m_boundary = true;
77  }
78 
79  /**
80  * @brief return bool on whether point is valid
81  */
82  bool IsValid()
83  {
84  return m_valid;
85  }
86 
87  bool Isboundary()
88  {
89  return m_boundary;
90  }
91 
92  /**
93  * @brief get mesh spacing paramter
94  */
96  {
97  if (m_valid)
98  {
99  return m_delta;
100  }
101  else
102  {
103  return -1;
104  }
105  }
106 
107  /**
108  * @brief get location of point
109  */
111  {
112  return m_loc;
113  }
114 
115  /**
116  * @brief gets the corresponding cad information for the point
117  */
119  {
120  surf = sid;
121  uv = m_uv;
122  }
123 
125  {
126  m_delta = i;
127  }
128 
129 private:
130  /// surf id
131  int sid;
132  /// uv coord on surf
134  /// x,y,z location
136  /// normal vector of surface at point
138  /// valid point or not
139  bool m_valid;
140 
142 };
143 
144 typedef boost::shared_ptr<CurvaturePoint> CurvaturePointSharedPtr;
145 }
146 }
147 
148 #endif
bool IsValid()
return bool on whether point is valid
General purpose memory allocation routines with the ability to allocate from thread specific memory p...
void GetCAD(int &surf, Array< OneD, NekDouble > &uv)
gets the corresponding cad information for the point
boost::shared_ptr< CurvaturePoint > CurvaturePointSharedPtr
CurvaturePoint(int i, Array< OneD, NekDouble > uv, Array< OneD, NekDouble > l)
constructor for a invalid point
CurvaturePoint(int i, Array< OneD, NekDouble > uv, Array< OneD, NekDouble > l, NekDouble d, bool bnd=true)
constructor for a valid point (has radius of curvature)
class for a curvature samlping Point
NekDouble GetDelta()
get mesh spacing paramter
double NekDouble
Array< OneD, NekDouble > m_uv
uv coord on surf
Array< OneD, NekDouble > GetLoc()
get location of point
NekDouble m_delta
normal vector of surface at point
Array< OneD, NekDouble > m_loc
x,y,z location