Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Public Member Functions | Public Attributes | Private Attributes | List of all members
Nektar::NekMeshUtils::Node Class Reference

Represents a point in the domain. More...

#include <Node.h>

Collaboration diagram for Nektar::NekMeshUtils::Node:
Collaboration graph
[legend]

Public Member Functions

NEKMESHUTILS_EXPORT Node (int pId, NekDouble pX, NekDouble pY, NekDouble pZ)
 Create a new node at a specified coordinate. More...
 
NEKMESHUTILS_EXPORT Node ()
 Copy an existing node. More...
 
NEKMESHUTILS_EXPORT ~Node ()
 
NEKMESHUTILS_EXPORT void SetID (int pId)
 Reset the local id;. More...
 
NEKMESHUTILS_EXPORT int GetID (void)
 Get the local id;. More...
 
NEKMESHUTILS_EXPORT bool operator< (const Node &pSrc)
 Define node ordering based on ID. More...
 
NEKMESHUTILS_EXPORT bool operator== (const Node &pSrc)
 Define node equality based on coordinate. More...
 
NEKMESHUTILS_EXPORT Node operator+ (const Node &pSrc) const
 
NEKMESHUTILS_EXPORT Node operator- (const Node &pSrc) const
 
NEKMESHUTILS_EXPORT Node operator* (const Node &pSrc) const
 
NEKMESHUTILS_EXPORT Node operator* (const NekDouble &alpha) const
 
NEKMESHUTILS_EXPORT Node operator/ (const NekDouble &alpha) const
 
NEKMESHUTILS_EXPORT void operator+= (const Node &pSrc)
 
NEKMESHUTILS_EXPORT void operator*= (const NekDouble &alpha)
 
NEKMESHUTILS_EXPORT void operator/= (const NekDouble &alpha)
 
NEKMESHUTILS_EXPORT NodeSharedPtr copy ()
 
NEKMESHUTILS_EXPORT NekDouble abs2 () const
 
NEKMESHUTILS_EXPORT NekDouble dot (const Node &pSrc) const
 
NEKMESHUTILS_EXPORT Node curl (const Node &pSrc) const
 
NEKMESHUTILS_EXPORT Array
< OneD, NekDouble
GetLoc ()
 
NEKMESHUTILS_EXPORT
SpatialDomains::PointGeomSharedPtr 
GetGeom (int coordDim)
 Generate a SpatialDomains::PointGeom for this node. More...
 
NEKMESHUTILS_EXPORT NekDouble Distance (NodeSharedPtr &p)
 
NEKMESHUTILS_EXPORT NekDouble Angle (NodeSharedPtr &a, NodeSharedPtr &b)
 
void SetCADCurve (int i, CADCurveSharedPtr c, NekDouble t)
 
void SetCADSurf (int i, CADSurfSharedPtr s, Array< OneD, NekDouble > uv)
 
CADCurveSharedPtr GetCADCurve (int i)
 
CADSurfSharedPtr GetCADSurf (int i)
 
NekDouble GetCADCurveInfo (int i)
 
Array< OneD, NekDoubleGetCADSurfInfo (int i)
 
std::vector< std::pair< int,
CADCurveSharedPtr > > 
GetCADCurves ()
 
std::vector< std::pair< int,
CADSurfSharedPtr > > 
GetCADSurfs ()
 
int GetNumCadCurve ()
 
int GetNumCADSurf ()
 
void Move (Array< OneD, NekDouble > l, int s, Array< OneD, NekDouble > uv)
 
void MoveCurve (Array< OneD, NekDouble > l, int s, NekDouble t)
 
std::vector< std::pair< int,
std::string > > 
GetCADCurveInfoVector ()
 
std::vector< std::pair< int,
std::string > > 
GetCADSurfInfoVector ()
 
NekDouble Angle (Array< OneD, NekDouble > locA, Array< OneD, NekDouble > locB, Array< OneD, NekDouble > N)
 

Public Attributes

int m_id
 ID of node. More...
 
NekDouble m_x
 X-coordinate. More...
 
NekDouble m_y
 Y-coordinate. More...
 
NekDouble m_z
 Z-coordinate. More...
 
std::map< int, std::pair
< CADCurveSharedPtr, NekDouble > > 
CADCurveList
 list of cadcurves the node lies on More...
 
