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

Abstract base class for input modules. More...

#include <Module.h>

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

Public Member Functions

 InputModule (FieldSharedPtr p_m)
 
FIELD_UTILS_EXPORT void AddFile (string fileType, string fileName)
 
- 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 Member Functions

void PrintSummary ()
 Print summary of elements. More...
 
- Protected Member Functions inherited from Nektar::FieldUtils::Module
 Module ()
 

Protected Attributes

set< string > m_allowedFiles
 
- 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

Abstract base class for input modules.

Input modules should read the contents of #fldFile in the Process() function and populate the members of #m. Typically any given module should populate Mesh::expDim, Mesh::spaceDim, Mesh::node and Mesh::element, then call the protected ProcessX functions to generate edges, faces, etc.

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

Constructor & Destructor Documentation

Nektar::FieldUtils::InputModule::InputModule ( FieldSharedPtr  p_m)

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

References Nektar::FieldUtils::Module::m_config.

65  : Module(m)
66 {
67  m_config["infile"] = ConfigOption(false, "", "Input filename.");
68 }
map< string, ConfigOption > m_config
List of configuration values.

Member Function Documentation

void Nektar::FieldUtils::InputModule::AddFile ( string  fileType,
string  fileName 
)

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

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

Referenced by main().

76 {
77  // Check to see if this file type is allowed
78  if (m_allowedFiles.count(fileType) == 0)
79  {
80  cerr << "File type " << fileType << " not supported for this "
81  << "module." << endl;
82  }
83 
84  m_f->m_inputfiles[fileType].push_back(fileName);
85 }
FieldSharedPtr m_f
Field object.
void Nektar::FieldUtils::InputModule::PrintSummary ( )
protected

Print summary of elements.

Print a brief summary of information.

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

References Nektar::FieldUtils::Module::m_f.

164 {
165  cout << "Field size = " << m_f->m_data[0].size() * sizeof(NekDouble)
166  << endl;
167 }
double NekDouble
FieldSharedPtr m_f
Field object.

Member Data Documentation

set<string> Nektar::FieldUtils::InputModule::m_allowedFiles
protected