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

#include <ProcessLoadCAD.h>

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

Public Member Functions

 ProcessLoadCAD (MeshSharedPtr m)
 
virtual ~ProcessLoadCAD ()
 
virtual void Process ()
 
- Public Member Functions inherited from Nektar::NekMeshUtils::ProcessModule
NEKMESHUTILS_EXPORT ProcessModule (MeshSharedPtr p_m)
 
- Public Member Functions inherited from Nektar::NekMeshUtils::Module
NEKMESHUTILS_EXPORT Module (MeshSharedPtr p_m)
 
NEKMESHUTILS_EXPORT void RegisterConfig (std::string key, std::string value)
 Register a configuration option with a module. More...
 
NEKMESHUTILS_EXPORT void PrintConfig ()
 Print out all configuration options for a module. More...
 
NEKMESHUTILS_EXPORT void SetDefaults ()
 Sets default configuration options for those which have not been set. More...
 
NEKMESHUTILS_EXPORT MeshSharedPtr GetMesh ()
 
virtual NEKMESHUTILS_EXPORT void ProcessVertices ()
 Extract element vertices. More...
 
virtual NEKMESHUTILS_EXPORT void ProcessEdges (bool ReprocessEdges=true)
 Extract element edges. More...
 
virtual NEKMESHUTILS_EXPORT void ProcessFaces (bool ReprocessFaces=true)
 Extract element faces. More...
 
virtual NEKMESHUTILS_EXPORT void ProcessElements ()
 Generate element IDs. More...
 
virtual NEKMESHUTILS_EXPORT void ProcessComposites ()
 Generate composites. More...
 
virtual NEKMESHUTILS_EXPORT void ClearElementLinks ()
 

Static Public Member Functions

static boost::shared_ptr< Modulecreate (MeshSharedPtr m)
 Creates an instance of this class. More...
 

Static Public Attributes

static ModuleKey className
 

Additional Inherited Members

- Protected Member Functions inherited from Nektar::NekMeshUtils::Module
NEKMESHUTILS_EXPORT void ReorderPrisms (PerMap &perFaces)
 Reorder node IDs so that prisms and tetrahedra are aligned correctly. More...
 
NEKMESHUTILS_EXPORT void PrismLines (int prism, PerMap &perFaces, std::set< int > &prismsDone, std::vector< ElementSharedPtr > &line)
 
- Protected Attributes inherited from Nektar::NekMeshUtils::Module
MeshSharedPtr m_mesh
 Mesh object. More...
 
std::map< std::string,
ConfigOption
m_config
 List of configuration values. More...
 

Detailed Description

Definition at line 46 of file ProcessLoadCAD.h.

Constructor & Destructor Documentation

Nektar::NekMeshUtils::ProcessLoadCAD::ProcessLoadCAD ( MeshSharedPtr  m)

Definition at line 50 of file ProcessLoadCAD.cpp.

References Nektar::NekMeshUtils::Module::m_config.

50  : ProcessModule(m)
51 {
52  m_config["filename"] =
53  ConfigOption(false, "", "Generate prisms on these surfs");
54  m_config["2D"] =
55  ConfigOption(true, "", "allow 2d loading");
56  m_config["NACA"] =
57  ConfigOption(false, "", "naca domain");
58 }
NEKMESHUTILS_EXPORT ProcessModule(MeshSharedPtr p_m)
std::map< std::string, ConfigOption > m_config
List of configuration values.
Nektar::NekMeshUtils::ProcessLoadCAD::~ProcessLoadCAD ( )
virtual

Definition at line 60 of file ProcessLoadCAD.cpp.

61 {
62 }

Member Function Documentation

static boost::shared_ptr<Module> Nektar::NekMeshUtils::ProcessLoadCAD::create ( MeshSharedPtr  m)
inlinestatic

Creates an instance of this class.

Definition at line 50 of file ProcessLoadCAD.h.

References Nektar::MemoryManager< DataType >::AllocateSharedPtr().

51  {
53  }
static boost::shared_ptr< DataType > AllocateSharedPtr()
Allocate a shared pointer from the memory pool.
void Nektar::NekMeshUtils::ProcessLoadCAD::Process ( )
virtual

Implements Nektar::NekMeshUtils::Module.

Definition at line 64 of file ProcessLoadCAD.cpp.

References ASSERTL0, Nektar::LibUtilities::NekFactory< tKey, tBase, >::CreateInstance(), Nektar::NekMeshUtils::GetEngineFactory(), Nektar::NekMeshUtils::Module::m_config, and Nektar::NekMeshUtils::Module::m_mesh.

65 {
66  string name = m_config["filename"].as<string>();
67 
68  if (m_mesh->m_verbose)
69  {
70  cout << "Loading CAD for " << name << endl;
71  }
72 
73  m_mesh->m_cad = GetEngineFactory().CreateInstance("oce",name);
74 
75  if(m_config["2D"].beenSet)
76  {
77  m_mesh->m_cad->Set2D();
78  }
79 
80  if(m_config["NACA"].beenSet)
81  {
82  m_mesh->m_cad->SetNACA(m_config["NACA"].as<string>());
83  }
84 
85  ASSERTL0(m_mesh->m_cad->LoadCAD(), "Failed to load CAD");
86 
87  if (m_mesh->m_verbose)
88  {
89  m_mesh->m_cad->Report();
90  }
91 }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:198
tBaseSharedPtr CreateInstance(tKey idKey BOOST_PP_COMMA_IF(MAX_PARAM) BOOST_PP_ENUM_BINARY_PARAMS(MAX_PARAM, tParam, x))
Create an instance of the class referred to by idKey.
Definition: NekFactory.hpp:162
std::map< std::string, ConfigOption > m_config
List of configuration values.
EngineFactory & GetEngineFactory()
Definition: CADSystem.cpp:48

Member Data Documentation

ModuleKey Nektar::NekMeshUtils::ProcessLoadCAD::className
static
Initial value:

Definition at line 54 of file ProcessLoadCAD.h.