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

Abstract base class for output modules. More...

#include <Module.h>

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

Public Member Functions

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

Protected Attributes

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

Additional Inherited Members

- Protected Member Functions inherited from Nektar::FieldUtils::Module
 Module ()
 

Detailed Description

Abstract base class for output modules.

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

Definition at line 218 of file FieldUtils/Module.h.

Constructor & Destructor Documentation

Nektar::FieldUtils::OutputModule::OutputModule ( FieldSharedPtr  p_f)

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

References Nektar::FieldUtils::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::FieldUtils::OutputModule::OpenStream ( )

Open a file for output.

Definition at line 89 of file FieldUtils/Module.cpp.

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

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

Member Data Documentation

ofstream Nektar::FieldUtils::OutputModule::m_fldFile
protected

Output stream.

Definition at line 226 of file FieldUtils/Module.h.

Referenced by OpenStream().