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

base class for CAD curves. More...

#include <CADCurve.h>

Inheritance diagram for Nektar::NekMeshUtils::CADCurve:
Inheritance graph
[legend]
Collaboration diagram for Nektar::NekMeshUtils::CADCurve:
Collaboration graph
[legend]

Public Member Functions

 CADCurve ()
 Default constructor. More...
 
 ~CADCurve ()
 
virtual Array< OneD, NekDoubleGetBounds ()=0
 Returns the minimum and maximum parametric coords t of the curve. More...
 
virtual NekDouble Length (NekDouble ti, NekDouble tf)=0
 Calculates the arclength between the two paremetric points ti and tf. ti must be less than tf. More...
 
virtual Array< OneD, NekDoubleP (NekDouble t)=0
 Gets the location (x,y,z) in an array out of the curve at point t. More...
 
virtual Array< OneD, NekDoubleD2 (NekDouble t)=0
 Gets the second derivatives at t. More...
 
virtual NekDouble Curvature (NekDouble t)=0
 
virtual NekDouble tAtArcLength (NekDouble s)=0
 Calculates the parametric coordinate and arclength location defined by s. More...
 
virtual Array< OneD, NekDoubleGetMinMax ()=0
 Gets the start and end of the curve. More...
 
void SetAdjSurf (std::pair< CADSurfSharedPtr, CADOrientation::Orientation > i)
 set the ids of the surfaces either side of the curve More...
 
std::vector< std::pair
< CADSurfSharedPtr,
CADOrientation::Orientation > > 
GetAdjSurf ()
 
NekDouble GetTotLength ()
 
void SetVert (std::vector< CADVertSharedPtr > &falVert)
 
std::vector< CADVertSharedPtrGetVertex ()
 
virtual NekDouble loct (Array< OneD, NekDouble > xyz)=0
 
CADOrientation::Orientation GetOrienationWRT (int surf)
 
virtual Array< OneD, NekDoubleNormalWRT (NekDouble t, int surf)=0
 
virtual Array< OneD, NekDoubleN (NekDouble t)=0
 
- Public Member Functions inherited from Nektar::NekMeshUtils::CADObject
 CADObject ()
 Default constructor. More...
 
virtual ~CADObject ()
 
int GetId ()
 Return ID of the vertex. More...
 
CADType::cadType GetType ()
 
virtual CADOrientation::Orientation Orientation ()
 

Protected Attributes

NekDouble m_length
 Length of edge. More...
 
std::vector< std::pair
< CADSurfSharedPtr,
CADOrientation::Orientation > > 
m_adjSurfs
 List of surfaces which this curve belongs to. More...
 
std::vector< CADVertSharedPtrm_mainVerts
 list of end vertices 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...
 

Friends

class MemoryManager< CADCurve >
 

Detailed Description

base class for CAD curves.

Definition at line 52 of file CADCurve.h.

Constructor & Destructor Documentation

Nektar::NekMeshUtils::CADCurve::CADCurve ( )
inline

Default constructor.

Definition at line 60 of file CADCurve.h.

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

61  {
63  }
CADType::cadType m_type
type of the cad object
Definition: CADObject.h:107
Nektar::NekMeshUtils::CADCurve::~CADCurve ( )
inline

Definition at line 65 of file CADCurve.h.

66  {
67  }

Member Function Documentation

virtual NekDouble Nektar::NekMeshUtils::CADCurve::Curvature ( NekDouble  t)
pure virtual
virtual Array<OneD, NekDouble> Nektar::NekMeshUtils::CADCurve::D2 ( NekDouble  t)
pure virtual

Gets the second derivatives at t.

Implemented in Nektar::NekMeshUtils::CADCurveOCE.

std::vector<std::pair<CADSurfSharedPtr, CADOrientation::Orientation> > Nektar::NekMeshUtils::CADCurve::GetAdjSurf ( )
inline

Definition at line 131 of file CADCurve.h.

References m_adjSurfs.

132  {
133  return m_adjSurfs;
134  }
std::vector< std::pair< CADSurfSharedPtr, CADOrientation::Orientation > > m_adjSurfs
List of surfaces which this curve belongs to.
Definition: CADCurve.h:189
virtual Array<OneD, NekDouble> Nektar::NekMeshUtils::CADCurve::GetBounds ( )
pure virtual

Returns the minimum and maximum parametric coords t of the curve.

Returns
Array of two entries, min and max parametric coordinate.

Implemented in Nektar::NekMeshUtils::CADCurveOCE.

virtual Array<OneD, NekDouble> Nektar::NekMeshUtils::CADCurve::GetMinMax ( )
pure virtual

Gets the start and end of the curve.

Returns
Array with 6 entries of endpoints x1,y1,z1,x2,y2,z2.

Implemented in Nektar::NekMeshUtils::CADCurveOCE.

