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

Base class for CAD interface system. More...

#include <CADSystem.h>

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

Classes

struct  EdgeLoop
 struct which descibes a collection of cad edges which are a loop on the cad surface More...
 

Public Types

typedef boost::shared_ptr
< EdgeLoop
EdgeLoopSharedPtr
 

Public Member Functions

 CADSystem (std::string name)
 Default constructor. More...
 
 ~CADSystem ()
 
std::string GetName ()
 Return the name of the CAD system. More...
 
void Set2D ()
 
bool Is2D ()
 
void SetNACA (std::string i)
 
virtual bool LoadCAD ()=0
 Initialises CAD and makes surface, curve and vertex maps. More...
 
void Report ()
 Reports basic properties to screen. More...
 
virtual Array< OneD, NekDoubleGetBoundingBox ()=0
 Returns bounding box of the domain. More...
 
int GetNumSurf ()
 Get the number of surfaces. More...
 
int GetNumCurve ()
 Get the number of curves. More...
 
CADCurveSharedPtr GetCurve (int i)
 Gets a curve from the map. More...
 
CADSurfSharedPtr GetSurf (int i)
 Gets a surface from the map. More...
 
std::map< int, CADVertSharedPtrGetVerts ()
 Gets map of all vertices. More...
 
int GetNumVerts ()
 Gets number of vertices. More...
 

Protected Attributes

std::string m_name
 Name of cad file. More...
 
std::map< int, CADCurveSharedPtrm_curves
 Map of curves. More...
 
std::map< int, CADSurfSharedPtrm_surfs
 Map of surfaces. More...
 
std::map< int, CADVertSharedPtrm_verts
 Map of vertices. More...
 
bool m_2d
 
std::string m_naca
 

Friends

class MemoryManager< CADSystem >
 

Detailed Description

Base class for CAD interface system.

A class which can load and interact with CAD for Nektar++. This class contains maps to subclasses surface and curves.

Definition at line 69 of file CADSystem.h.

Member Typedef Documentation

Definition at line 86 of file CADSystem.h.

Constructor & Destructor Documentation

Nektar::NekMeshUtils::CADSystem::CADSystem ( std::string  name)
inline

Default constructor.

Definition at line 91 of file CADSystem.h.

References m_2d.

91  : m_name(name)
92  {
93  m_2d = false;
94  }
std::string m_name
Name of cad file.
Definition: CADSystem.h:206
Nektar::NekMeshUtils::CADSystem::~CADSystem ( )
inline

Definition at line 96 of file CADSystem.h.

97  {
98  }

Member Function Documentation

virtual Array<OneD, NekDouble> Nektar::NekMeshUtils::CADSystem::GetBoundingBox ( )
pure virtual

Returns bounding box of the domain.

Gets the bounding box of the domain by considering the start and end points of each curve in the geometry.

Returns
Array with 6 entries: xmin, xmax, ymin, ymax, zmin and zmax.

Implemented in Nektar::NekMeshUtils::CADSystemOCE.

CADCurveSharedPtr Nektar::NekMeshUtils::CADSystem::GetCurve ( int  i)
inline

Gets a curve from the map.

Definition at line 169 of file CADSystem.h.

References ASSERTL0, Nektar::iterator, and m_curves.