std::map< int, std::pair
< CADSurfSharedPtr, Array
< OneD, NekDouble > > > 
CADSurfList
 list of cadsurfs the node lies on More...
 

Private Attributes

SpatialDomains::PointGeomSharedPtr m_geom
 

Detailed Description

Represents a point in the domain.

Such points may either be element vertices, or simply control points on high-order edges/faces, although this information is not contained within this class.

Definition at line 60 of file Node.h.

Constructor & Destructor Documentation

NEKMESHUTILS_EXPORT Nektar::NekMeshUtils::Node::Node ( int  pId,
NekDouble  pX,
NekDouble  pY,
NekDouble  pZ 
)
inline

Create a new node at a specified coordinate.

Definition at line 64 of file Node.h.

65  : m_id(pId), m_x(pX), m_y(pY), m_z(pZ), m_geom()
66  {
67  }
NekDouble m_y
Y-coordinate.
Definition: Node.h:401
int m_id
ID of node.
Definition: Node.h:397
NekDouble m_x
X-coordinate.
Definition: Node.h:399
NekDouble m_z
Z-coordinate.
Definition: Node.h:403
SpatialDomains::PointGeomSharedPtr m_geom
Definition: Node.h:412
NEKMESHUTILS_EXPORT Nektar::NekMeshUtils::Node::Node ( )
inline

Copy an existing node.

create an empty node

Definition at line 73 of file Node.h.

Referenced by copy(), curl(), operator*(), operator+(), operator-(), and operator/().

73  : m_id(0), m_x(0.0), m_y(0.0), m_z(0.0), m_geom()
74  {
75  }
NekDouble m_y
Y-coordinate.
Definition: Node.h:401
int m_id
ID of node.
Definition: Node.h:397
NekDouble m_x
X-coordinate.
Definition: Node.h:399
NekDouble m_z
Z-coordinate.
Definition: Node.h:403
SpatialDomains::PointGeomSharedPtr m_geom
Definition: Node.h:412
NEKMESHUTILS_EXPORT Nektar::NekMeshUtils::Node::~Node ( )
inline

Definition at line 76 of file Node.h.

77  {
78  }

Member Function Documentation

NEKMESHUTILS_EXPORT NekDouble Nektar::NekMeshUtils::Node::abs2 ( ) const
inline

Definition at line 154 of file Node.h.

References m_x, m_y, and m_z.

Referenced by Nektar::Utilities::ProcessSpherigon::GenerateNormals(), Nektar::Utilities::ProcessPerAlign::Process(), and Nektar::Utilities::ProcessSpherigon::Process().

155  {
156  return m_x * m_x + m_y * m_y + m_z * m_z;
157  }
NekDouble m_y
Y-coordinate.
Definition: Node.h:401
NekDouble m_x
X-coordinate.
Definition: Node.h:399
NekDouble m_z
Z-coordinate.
Definition: Node.h:403
NEKMESHUTILS_EXPORT NekDouble Nektar::NekMeshUtils::Node::Angle ( NodeSharedPtr a,
NodeSharedPtr b 
)
inline

Definition at line 197 of file Node.h.

References m_x, m_y, and m_z.

198  {
199  Array<OneD, NekDouble> va(3), vb(3), cn(3);
200  va[0] = a->m_x - m_x;
201  va[1] = a->m_y - m_y;
202  va[2] = a->m_z - m_z;
203  vb[0] = b->m_x - m_x;
204  vb[1] = b->m_y - m_y;
205  vb[2] = b->m_z - m_z;
206 
207  NekDouble lva = sqrt(va[0] * va[0] + va[1] * va[1] + va[2] * va[2]);
208  NekDouble lvb = sqrt(vb[0] * vb[0] + vb[1] * vb[1] + vb[2] * vb[2]);
209 
210  NekDouble aw = 1.0 / (lva * lvb);
211 
212  NekDouble cosw = (va[0] * vb[0] + va[1] * vb[1] + va[2] * vb[2]) * aw;
213 
214  cn[0] = vb[1] * va[2] - vb[2] * va[1];
215  cn[1] = vb[2] * va[0] - vb[0] * va[2];
216  cn[2] = vb[0] * va[1] - vb[1] * va[0];
217 
218  NekDouble lcn = sqrt(cn[0] * cn[0] + cn[1] * cn[1] + cn[2] * cn[2]);
219 
220  NekDouble sinw = aw * lcn;
221 
222  NekDouble an = atan2(sinw, cosw);
223 
224  if (an < 0)
225  an += 6.2831853071796;
226 
227  return an;
228  }
NekDouble m_y
Y-coordinate.
Definition: Node.h:401
double NekDouble
NekDouble m_x
X-coordinate.
Definition: Node.h:399
NekDouble m_z
Z-coordinate.
Definition: Node.h:403
NekDouble Nektar::NekMeshUtils::Node::Angle ( Array< OneD, NekDouble locA,
Array< OneD, NekDouble locB,
Array< OneD, NekDouble N 
)
inline

