Nektar++
Public Member Functions | Protected Attributes | Friends | List of all members
Nektar::NekMeshUtils::CADVert Class Referenceabstract

base class for CAD verticies. More...

#include <CADVert.h>

Inheritance diagram for Nektar::NekMeshUtils::CADVert:
[legend]

Public Member Functions

 CADVert ()
 Default constructor. More...
 
virtual ~CADVert ()
 
Array< OneD, NekDoubleGetLoc ()
 Get x,y,z location of the vertex. More...
 
NodeSharedPtr GetNode ()
 returns a node object of the cad vertex More...
 
void SetDegen (int s, CADSurfSharedPtr su, NekDouble u, NekDouble v)
 if the vertex is degenerate manually set uv for that surface More...
 
int IsDegen ()
 query is degenerate More...
 
virtual NekDouble DistanceTo (Array< OneD, NekDouble > l)=0
 Calcuate the distance to a vertex from a point l(x,y,z) More...
 
void AddAdjCurve (CADCurveSharedPtr c)
 
std::vector< CADCurveSharedPtrGetAdjCurves ()
 Get list of CAD curves which are bound by this vertex. More...
 
- Public Member Functions inherited from Nektar::NekMeshUtils::CADObject
 CADObject ()
 Default constructor. More...
 
virtual ~CADObject ()
 
int GetId ()
 Return ID of the CAD object. More...
 
CADType::cadType GetType ()
 Get the type of the CAD object. More...
 
virtual CADOrientation::Orientation Orientation ()
 Get the Orientation of the CAD object. More...
 
void SetName (std::string i)
 Give the CAD object a string name. More...
 
std::string GetName ()
 Get the name of a CAD object. More...
 

Protected Attributes

NodeSharedPtr m_node
 mesh convert object of vert More...
 
bool degen
 degen marker More...
 
int degensurf
 degen surface More...
 
std::vector< CADCurveSharedPtrcurves
 adjacent curves More...
 
- Protected Attributes inherited from Nektar::NekMeshUtils::CADObject
int m_id
 ID of the vert. More...
 
CADType::cadType m_type
 type of the cad object More...
 
CADOrientation::Orientation m_orientation
 orientation of the CADObject More...
 
std::string m_name
 string name of the cad More...
 

Friends

class MemoryManager< CADVert >
 

Detailed Description

base class for CAD verticies.

Definition at line 60 of file CADVert.h.

Constructor & Destructor Documentation

◆ CADVert()

Nektar::NekMeshUtils::CADVert::CADVert ( )
inline

Default constructor.

Definition at line 68 of file CADVert.h.

References Nektar::NekMeshUtils::CADType::eVert, and Nektar::NekMeshUtils::CADObject::m_type.

69  {
71  }
CADType::cadType m_type
type of the cad object
Definition: CADObject.h:126

◆ ~CADVert()

virtual Nektar::NekMeshUtils::CADVert::~CADVert ( )
inlinevirtual

Definition at line 73 of file CADVert.h.

References GetLoc().

73 {};

Member Function Documentation

◆ AddAdjCurve()

void Nektar::NekMeshUtils::CADVert::AddAdjCurve ( CADCurveSharedPtr  c)
inline

Definition at line 113 of file CADVert.h.

References curves.

114  {
115  curves.push_back(c);
116  }
std::vector< CADCurveSharedPtr > curves
adjacent curves
Definition: CADVert.h:134

◆ DistanceTo()

NekDouble Nektar::NekMeshUtils::CADVert::DistanceTo ( Array< OneD, NekDouble l)
pure virtual

Calcuate the distance to a vertex from a point l(x,y,z)

Implemented in Nektar::NekMeshUtils::CADVertOCE, and Nektar::NekMeshUtils::CADVertCFI.

Definition at line 63 of file CADVert.cpp.

Referenced by IsDegen().

