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

Converter from fld to vtk. More...

#include <OutputXml.h>

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

Public Member Functions

 OutputXml (FieldSharedPtr f)
 
virtual ~OutputXml ()
 
virtual void Process (po::variables_map &vm)
 Write fld to output file. More...
 
virtual std::string GetModuleName ()
 
- Public Member Functions inherited from Nektar::FieldUtils::OutputModule
 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)
 
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)
 

Static Public Member Functions

static boost::shared_ptr< Modulecreate (FieldSharedPtr f)
 Creates an instance of this class. More...
 

Static Public Attributes

static ModuleKey m_className
 

Additional Inherited Members

- Protected Member Functions inherited from Nektar::FieldUtils::Module
 Module ()
 
- Protected Attributes inherited from Nektar::FieldUtils::OutputModule
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
 

Detailed Description

Converter from fld to vtk.

Definition at line 47 of file OutputXml.h.

Constructor & Destructor Documentation

Nektar::FieldUtils::OutputXml::OutputXml ( FieldSharedPtr  f)

Definition at line 50 of file OutputXml.cpp.

50  : OutputModule(f)
51 {
52 }
Nektar::FieldUtils::OutputXml::~OutputXml ( )
virtual

Definition at line 54 of file OutputXml.cpp.

55 {
56 }

Member Function Documentation

static boost::shared_ptr<Module> Nektar::FieldUtils::OutputXml::create ( FieldSharedPtr  f)
inlinestatic

Creates an instance of this class.

Definition at line 51 of file OutputXml.h.

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

52  {
54  }
static boost::shared_ptr< DataType > AllocateSharedPtr()
Allocate a shared pointer from the memory pool.
virtual std::string Nektar::FieldUtils::OutputXml::GetModuleName ( )
inlinevirtual

Implements Nektar::FieldUtils::Module.

Definition at line 63 of file OutputXml.h.

64  {
65  return "OutputXml";
66  }
void Nektar::FieldUtils::OutputXml::Process ( po::variables_map &  vm)
virtual

Write fld to output file.

Implements Nektar::FieldUtils::Module.

Definition at line 58 of file OutputXml.cpp.

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

59 {
60  if (!m_f->m_exp.size()) // do nothing if no expansion defined
61  {
62  return;
63  }
64 
65  if (m_f->m_verbose)
66  {
67  if (m_f->m_comm->TreatAsRankZero())
68  {
69  cout << "OutputXml: Writing file..." << endl;
70  }
71  }
72 
73  // Extract the output filename and extension
74  string filename = m_config["outfile"].as<string>();
75 
76  m_f->m_graph->WriteGeometry(filename);
77  cout << "Written file: " << filename << endl;
78 }
map< string, ConfigOption > m_config
List of configuration values.
FieldSharedPtr m_f
Field object.

Member Data Documentation

ModuleKey Nektar::FieldUtils::OutputXml::m_className
static
Initial value:

Definition at line 55 of file OutputXml.h.