Nektar++
Public Member Functions | Protected Attributes | List of all members
Nektar::Utilities::OutputModule Class Reference

Abstract base class for output modules. More...

#include <Module.h>

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

Public Member Functions

 OutputModule (FieldSharedPtr p_f)
 
void OpenStream ()
 Open a file for output. More...
 
 OutputModule (MeshSharedPtr p_m)
 
void OpenStream ()
 
- Public Member Functions inherited from Nektar::Utilities::Module
 Module (FieldSharedPtr p_f)
 
virtual void Process (po::variables_map &vm)=0
 
void RegisterConfig (string key, string value)
 Register a configuration option with a module. More...
 
void PrintConfig ()
 Print out all configuration options for a module. More...
 
void SetDefaults ()
 Sets default configuration options for those which have not been set. More...
 
bool GetRequireEquiSpaced (void)
 
void SetRequireEquiSpaced (bool pVal)
 
void EvaluateTriFieldAtEquiSpacedPts (LocalRegions::ExpansionSharedPtr &exp, const Array< OneD, const NekDouble > &infield, Array< OneD, NekDouble > &outfield)
 
 Module (MeshSharedPtr p_m)
 
virtual void Process ()=0
 
void RegisterConfig (string key, string value)
 
void PrintConfig ()
 
void SetDefaults ()
 
MeshSharedPtr GetMesh ()
 
virtual void ProcessVertices ()
 Extract element vertices. More...
 

Protected Attributes

ofstream m_fldFile
 Output stream. More...
 
std::ofstream m_mshFile
 Output stream. More...
 
- Protected Attributes inherited from Nektar::Utilities::Module
FieldSharedPtr m_f
 Field object. More...
 
map< string, ConfigOptionm_config
 List of configuration values. More...
 
bool m_requireEquiSpaced
 
MeshSharedPtr m_mesh
 Mesh object. More...
 

Additional Inherited Members

- Protected Member Functions inherited from Nektar::Utilities::Module
 Module ()
 
virtual void ProcessEdges (bool ReprocessEdges=true)
 Extract element edges. More...
 
virtual void ProcessFaces (bool ReprocessFaces=true)
 Extract element faces. More...
 
virtual void ProcessElements ()
 Generate element IDs. More...
 
virtual void ProcessComposites ()
 Generate composites. More...
 
void ReorderPrisms (PerMap &perFaces)
 Reorder node IDs so that prisms and tetrahedra are aligned correctly. More...
 
void PrismLines (int prism, PerMap &perFaces, set< int > &prismsDone, vector< ElementSharedPtr > &line)
 

Detailed Description

Abstract base class for output modules.

Output modules take the mesh #m and write to the file specified by the stream.

Output modules take the mesh #m and write to the file specified by the stream m_mshFile.

Definition at line 212 of file FieldConvert/Module.h.

Constructor & Destructor Documentation

Nektar::Utilities::OutputModule::OutputModule ( FieldSharedPtr  p_f)

Definition at line 71 of file FieldConvert/Module.cpp.

References Nektar::Utilities::Module::m_config.

71  : Module(m)
72  {
73  m_config["outfile"] = ConfigOption(false, "", "Output filename.");
74  }
map< string, ConfigOption > m_config
List of configuration values.
Nektar::Utilities::OutputModule::OutputModule ( MeshSharedPtr  p_m)

Definition at line 70 of file MeshConvert/Module.cpp.

References Nektar::Utilities::Module::m_config.

70  : Module(m)
71  {
72  m_config["outfile"] = ConfigOption(false, "", "Output filename.");
73  }
map< string, ConfigOption > m_config
List of configuration values.

Member Function Documentation

void Nektar::Utilities::OutputModule::OpenStream ( )

Open a file for output.

Definition at line 90 of file FieldConvert/Module.cpp.

References Nektar::Utilities::Module::m_config, and m_fldFile.

Referenced by Nektar::Utilities::OutputGmsh::Process().

91  {
92  string fname = m_config["outfile"].as<string>();
93  m_fldFile.open(fname.c_str());
94  if (!m_fldFile.good())
95  {
96  cerr << "Error opening file: " << fname << endl;
97  abort();
98  }
99  }
ofstream m_fldFile
Output stream.
map< string, ConfigOption > m_config
List of configuration values.
void Nektar::Utilities::OutputModule::OpenStream ( )

Member Data Documentation

ofstream Nektar::Utilities::OutputModule::m_fldFile
protected

Output stream.

Definition at line 220 of file FieldConvert/Module.h.

Referenced by OpenStream().

std::ofstream Nektar::Utilities::OutputModule::m_mshFile
protected

Output stream.

Definition at line 235 of file MeshConvert/Module.h.

Referenced by Nektar::Utilities::OutputGmsh::Process().