Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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.
 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.
void PrintConfig ()
 Print out all configuration options for a module.
void SetDefaults ()
 Sets default configuration options for those which have not been set.
bool GetRequireEquiSpaced (void)
void SetRequireEquiSpaced (bool pVal)
 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.

Protected Attributes

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

Additional Inherited Members

- Protected Member Functions inherited from Nektar::Utilities::Module
virtual void ProcessEdges (bool ReprocessEdges=true)
 Extract element edges.
virtual void ProcessFaces (bool ReprocessFaces=true)
 Extract element faces.
virtual void ProcessElements ()
 Generate element IDs.
virtual void ProcessComposites ()
 Generate composites.
void ReorderPrisms (PerMap &perFaces)
 Reorder node IDs so that prisms and tetrahedra are aligned correctly.
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 203 of file PostProcessing/FieldConvert/Module.h.

Constructor & Destructor Documentation

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

Definition at line 70 of file PostProcessing/FieldConvert/Module.cpp.

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

: Module(m)
{
m_config["outfile"] = ConfigOption(false, "", "Output filename.");
}
Nektar::Utilities::OutputModule::OutputModule ( MeshSharedPtr  p_m)

Definition at line 69 of file PreProcessing/MeshConvert/Module.cpp.

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

: Module(m)
{
m_config["outfile"] = ConfigOption(false, "", "Output filename.");
}

Member Function Documentation

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

Open a file for output.

Definition at line 89 of file PostProcessing/FieldConvert/Module.cpp.

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

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

{
string fname = m_config["outfile"].as<string>();
m_fldFile.open(fname.c_str());
if (!m_fldFile.good())
{
cerr << "Error opening file: " << fname << endl;
abort();
}
}
void Nektar::Utilities::OutputModule::OpenStream ( )

Member Data Documentation

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

Output stream.

Definition at line 211 of file PostProcessing/FieldConvert/Module.h.

Referenced by OpenStream().

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

Output stream.

Definition at line 234 of file PreProcessing/MeshConvert/Module.h.

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