64 {
65  return sqrt((m_node->m_x - xyz[0])*(m_node->m_x - xyz[0]) +
66  (m_node->m_y - xyz[1])*(m_node->m_y - xyz[1]) +
67  (m_node->m_z - xyz[2])*(m_node->m_z - xyz[2]));
68 }
NodeSharedPtr m_node
mesh convert object of vert
Definition: CADVert.h:128

◆ GetAdjCurves()

std::vector<CADCurveSharedPtr> Nektar::NekMeshUtils::CADVert::GetAdjCurves ( )
inline

Get list of CAD curves which are bound by this vertex.

Definition at line 121 of file CADVert.h.

References curves.

122  {
123  return curves;
124  }
std::vector< CADCurveSharedPtr > curves
adjacent curves
Definition: CADVert.h:134

◆ GetLoc()

Array< OneD, NekDouble > Nektar::NekMeshUtils::CADVert::GetLoc ( )

Get x,y,z location of the vertex.

Definition at line 54 of file CADVert.cpp.

Referenced by ~CADVert().

55 {
56  Array<OneD, NekDouble> out(3);
57  out[0] = m_node->m_x;
58  out[1] = m_node->m_y;
59  out[2] = m_node->m_z;
60  return out;
61 }
NodeSharedPtr m_node
mesh convert object of vert
Definition: CADVert.h:128

◆ GetNode()

NodeSharedPtr Nektar::NekMeshUtils::CADVert::GetNode ( )
inline

returns a node object of the cad vertex

Definition at line 83 of file CADVert.h.

References m_node, and SetDegen().

84  {
85  return m_node;
86  }
NodeSharedPtr m_node
mesh convert object of vert
Definition: CADVert.h:128

◆ IsDegen()

int Nektar::NekMeshUtils::CADVert::IsDegen ( )
inline

query is degenerate

Definition at line 96 of file CADVert.h.

References degen, degensurf, and DistanceTo().

97  {
98  if (degen)
99  {
100  return degensurf;
101  }
102  else
103  {
104  return -1;
105  }
106  }
int degensurf
degen surface
Definition: CADVert.h:132
bool degen
degen marker
Definition: CADVert.h:130

◆ SetDegen()

void Nektar::NekMeshUtils::CADVert::SetDegen ( int  s,
CADSurfSharedPtr  su,
NekDouble  u,
NekDouble  v 
)

if the vertex is degenerate manually set uv for that surface

Definition at line 44 of file CADVert.cpp.

Referenced by GetNode().

45 {
46  degen = true;
47  degensurf = s;
48  Array<OneD, NekDouble> uv(2);
49  uv[0] = u;
50  uv[1] = v;
51  m_node->SetCADSurf(su, uv);
52 }
NodeSharedPtr m_node
mesh convert object of vert
Definition: CADVert.h:128
int degensurf
degen surface
Definition: CADVert.h:132
bool degen
degen marker
Definition: CADVert.h:130

Friends And Related Function Documentation

◆ MemoryManager< CADVert >

friend class MemoryManager< CADVert >
friend

Definition at line 63 of file CADVert.h.

Member Data Documentation

◆ curves

std::vector<CADCurveSharedPtr> Nektar::NekMeshUtils::CADVert::curves
protected

adjacent curves

Definition at line 134 of file CADVert.h.

Referenced by AddAdjCurve(), and GetAdjCurves().

◆ degen

bool Nektar::NekMeshUtils::CADVert::degen
protected

degen marker

Definition at line 130 of file CADVert.h.

Referenced by IsDegen().

◆ degensurf

int Nektar::NekMeshUtils::CADVert::degensurf
protected

degen surface

Definition at line 132 of file CADVert.h.

Referenced by IsDegen().

◆ m_node

NodeSharedPtr Nektar::NekMeshUtils::CADVert::m_node
protected

mesh convert object of vert

Definition at line 128 of file CADVert.h.

Referenced by GetNode().