Nektar++
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | Friends | List of all members
Nektar::SpatialDomains::CADVert Class Referenceabstract

base class for CAD verticies. More...

#include <CADVert.h>

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

Public Member Functions

 CADVert ()
 Default constructor.
 
 ~CADVert () override
 
std::array< NekDouble, 3 > GetLoc ()
 Get x,y,z location of the vertex.
 
void SetDegen (int s, CADSurfSharedPtr su, NekDouble u, NekDouble v)
 returns a node object of the cad vertex
 
std::array< NekDouble, 2 > GetDegenUV ()
 parametric location on the degenerate surface, as recorded by SetDegen. Only meaningful when IsDegen() is not -1.
 
int IsDegen ()
 query is degenerate
 
virtual NekDouble DistanceTo (std::array< NekDouble, 3 > l)=0
 Calcuate the distance to a vertex from a point l(x,y,z)
 
void AddAdjCurve (CADCurveSharedPtr c)
 
std::vector< std::weak_ptr< CADCurve > > GetAdjCurves ()
 Get list of CAD curves which are bound by this vertex.
 
- Public Member Functions inherited from Nektar::SpatialDomains::CADObject
 CADObject ()
 Default constructor.
 
virtual ~CADObject ()
 
int GetId ()
 Return ID of the CAD object.
 
CADType::cadType GetType ()
 Get the type of the CAD object.
 
virtual CADOrientation::Orientation Orientation ()
 Get the Orientation of the CAD object.
 
void SetName (std::string i)
 Give the CAD object a string name.
 
std::string GetName ()
 Get the name of a CAD object.
 
void SetLogger (Logger &log)
 Set the logger for this CAD object.
 

Protected Attributes

std::array< NekDouble, 3 > m_loc {{0, 0, 0}}
 mesh convert object of vert
 
bool degen
 degen marker
 
int degensurf
 degen surface
 
std::array< NekDouble, 2 > m_degenUV {{0.0, 0.0}}
 parametric location on the degen surface
 
std::vector< std::weak_ptr< CADCurve > > curves
 adjacent curves
 
- Protected Attributes inherited from Nektar::SpatialDomains::CADObject
int m_id
 ID of the vert.
 
CADType::cadType m_type
 type of the cad object
 
CADOrientation::Orientation m_orientation
 orientation of the CADObject
 
std::string m_name
 string name of the cad
 
Logger m_log
 Logger.
 

Friends

class MemoryManager< CADVert >
 

Detailed Description

base class for CAD verticies.

Definition at line 61 of file CADVert.h.

Constructor & Destructor Documentation

◆ CADVert()

Nektar::SpatialDomains::CADVert::CADVert ( )
inline

Default constructor.

Definition at line 69 of file CADVert.h.

70 {
72 }
CADType::cadType m_type
type of the cad object
Definition CADObject.h:148

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

◆ ~CADVert()

Nektar::SpatialDomains::CADVert::~CADVert ( )
inlineoverride

Definition at line 74 of file CADVert.h.

74{};

Member Function Documentation

◆ AddAdjCurve()

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

Definition at line 123 of file CADVert.h.

124 {
125 curves.push_back(c);
126 }
std::vector< std::weak_ptr< CADCurve > > curves
adjacent curves
Definition CADVert.h:146

References curves.

◆ DistanceTo()

NekDouble CADVert::DistanceTo ( std::array< NekDouble, 3 >  l)
pure virtual

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

Implemented in Nektar::SpatialDomains::CADVertOCE.

Definition at line 59 of file CADVert.cpp.

60{
61 return sqrt((m_loc[0] - xyz[0]) * (m_loc[0] - xyz[0]) +
62 (m_loc[1] - xyz[1]) * (m_loc[1] - xyz[1]) +
63 (m_loc[2] - xyz[2]) * (m_loc[2] - xyz[2]));
64}
std::array< NekDouble, 3 > m_loc
mesh convert object of vert
Definition CADVert.h:138
scalarT< T > sqrt(scalarT< T > in)
Definition scalar.hpp:289

References m_loc, and tinysimd::sqrt().

◆ GetAdjCurves()

std::vector< std::weak_ptr< CADCurve > > Nektar::SpatialDomains::CADVert::GetAdjCurves ( )
inline

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

Definition at line 131 of file CADVert.h.

132 {
133 return curves;
134 }

References curves.

◆ GetDegenUV()

std::array< NekDouble, 2 > Nektar::SpatialDomains::CADVert::GetDegenUV ( )
inline

parametric location on the degenerate surface, as recorded by SetDegen. Only meaningful when IsDegen() is not -1.

Definition at line 98 of file CADVert.h.

99 {
100 return m_degenUV;
101 }
std::array< NekDouble, 2 > m_degenUV
parametric location on the degen surface
Definition CADVert.h:144

References m_degenUV.

◆ GetLoc()

std::array< NekDouble, 3 > CADVert::GetLoc ( )

Get x,y,z location of the vertex.

Definition at line 54 of file CADVert.cpp.

55{
56 return m_loc;
57}

References m_loc.

◆ IsDegen()

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

query is degenerate

Definition at line 106 of file CADVert.h.

107 {
108 if (degen)
109 {
110 return degensurf;
111 }
112 else
113 {
114 return -1;
115 }
116 }
int degensurf
degen surface
Definition CADVert.h:142

References degen, and degensurf.

◆ SetDegen()

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

returns a node object of the cad vertex

if the vertex is degenerate manually set uv for that surface

Definition at line 41 of file CADVert.cpp.

44{
45 degen = true;
46 degensurf = s;
47 // locuv is ill-conditioned at a collapsed point, so the parametric
48 // location is recorded here for the mesher to use instead of projecting.
49 // The old NekMesh CADVert pushed this straight onto its mesh node; the
50 // vertex no longer owns one, so it is stored and fetched via GetDegenUV.
51 m_degenUV = {u, v};
52}

References degen, degensurf, and m_degenUV.

Friends And Related Symbol Documentation

◆ MemoryManager< CADVert >

friend class MemoryManager< CADVert >
friend

Definition at line 153 of file CADVert.h.

Member Data Documentation

◆ curves

std::vector<std::weak_ptr<CADCurve> > Nektar::SpatialDomains::CADVert::curves
protected

adjacent curves

Definition at line 146 of file CADVert.h.

Referenced by AddAdjCurve(), and GetAdjCurves().

◆ degen

bool Nektar::SpatialDomains::CADVert::degen
protected

degen marker

Definition at line 140 of file CADVert.h.

Referenced by Nektar::SpatialDomains::CADVertOCE::Initialise(), IsDegen(), and SetDegen().

◆ degensurf

int Nektar::SpatialDomains::CADVert::degensurf
protected

degen surface

Definition at line 142 of file CADVert.h.

Referenced by IsDegen(), and SetDegen().

◆ m_degenUV

std::array<NekDouble, 2> Nektar::SpatialDomains::CADVert::m_degenUV {{0.0, 0.0}}
protected

parametric location on the degen surface

Definition at line 144 of file CADVert.h.

144{{0.0, 0.0}};

Referenced by GetDegenUV(), and SetDegen().

◆ m_loc

std::array<NekDouble, 3> Nektar::SpatialDomains::CADVert::m_loc {{0, 0, 0}}
protected

mesh convert object of vert

Definition at line 138 of file CADVert.h.

138{{0, 0, 0}};

Referenced by DistanceTo(), GetLoc(), and Nektar::SpatialDomains::CADVertOCE::Initialise().