Definition at line 362 of file Node.h.

References Nektar::LibUtilities::ang(), dot(), m_x, m_y, and m_z.

364  {
365  // calculates the angle between this node to a to this node to b
366  // Uses the CAD surface to orientate the angle
367  Array<OneD, NekDouble> A(3), B(3), CP(3);
368  A[0] = locA[0] - m_x;
369  A[1] = locA[1] - m_y;
370  A[2] = locA[2] - m_z;
371  B[0] = locB[0] - m_x;
372  B[1] = locB[1] - m_y;
373  B[2] = locB[2] - m_z;
374 
375  CP[0] = A[1] * B[2] - A[2] * B[1];
376  CP[1] = -1.0 * (A[0] * B[2] - A[2] * B[0]);
377  CP[2] = A[0] * B[1] - A[1] * B[0];
378 
379  NekDouble ang = sqrt(CP[0] * CP[0] + CP[1] * CP[1] + CP[2] * CP[2]);
380 
381  ang /= sqrt(A[0] * A[0] + A[1] * A[1] + A[2] * A[2]);
382  ang /= sqrt(B[0] * B[0] + B[1] * B[1] + B[2] * B[2]);
383 
384  NekDouble dot = N[0] * CP[0] + N[1] * CP[1] + N[2] * CP[2];
385 
386  ang = asin(ang);
387 
388  if (dot < 0.0)
389  {
390  ang = 2.0 * M_PI - ang;
391  }
392 
393  return ang;
394  }
static NekDouble ang(NekDouble x, NekDouble y)
NEKMESHUTILS_EXPORT NekDouble dot(const Node &pSrc) const
Definition: Node.h:159
NekDouble m_y
Y-coordinate.
Definition: Node.h:401
double NekDouble
NekDouble m_x
X-coordinate.
Definition: Node.h:399
NekDouble m_z
Z-coordinate.
Definition: Node.h:403
NEKMESHUTILS_EXPORT NodeSharedPtr Nektar::NekMeshUtils::Node::copy ( )
inline

Definition at line 149 of file Node.h.

References m_id, m_x, m_y, m_z, and Node().

150  {
151  return boost::shared_ptr<Node>(new Node(m_id, m_x, m_y, m_z));
152  }
NekDouble m_y
Y-coordinate.
Definition: Node.h:401
int m_id
ID of node.
Definition: Node.h:397
NEKMESHUTILS_EXPORT Node()
Copy an existing node.
Definition: Node.h:73
NekDouble m_x
X-coordinate.
Definition: Node.h:399
NekDouble m_z
Z-coordinate.
Definition: Node.h:403
NEKMESHUTILS_EXPORT Node Nektar::NekMeshUtils::Node::curl ( const Node pSrc) const
inline

Definition at line 164 of file Node.h.

References m_id, m_x, m_y, m_z, and Node().

Referenced by Nektar::Utilities::InputTec::SortEdgeNodes(), Nektar::Utilities::InputStar::SortEdgeNodes(), Nektar::Utilities::InputTec::SortFaceNodes(), and Nektar::Utilities::InputStar::SortFaceNodes().

165  {
166  return Node(m_id, m_y * pSrc.m_z - m_z * pSrc.m_y,
167  m_z * pSrc.m_x - m_x * pSrc.m_z,
168  m_x * pSrc.m_y - m_y * pSrc.m_x);
169  }
NekDouble m_y
Y-coordinate.
Definition: Node.h:401
int m_id
ID of node.
Definition: Node.h:397
NEKMESHUTILS_EXPORT Node()
Copy an existing node.
Definition: Node.h:73
NekDouble m_x
X-coordinate.
Definition: Node.h:399
NekDouble m_z
Z-coordinate.
Definition: Node.h:403
NEKMESHUTILS_EXPORT NekDouble Nektar::NekMeshUtils::Node::Distance ( NodeSharedPtr p)
inline

