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::ProcessLoadOctree Class Reference

#include <ProcessLoadOctree.h>

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

Public Member Functions

 ProcessLoadOctree (MeshSharedPtr m)
 
virtual ~ProcessLoadOctree ()
 
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 ProcessLoadOctree.h.

Constructor & Destructor Documentation

Nektar::NekMeshUtils::ProcessLoadOctree::ProcessLoadOctree ( MeshSharedPtr  m)

Definition at line 50 of file ProcessLoadOctree.cpp.

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

50  : ProcessModule(m)
51 {
52  m_config["mindel"] =
53  ConfigOption(false, "0", "mindelta.");
54  m_config["maxdel"] =
55  ConfigOption(false, "0", "mindelta.");
56  m_config["eps"] =
57  ConfigOption(false, "0", "mindelta.");
58  m_config["refinement"] =
59  ConfigOption(false, "", "mindelta.");
60  m_config["writeoctree"] =
61  ConfigOption(true, "0", "dump octree as xml mesh");
62 }
NEKMESHUTILS_EXPORT ProcessModule(MeshSharedPtr p_m)
std::map< std::string, ConfigOption > m_config
List of configuration values.
Nektar::NekMeshUtils::ProcessLoadOctree::~ProcessLoadOctree ( )
virtual

Definition at line 64 of file ProcessLoadOctree.cpp.

65 {
66 }

Member Function Documentation

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

Creates an instance of this class.

Definition at line 50 of file ProcessLoadOctree.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::ProcessLoadOctree::Process ( )
virtual

Implements Nektar::NekMeshUtils::Module.

Definition at line 68 of file ProcessLoadOctree.cpp.

References Nektar::MemoryManager< DataType >::AllocateSharedPtr(), ASSERTL0, Nektar::NekMeshUtils::Module::m_config, and Nektar::NekMeshUtils::Module::m_mesh.

69 {
70  NekDouble minDelta, maxDelta, eps;
71 
72  minDelta = m_config["mindel"].as<NekDouble>();
73  maxDelta = m_config["maxdel"].as<NekDouble>();
74  eps = m_config["eps"].as<NekDouble>();
75 
76  if (m_mesh->m_verbose)
77  {
78  cout << endl << "Loading Octree with parameters:" << endl;
79  cout << "\tmin delta: " << minDelta << endl
80  << "\tmax delta: " << maxDelta << endl
81  << "\tesp: " << eps << endl << endl;
82  }
83 
84  ASSERTL0(minDelta > 0 && maxDelta > 0 && eps > 0, "invalid parameters");
85 
87 
88  m_mesh->m_octree->SetParameters(minDelta, maxDelta, eps);
89 
90  if(m_config["refinement"].beenSet)
91  {
92  m_mesh->m_octree->Refinement(m_config["refinement"].as<string>());
93  }
94 
95  m_mesh->m_octree->Process();
96 
97  if(m_config["writeoctree"].beenSet)
98  {
99  m_mesh->m_octree->WriteOctree(m_config["writeoctree"].as<string>());
100  }
101 }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:198
static boost::shared_ptr< DataType > AllocateSharedPtr()
Allocate a shared pointer from the memory pool.
double NekDouble
std::map< std::string, ConfigOption > m_config
List of configuration values.

Member Data Documentation

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

Definition at line 54 of file ProcessLoadOctree.h.