170  {
172  ASSERTL0(search != m_curves.end(), "curve does not exist");
173 
174  return search->second;
175  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:198
std::map< int, CADCurveSharedPtr > m_curves
Map of curves.
Definition: CADSystem.h:208
StandardMatrixTag boost::call_traits< LhsDataType >::const_reference rhs typedef NekMatrix< LhsDataType, StandardMatrixTag >::iterator iterator
std::string Nektar::NekMeshUtils::CADSystem::GetName ( )
inline

Return the name of the CAD system.

Definition at line 103 of file CADSystem.h.

References m_name.

104  {
105  return m_name;
106  }
std::string m_name
Name of cad file.
Definition: CADSystem.h:206
int Nektar::NekMeshUtils::CADSystem::GetNumCurve ( )
inline

Get the number of curves.

Definition at line 161 of file CADSystem.h.

References m_curves.

162  {
163  return m_curves.size();
164  }
std::map< int, CADCurveSharedPtr > m_curves
Map of curves.
Definition: CADSystem.h:208
int Nektar::NekMeshUtils::CADSystem::GetNumSurf ( )
inline

Get the number of surfaces.

Definition at line 153 of file CADSystem.h.

References m_surfs.

154  {
155  return m_surfs.size();
156  }
std::map< int, CADSurfSharedPtr > m_surfs
Map of surfaces.
Definition: CADSystem.h:210
int Nektar::NekMeshUtils::CADSystem::GetNumVerts ( )
inline

Gets number of vertices.

Definition at line 199 of file CADSystem.h.

References m_verts.

200  {
201  return m_verts.size();
202  }
std::map< int, CADVertSharedPtr > m_verts
Map of vertices.
Definition: CADSystem.h:212
CADSurfSharedPtr Nektar::NekMeshUtils::CADSystem::GetSurf ( int  i)
inline

Gets a surface from the map.

Definition at line 180 of file CADSystem.h.

References ASSERTL0, Nektar::iterator, and m_surfs.

181  {
183  ASSERTL0(search != m_surfs.end(), "surface does not exist");
184 
185  return search->second;
186  }
#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, CADSurfSharedPtr > m_surfs
Map of surfaces.
Definition: CADSystem.h:210
std::map<int, CADVertSharedPtr> Nektar::NekMeshUtils::CADSystem::GetVerts ( )
inline

Gets map of all vertices.

Definition at line 191 of file CADSystem.h.

References m_verts.

192  {
193  return m_verts;
194  }
std::map< int, CADVertSharedPtr > m_verts
Map of vertices.
Definition: CADSystem.h:212
bool Nektar::NekMeshUtils::CADSystem::Is2D ( )
inline

Definition at line 113 of file CADSystem.h.

References m_2d.

114  {
115  return m_2d;
116  }
virtual bool Nektar::NekMeshUtils::CADSystem::LoadCAD ( )
pure virtual

Initialises CAD and makes surface, curve and vertex maps.

Returns
true if completed successfully

Implemented in Nektar::NekMeshUtils::CADSystemOCE.

void Nektar::NekMeshUtils::CADSystem::Report ( )
inline

Reports basic properties to screen.

Definition at line 133 of file CADSystem.h.

References m_curves, and m_surfs.

134  {
135  std::cout << std::endl << "CAD report:" << std::endl;
136  std::cout << "\tCAD has: " << m_curves.size() << " curves." << std::endl;
137  std::cout << "\tCAD has: " << m_surfs.size() << " surfaces." << std::endl;
138  }
std::map< int, CADCurveSharedPtr > m_curves
Map of curves.
Definition: CADSystem.h:208
std::map< int, CADSurfSharedPtr > m_surfs
Map of surfaces.
Definition: CADSystem.h:210
void Nektar::NekMeshUtils::CADSystem::Set2D ( )
inline

Definition at line 108 of file CADSystem.h.

References m_2d.

109  {
110  m_2d = true;
111  }
void Nektar::NekMeshUtils::CADSystem::SetNACA ( std::string  i)
inline

Definition at line 118 of file CADSystem.h.

References m_naca.

119  {
120  m_naca = i;
121  }

Friends And Related Function Documentation

friend class MemoryManager< CADSystem >
friend

Definition at line 72 of file CADSystem.h.

Member Data Documentation

bool Nektar::NekMeshUtils::CADSystem::m_2d
protected

Definition at line 214 of file CADSystem.h.

Referenced by CADSystem(), Is2D(), and Set2D().

std::map<int, CADCurveSharedPtr> Nektar::NekMeshUtils::CADSystem::m_curves
protected

Map of curves.

Definition at line 208 of file CADSystem.h.

Referenced by GetCurve(), GetNumCurve(), and Report().

std::string Nektar::NekMeshUtils::CADSystem::m_naca
protected

Definition at line 215 of file CADSystem.h.

Referenced by SetNACA().

std::string Nektar::NekMeshUtils::CADSystem::m_name
protected

Name of cad file.

Definition at line 206 of file CADSystem.h.

Referenced by GetName().

std::map<int, CADSurfSharedPtr> Nektar::NekMeshUtils::CADSystem::m_surfs
protected

Map of surfaces.

Definition at line 210 of file CADSystem.h.

Referenced by GetNumSurf(), GetSurf(), and Report().

std::map<int, CADVertSharedPtr> Nektar::NekMeshUtils::CADSystem::m_verts
protected

Map of vertices.

Definition at line 212 of file CADSystem.h.

Referenced by GetNumVerts(), and GetVerts().