Nektar++
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:
[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=std::string())
 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 std::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, ConfigOptionm_config
 List of configuration values. More...
 

Detailed Description

Definition at line 45 of file ProcessLoadOctree.h.

Constructor & Destructor Documentation

◆ ProcessLoadOctree()

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

Definition at line 49 of file ProcessLoadOctree.cpp.

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

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

◆ ~ProcessLoadOctree()

Nektar::NekMeshUtils::ProcessLoadOctree::~ProcessLoadOctree ( )
virtual

Definition at line 63 of file ProcessLoadOctree.cpp.

64 {
65 }

Member Function Documentation

◆ create()

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

Creates an instance of this class.

Definition at line 49 of file ProcessLoadOctree.h.

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

50  {
52  }
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.

◆ Process()

void Nektar::NekMeshUtils::ProcessLoadOctree::Process ( )
virtual

Implements Nektar::NekMeshUtils::Module.

Definition at line 67 of file ProcessLoadOctree.cpp.

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

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

Member Data Documentation

◆ className

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

Definition at line 53 of file ProcessLoadOctree.h.