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

#include <ProcessCyl.h>

Inheritance diagram for Nektar::Utilities::ProcessCyl:
Inheritance graph
[legend]
Collaboration diagram for Nektar::Utilities::ProcessCyl:
Collaboration graph
[legend]

Public Member Functions

 ProcessCyl (NekMeshUtils::MeshSharedPtr m)
 Default constructor. More...
 
virtual ~ProcessCyl ()
 Destructor. More...
 
- Public Member Functions inherited from Nektar::Utilities::ProcessCurvedEdges
 ProcessCurvedEdges (NekMeshUtils::MeshSharedPtr m)
 Default constructor. More...
 
virtual ~ProcessCurvedEdges ()
 Destructor. More...
 
virtual void Process ()
 Write mesh to output file. More...
 
void GenerateEdgeNodes (NekMeshUtils::EdgeSharedPtr edge)
 
- 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 (NekMeshUtils::MeshSharedPtr m)
 Creates an instance of this class. More...
 

Static Public Attributes

static NekMeshUtils::ModuleKey className
 

Protected Member Functions

void v_GenerateEdgeNodes (NekMeshUtils::EdgeSharedPtr edge)
 
- 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)
 

Additional Inherited Members

- 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 ProcessCyl.h.

Constructor & Destructor Documentation

Nektar::Utilities::ProcessCyl::ProcessCyl ( NekMeshUtils::MeshSharedPtr  m)

Default constructor.

Definition at line 61 of file ProcessCyl.cpp.

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

62 {
63  m_config["r"] = ConfigOption(false, "0.0", "Radius of cylinder.");
64  m_config["xc"] = ConfigOption(false, "0.0", "Radius of cylinder.");
65  m_config["yc"] = ConfigOption(false, "0.0", "Radius of cylinder.");
66 }
ProcessCurvedEdges(NekMeshUtils::MeshSharedPtr m)
Default constructor.
Represents a command-line configuration option.
std::map< std::string, ConfigOption > m_config
List of configuration values.
Nektar::Utilities::ProcessCyl::~ProcessCyl ( )
virtual

Destructor.

Definition at line 71 of file ProcessCyl.cpp.

72 {
73 }

Member Function Documentation

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

Creates an instance of this class.

Definition at line 50 of file ProcessCyl.h.

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

51  {
53  }
static boost::shared_ptr< DataType > AllocateSharedPtr()
Allocate a shared pointer from the memory pool.
void Nektar::Utilities::ProcessCyl::v_GenerateEdgeNodes ( NekMeshUtils::EdgeSharedPtr  edge)
protectedvirtual

Implements Nektar::Utilities::ProcessCurvedEdges.

Definition at line 75 of file ProcessCyl.cpp.

References Nektar::LibUtilities::ePolyEvenlySpaced, Nektar::NekMeshUtils::Module::m_config, and class_topology::Node.

76 {
77  NodeSharedPtr n1 = edge->m_n1;
78  NodeSharedPtr n2 = edge->m_n2;
79 
80  int nq = m_config["N"].as<int>();
81  double r = m_config["r"].as<double>();
82  double xc = m_config["xc"].as<double>();
83  double yc = m_config["yc"].as<double>();
84  double t1 = atan2(n1->m_y - yc, n1->m_x - xc);
85  double t2 = atan2(n2->m_y - yc, n2->m_x - xc);
86  double dt;
87  double dz;
88 
89  if (t1 < -M_PI / 2.0 && t2 > 0.0)
90  {
91  t1 += 2 * M_PI;
92  }
93  if (t2 < -M_PI / 2.0 && t1 > 0.0)
94  {
95  t2 += 2 * M_PI;
96  }
97 
98  dt = (t2 - t1) / (nq - 1);
99  dz = (n2->m_z - n1->m_z) / (nq - 1);
100 
101  edge->m_edgeNodes.resize(nq - 2);
102  for (int i = 1; i < nq - 1; ++i)
103  {
104  edge->m_edgeNodes[i - 1] = NodeSharedPtr(new Node(
105  0, xc + r * cos(t1 + i * dt),
106  yc + r * sin(t1 + i * dt), n1->m_z + i * dz));
107  }
108  edge->m_curveType = LibUtilities::ePolyEvenlySpaced;
109 }
1D Evenly-spaced points using Lagrange polynomial
Definition: PointsType.h:65
boost::shared_ptr< Node > NodeSharedPtr
Definition: Node.h:50
std::map< std::string, ConfigOption > m_config
List of configuration values.

Member Data Documentation

ModuleKey Nektar::Utilities::ProcessCyl::className
static
Initial value:

Definition at line 54 of file ProcessCyl.h.