Definition at line 190 of file Node.h.

References m_x, m_y, and m_z.

191  {
192  return sqrt((m_x - p->m_x) * (m_x - p->m_x) +
193  (m_y - p->m_y) * (m_y - p->m_y) +
194  (m_z - p->m_z) * (m_z - p->m_z));
195  }
NekDouble m_y
Y-coordinate.
Definition: Node.h:401
NekDouble m_x
X-coordinate.
Definition: Node.h:399
NekDouble m_z
Z-coordinate.
Definition: Node.h:403
NEKMESHUTILS_EXPORT NekDouble Nektar::NekMeshUtils::Node::dot ( const Node pSrc) const
inline
CADCurveSharedPtr Nektar::NekMeshUtils::Node::GetCADCurve ( int  i)
inline

Definition at line 243 of file Node.h.

References ASSERTL0, CADCurveList, and Nektar::iterator.

244  {
245  std::map<int, std::pair<CADCurveSharedPtr, NekDouble> >::iterator
246  search = CADCurveList.find(i);
247  ASSERTL0(search->first == i, "node not on this curve");
248 
249  return search->second.first;
250  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:198
StandardMatrixTag boost::call_traits< LhsDataType >::const_reference rhs typedef NekMatrix< LhsDataType, StandardMatrixTag >::iterator iterator
std::map< int, std::pair< CADCurveSharedPtr, NekDouble > > CADCurveList
list of cadcurves the node lies on
Definition: Node.h:406
NekDouble Nektar::NekMeshUtils::Node::GetCADCurveInfo ( int  i)
inline

Definition at line 261 of file Node.h.

References ASSERTL0, CADCurveList, and Nektar::iterator.

262  {
263  std::map<int, std::pair<CADCurveSharedPtr, NekDouble> >::iterator
264  search = CADCurveList.find(i);
265  ASSERTL0(search->first == i, "node not on this curve");
266 
267  return search->second.second;
268  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:198
StandardMatrixTag boost::call_traits< LhsDataType >::const_reference rhs typedef NekMatrix< LhsDataType, StandardMatrixTag >::iterator iterator
std::map< int, std::pair< CADCurveSharedPtr, NekDouble > > CADCurveList
list of cadcurves the node lies on
Definition: Node.h:406
std::vector<std::pair<int, std::string> > Nektar::NekMeshUtils::Node::GetCADCurveInfoVector ( )
inline

Definition at line 333 of file Node.h.

References CADCurveList, and Nektar::iterator.

334  {
335  std::vector<std::pair<int, std::string> > ret;
336  std::map<int, std::pair<CADCurveSharedPtr, NekDouble> >::iterator c;
337  for (c = CADCurveList.begin(); c != CADCurveList.end(); c++)
338  {
339  std::stringstream ss;
340  ss << std::scientific << std::setprecision(8);
341  ss << c->second.second;
342  ret.push_back(std::pair<int, std::string>(c->first, ss.str()));
343  }
344  return ret;
345  }
StandardMatrixTag boost::call_traits< LhsDataType >::const_reference rhs typedef NekMatrix< LhsDataType, StandardMatrixTag >::iterator iterator
std::map< int, std::pair< CADCurveSharedPtr, NekDouble > > CADCurveList
list of cadcurves the node lies on
Definition: Node.h:406
std::vector<std::pair<int, CADCurveSharedPtr> > Nektar::NekMeshUtils::Node::GetCADCurves ( )
inline

Definition at line 279 of file Node.h.

References CADCurveList, and Nektar::iterator.

280  {
281  std::vector<std::pair<int, CADCurveSharedPtr> > lst;
282  std::map<int, std::pair<CADCurveSharedPtr, NekDouble> >::iterator c;
283  for (c = CADCurveList.begin(); c != CADCurveList.end(); c++)
284  {
285  lst.push_back(
286  std::pair<int, CADCurveSharedPtr>(c->first, c->second.first));
287  }
288  return lst;
289  }
StandardMatrixTag boost::call_traits< LhsDataType >::const_reference rhs typedef NekMatrix< LhsDataType, StandardMatrixTag >::iterator iterator
std::map< int, std::pair< CADCurveSharedPtr, NekDouble > > CADCurveList
list of cadcurves the node lies on
Definition: Node.h:406
CADSurfSharedPtr Nektar::NekMeshUtils::Node::GetCADSurf ( int  i)
inline

Definition at line 252 of file Node.h.

References ASSERTL0, CADSurfList, and Nektar::iterator.

253  {
254  std::map<int, std::pair<CADSurfSharedPtr, Array<OneD, NekDouble> > >::
255  iterator search = CADSurfList.find(i);
256  ASSERTL0(search->first == i, "surface not found");
257 
258  return search->second.first;
259  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:198
std::map< int, std::pair< CADSurfSharedPtr, Array< OneD, NekDouble > > > CADSurfList
list of cadsurfs the node lies on
Definition: Node.h:409
StandardMatrixTag boost::call_traits< LhsDataType >::const_reference rhs typedef NekMatrix< LhsDataType, StandardMatrixTag >::iterator iterator
Array<OneD, NekDouble> Nektar::NekMeshUtils::Node::GetCADSurfInfo ( int  i)
inline

Definition at line 270 of file Node.h.

References ASSERTL0, CADSurfList, and Nektar::iterator.

271  {
272  std::map<int, std::pair<CADSurfSharedPtr, Array<OneD, NekDouble> > >::
273  iterator search = CADSurfList.find(i);
274  ASSERTL0(search->first == i, "surface not found");
275 
276  return search->second.second;
277  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:198
std::map< int, std::pair< CADSurfSharedPtr, Array< OneD, NekDouble > > > CADSurfList
list of cadsurfs the node lies on
Definition: Node.h:409
StandardMatrixTag boost::call_traits< LhsDataType >::const_reference rhs typedef NekMatrix< LhsDataType, StandardMatrixTag >::iterator iterator
std::vector<std::pair<int, std::string> > Nektar::NekMeshUtils::Node::GetCADSurfInfoVector ( )
inline

Definition at line 347 of file Node.h.

References CADSurfList, and Nektar::iterator.

348  {
349  std::vector<std::pair<int, std::string> > ret;
350  std::map<int, std::pair<CADSurfSharedPtr,
351  Array<OneD, NekDouble> > >::iterator s;
352  for (s = CADSurfList.begin(); s != CADSurfList.end(); s++)
353  {
354  std::stringstream ss;
355  ss << std::scientific << std::setprecision(8);
356  ss << s->second.second[0] << " " << s->second.second[1];
357  ret.push_back(std::pair<int, std::string>(s->first, ss.str()));
358  }
359  return ret;
360  }
std::map< int, std::pair< CADSurfSharedPtr, Array< OneD, NekDouble > > > CADSurfList
list of cadsurfs the node lies on
Definition: Node.h:409
boost::shared_ptr< CADSurf > CADSurfSharedPtr
Definition: CADSurf.h:172
StandardMatrixTag boost::call_traits< LhsDataType >::const_reference rhs typedef NekMatrix< LhsDataType, StandardMatrixTag >::iterator iterator
std::vector<std::pair<int, CADSurfSharedPtr> > Nektar::NekMeshUtils::Node::GetCADSurfs ( )
inline

Definition at line 291 of file Node.h.

References CADSurfList, and Nektar::iterator.

292  {
293  std::vector<std::pair<int, CADSurfSharedPtr> > lst;
294  std::map<int, std::pair<CADSurfSharedPtr,
295  Array<OneD, NekDouble> > >::iterator s;
296  for (s = CADSurfList.begin(); s != CADSurfList.end(); s++)
297  {
298  lst.push_back(
299  std::pair<int, CADSurfSharedPtr>(s->first, s->second.first));
300  }
301  return lst;
302  }
std::map< int, std::pair< CADSurfSharedPtr, Array< OneD, NekDouble > > > CADSurfList
list of cadsurfs the node lies on
Definition: Node.h:409
boost::shared_ptr< CADSurf > CADSurfSharedPtr
Definition: CADSurf.h:172
StandardMatrixTag boost::call_traits< LhsDataType >::const_reference rhs typedef NekMatrix< LhsDataType, StandardMatrixTag >::iterator iterator
NEKMESHUTILS_EXPORT SpatialDomains::PointGeomSharedPtr Nektar::NekMeshUtils::Node::GetGeom ( int  coordDim)
inline

Generate a SpatialDomains::PointGeom for this node.

Definition at line 181 of file Node.h.

References Nektar::MemoryManager< DataType >::AllocateSharedPtr(), m_id, m_x, m_y, and m_z.

182  {
185  coordDim, m_id, m_x, m_y, m_z);
186 
187  return ret;
188  }
static boost::shared_ptr< DataType > AllocateSharedPtr()
Allocate a shared pointer from the memory pool.
NekDouble m_y
Y-coordinate.
Definition: Node.h:401
int m_id
ID of node.
Definition: Node.h:397
NekDouble m_x
X-coordinate.
Definition: Node.h:399
NekDouble m_z
Z-coordinate.
Definition: Node.h:403
boost::shared_ptr< PointGeom > PointGeomSharedPtr
Definition: Geometry.h:60
NEKMESHUTILS_EXPORT int Nektar::NekMeshUtils::Node::GetID ( void  )
inline

Get the local id;.

Definition at line 87 of file Node.h.

References m_id.

88  {
89  return m_id;
90  }
int m_id
ID of node.
Definition: Node.h:397
NEKMESHUTILS_EXPORT Array<OneD, NekDouble> Nektar::NekMeshUtils::Node::GetLoc ( )
inline

Definition at line 171 of file Node.h.

References m_x, m_y, and m_z.

172  {
173  Array<OneD, NekDouble> out(3);
174  out[0] = m_x;
175  out[1] = m_y;
176  out[2] = m_z;
177  return out;
178  }
NekDouble m_y
Y-coordinate.
Definition: Node.h:401
NekDouble m_x
X-coordinate.
Definition: Node.h:399
NekDouble m_z
Z-coordinate.
Definition: Node.h:403
int Nektar::NekMeshUtils::Node::GetNumCadCurve ( )
inline

Definition at line 304 of file Node.h.

References CADCurveList.

305  {
306  return CADCurveList.size();
307  }
std::map< int, std::pair< CADCurveSharedPtr, NekDouble > > CADCurveList
list of cadcurves the node lies on
Definition: Node.h:406
int Nektar::NekMeshUtils::Node::GetNumCADSurf ( )
inline

Definition at line 309 of file Node.h.

References CADSurfList.

310  {
311  return CADSurfList.size();
312  }
std::map< int, std::pair< CADSurfSharedPtr, Array< OneD, NekDouble > > > CADSurfList
list of cadsurfs the node lies on
Definition: Node.h:409
void Nektar::NekMeshUtils::Node::Move ( Array< OneD, NekDouble l,
int  s,
Array< OneD, NekDouble uv 
)
inline

Definition at line 314 of file Node.h.

References CADSurfList, m_x, m_y, and m_z.

315  {
316  m_x = l[0];
317  m_y = l[1];
318  m_z = l[2];
319  CADSurfSharedPtr su = CADSurfList[s].first;
320  CADSurfList[s] =
321  std::pair<CADSurfSharedPtr, Array<OneD, NekDouble> >(su, uv);
322  }
NekDouble m_y
Y-coordinate.
Definition: Node.h:401
std::map< int, std::pair< CADSurfSharedPtr, Array< OneD, NekDouble > > > CADSurfList
list of cadsurfs the node lies on
Definition: Node.h:409
boost::shared_ptr< CADSurf > CADSurfSharedPtr
Definition: CADSurf.h:172
NekDouble m_x
X-coordinate.
Definition: Node.h:399
NekDouble m_z
Z-coordinate.
Definition: Node.h:403
void Nektar::NekMeshUtils::Node::MoveCurve ( Array< OneD, NekDouble l,
int  s,
NekDouble  t 
)
inline

Definition at line 324 of file Node.h.

References CADCurveList, m_x, m_y, and m_z.

325  {
326  m_x = l[0];
327  m_y = l[1];
328  m_z = l[2];
329  CADCurveSharedPtr cu = CADCurveList[s].first;
330  CADCurveList[s] = std::pair<CADCurveSharedPtr, NekDouble>(cu, t);
331  }
NekDouble m_y
Y-coordinate.
Definition: Node.h:401
NekDouble m_x
X-coordinate.
Definition: Node.h:399
std::map< int, std::pair< CADCurveSharedPtr, NekDouble > > CADCurveList
list of cadcurves the node lies on
Definition: Node.h:406
NekDouble m_z
Z-coordinate.
Definition: Node.h:403
boost::shared_ptr< CADCurve > CADCurveSharedPtr
Definition: CADCurve.h:194
NEKMESHUTILS_EXPORT Node Nektar::NekMeshUtils::Node::operator* ( const Node pSrc) const
inline

Definition at line 113 of file Node.h.

References m_id, m_x, m_y, m_z, and Node().

114  {
115  return Node(m_id, m_x * pSrc.m_x, m_y * pSrc.m_y, m_z * pSrc.m_z);
116  }
NekDouble m_y
Y-coordinate.
Definition: Node.h:401
int m_id
ID of node.
Definition: Node.h:397
NEKMESHUTILS_EXPORT Node()
Copy an existing node.
Definition: Node.h:73
NekDouble m_x
X-coordinate.
Definition: Node.h:399
NekDouble m_z
Z-coordinate.
Definition: Node.h:403
NEKMESHUTILS_EXPORT Node Nektar::NekMeshUtils::Node::operator* ( const NekDouble alpha) const
inline

Definition at line 118 of file Node.h.

References m_id, m_x, m_y, m_z, and Node().

119  {
120  return Node(m_id, alpha * m_x, alpha * m_y, alpha * m_z);
121  }
NekDouble m_y
Y-coordinate.
Definition: Node.h:401
int m_id
ID of node.
Definition: Node.h:397
NEKMESHUTILS_EXPORT Node()
Copy an existing node.
Definition: Node.h:73
NekDouble m_x
X-coordinate.
Definition: Node.h:399
NekDouble m_z
Z-coordinate.
Definition: Node.h:403
NEKMESHUTILS_EXPORT void Nektar::NekMeshUtils::Node::operator*= ( const NekDouble alpha)
inline

Definition at line 135 of file Node.h.

References m_x, m_y, and m_z.

136  {
137  m_x *= alpha;
138  m_y *= alpha;
139  m_z *= alpha;
140  }
NekDouble m_y
Y-coordinate.
Definition: Node.h:401
NekDouble m_x
X-coordinate.
Definition: Node.h:399
NekDouble m_z
Z-coordinate.
Definition: Node.h:403
NEKMESHUTILS_EXPORT Node Nektar::NekMeshUtils::Node::operator+ ( const Node pSrc) const
inline

Definition at line 103 of file Node.h.

References m_id, m_x, m_y, m_z, and Node().

104  {
105  return Node(m_id, m_x + pSrc.m_x, m_y + pSrc.m_y, m_z + pSrc.m_z);
106  }
NekDouble m_y
Y-coordinate.
Definition: Node.h:401
int m_id
ID of node.
Definition: Node.h:397
NEKMESHUTILS_EXPORT Node()
Copy an existing node.
Definition: Node.h:73
NekDouble m_x
X-coordinate.
Definition: Node.h:399
NekDouble m_z
Z-coordinate.
Definition: Node.h:403
NEKMESHUTILS_EXPORT void Nektar::NekMeshUtils::Node::operator+= ( const Node pSrc)
inline

Definition at line 128 of file Node.h.

References m_x, m_y, and m_z.

129  {
130  m_x += pSrc.m_x;
131  m_y += pSrc.m_y;
132  m_z += pSrc.m_z;
133  }
NekDouble m_y
Y-coordinate.
Definition: Node.h:401
NekDouble m_x
X-coordinate.
Definition: Node.h:399
NekDouble m_z
Z-coordinate.
Definition: Node.h:403
NEKMESHUTILS_EXPORT Node Nektar::NekMeshUtils::Node::operator- ( const Node pSrc) const
inline

Definition at line 108 of file Node.h.

References m_id, m_x, m_y, m_z, and Node().

109  {
110  return Node(m_id, m_x - pSrc.m_x, m_y - pSrc.m_y, m_z - pSrc.m_z);
111  }
NekDouble m_y
Y-coordinate.
Definition: Node.h:401
int m_id
ID of node.
Definition: Node.h:397
NEKMESHUTILS_EXPORT Node()
Copy an existing node.
Definition: Node.h:73
NekDouble m_x
X-coordinate.
Definition: Node.h:399
NekDouble m_z
Z-coordinate.
Definition: Node.h:403
NEKMESHUTILS_EXPORT Node Nektar::NekMeshUtils::Node::operator/ ( const NekDouble alpha) const
inline

Definition at line 123 of file Node.h.

References m_id, m_x, m_y, m_z, and Node().

124  {
125  return Node(m_id, m_x / alpha, m_y / alpha, m_z / alpha);
126  }
NekDouble m_y
Y-coordinate.
Definition: Node.h:401
int m_id
ID of node.
Definition: Node.h:397
NEKMESHUTILS_EXPORT Node()
Copy an existing node.
Definition: Node.h:73
NekDouble m_x
X-coordinate.
Definition: Node.h:399
NekDouble m_z
Z-coordinate.
Definition: Node.h:403
NEKMESHUTILS_EXPORT void Nektar::NekMeshUtils::Node::operator/= ( const NekDouble alpha)
inline

Definition at line 142 of file Node.h.

References m_x, m_y, and m_z.

143  {
144  m_x /= alpha;
145  m_y /= alpha;
146  m_z /= alpha;
147  }
NekDouble m_y
Y-coordinate.
Definition: Node.h:401
NekDouble m_x
X-coordinate.
Definition: Node.h:399
NekDouble m_z
Z-coordinate.
Definition: Node.h:403
NEKMESHUTILS_EXPORT bool Nektar::NekMeshUtils::Node::operator< ( const Node pSrc)
inline

Define node ordering based on ID.

Definition at line 93 of file Node.h.

References m_id.

94  {
95  return (m_id < pSrc.m_id);
96  }
int m_id
ID of node.
Definition: Node.h:397
NEKMESHUTILS_EXPORT bool Nektar::NekMeshUtils::Node::operator== ( const Node pSrc)
inline

Define node equality based on coordinate.

Definition at line 98 of file Node.h.

References m_x, m_y, and m_z.

99  {
100  return m_x == pSrc.m_x && m_y == pSrc.m_y && m_z == pSrc.m_z;
101  }
NekDouble m_y
Y-coordinate.
Definition: Node.h:401
NekDouble m_x
X-coordinate.
Definition: Node.h:399
NekDouble m_z
Z-coordinate.
Definition: Node.h:403
void Nektar::NekMeshUtils::Node::SetCADCurve ( int  i,
CADCurveSharedPtr  c,
NekDouble  t 
)
inline

Definition at line 232 of file Node.h.

References CADCurveList.

233  {
234  CADCurveList[i] = std::pair<CADCurveSharedPtr, NekDouble>(c, t);
235  }
std::map< int, std::pair< CADCurveSharedPtr, NekDouble > > CADCurveList
list of cadcurves the node lies on
Definition: Node.h:406
void Nektar::NekMeshUtils::Node::SetCADSurf ( int  i,
CADSurfSharedPtr  s,
Array< OneD, NekDouble uv 
)
inline

Definition at line 237 of file Node.h.

References CADSurfList.

238  {
239  CADSurfList[i] =
240  std::pair<CADSurfSharedPtr, Array<OneD, NekDouble> >(s, uv);
241  }
std::map< int, std::pair< CADSurfSharedPtr, Array< OneD, NekDouble > > > CADSurfList
list of cadsurfs the node lies on
Definition: Node.h:409
NEKMESHUTILS_EXPORT void Nektar::NekMeshUtils::Node::SetID ( int  pId)
inline

Reset the local id;.

Definition at line 81 of file Node.h.

References m_id.

82  {
83  m_id = pId;
84  }
int m_id
ID of node.
Definition: Node.h:397

Member Data Documentation

std::map<int, std::pair<CADCurveSharedPtr, NekDouble> > Nektar::NekMeshUtils::Node::CADCurveList

list of cadcurves the node lies on

Definition at line 406 of file Node.h.

Referenced by GetCADCurve(), GetCADCurveInfo(), GetCADCurveInfoVector(), GetCADCurves(), GetNumCadCurve(), MoveCurve(), and SetCADCurve().

std::map<int, std::pair<CADSurfSharedPtr, Array<OneD, NekDouble> > > Nektar::NekMeshUtils::Node::CADSurfList

list of cadsurfs the node lies on

Definition at line 409 of file Node.h.

Referenced by GetCADSurf(), GetCADSurfInfo(), GetCADSurfInfoVector(), GetCADSurfs(), GetNumCADSurf(), Move(), and SetCADSurf().

SpatialDomains::PointGeomSharedPtr Nektar::NekMeshUtils::Node::m_geom
private

Definition at line 412 of file Node.h.

int Nektar::NekMeshUtils::Node::m_id
NekDouble Nektar::NekMeshUtils::Node::m_x
NekDouble Nektar::NekMeshUtils::Node::m_y
NekDouble Nektar::NekMeshUtils::Node::m_z