CADOrientation::Orientation Nektar::NekMeshUtils::CADCurve::GetOrienationWRT ( int  surf)
inline

Definition at line 166 of file CADCurve.h.

References ASSERTL0, Nektar::NekMeshUtils::CADOrientation::eUnknown, and m_adjSurfs.

167  {
168  for(int i = 0; i < m_adjSurfs.size(); i++)
169  {
170  if(m_adjSurfs[i].first->GetId() == surf)
171  {
172  return m_adjSurfs[i].second;
173  }
174  }
175 
176  ASSERTL0(false,"surf not in adjecency list");
178  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:198
std::vector< std::pair< CADSurfSharedPtr, CADOrientation::Orientation > > m_adjSurfs
List of surfaces which this curve belongs to.
Definition: CADCurve.h:189
NekDouble Nektar::NekMeshUtils::CADCurve::GetTotLength ( )
inline

Definition at line 139 of file CADCurve.h.

References m_length.

140  {
141  return m_length;
142  }
NekDouble m_length
Length of edge.
Definition: CADCurve.h:187
std::vector<CADVertSharedPtr> Nektar::NekMeshUtils::CADCurve::GetVertex ( )
inline

Definition at line 156 of file CADCurve.h.

References m_mainVerts.

157  {
158  return m_mainVerts;
159  }
std::vector< CADVertSharedPtr > m_mainVerts
list of end vertices
Definition: CADCurve.h:191
virtual NekDouble Nektar::NekMeshUtils::CADCurve::Length ( NekDouble  ti,
NekDouble  tf 
)
pure virtual

Calculates the arclength between the two paremetric points ti and tf. ti must be less than tf.

Parameters
tiFirst parametric coordinate.
tfSecond parametric coordinate.
Returns
Arc length between ti and tf.

Implemented in Nektar::NekMeshUtils::CADCurveOCE.

virtual NekDouble Nektar::NekMeshUtils::CADCurve::loct ( Array< OneD, NekDouble xyz)
pure virtual
virtual Array<OneD, NekDouble> Nektar::NekMeshUtils::CADCurve::N ( NekDouble  t)
pure virtual
virtual Array<OneD, NekDouble> Nektar::NekMeshUtils::CADCurve::NormalWRT ( NekDouble  t,
int  surf 
)
pure virtual
virtual Array<OneD, NekDouble> Nektar::NekMeshUtils::CADCurve::P ( NekDouble  t)
pure virtual

Gets the location (x,y,z) in an array out of the curve at point t.

Parameters
tParametric coordinate
Returns
Array of x,y,z

Implemented in Nektar::NekMeshUtils::CADCurveOCE.

void Nektar::NekMeshUtils::CADCurve::SetAdjSurf ( std::pair< CADSurfSharedPtr, CADOrientation::Orientation i)
inline

set the ids of the surfaces either side of the curve

Definition at line 123 of file CADCurve.h.

References m_adjSurfs.

124  {
125  m_adjSurfs.push_back(i);
126  }
std::vector< std::pair< CADSurfSharedPtr, CADOrientation::Orientation > > m_adjSurfs
List of surfaces which this curve belongs to.
Definition: CADCurve.h:189
void Nektar::NekMeshUtils::CADCurve::SetVert ( std::vector< CADVertSharedPtr > &  falVert)
inline

Definition at line 147 of file CADCurve.h.

References m_mainVerts.

148  {
149  m_mainVerts = falVert;
150  }
std::vector< CADVertSharedPtr > m_mainVerts
list of end vertices
Definition: CADCurve.h:191
virtual NekDouble Nektar::NekMeshUtils::CADCurve::tAtArcLength ( NekDouble  s)
pure virtual

Calculates the parametric coordinate and arclength location defined by s.

Parameters
sArclength location.
Returns
Calculated parametric coordinate.
Todo:
This really needs improving for accuracy.

Implemented in Nektar::NekMeshUtils::CADCurveOCE.

Friends And Related Function Documentation

friend class MemoryManager< CADCurve >
friend

Definition at line 55 of file CADCurve.h.

Member Data Documentation

std::vector<std::pair<CADSurfSharedPtr, CADOrientation::Orientation> > Nektar::NekMeshUtils::CADCurve::m_adjSurfs
protected

List of surfaces which this curve belongs to.

Definition at line 189 of file CADCurve.h.

Referenced by GetAdjSurf(), GetOrienationWRT(), and SetAdjSurf().

NekDouble Nektar::NekMeshUtils::CADCurve::m_length
protected

Length of edge.

Definition at line 187 of file CADCurve.h.

Referenced by GetTotLength(), and Nektar::NekMeshUtils::CADCurveOCE::Initialise().

std::vector<CADVertSharedPtr> Nektar::NekMeshUtils::CADCurve::m_mainVerts
protected

list of end vertices

Definition at line 191 of file CADCurve.h.

Referenced by GetVertex(), and SetVert().