75 if (m_allowedFiles.count(fileType) == 0)
77 cerr <<
"File type " << fileType <<
" not supported for this " 81 m_f->m_inputfiles[fileType].push_back(fileName);
88 string fname =
m_config[
"outfile"].as<
string>();
92 cerr <<
"Error opening file: " << fname << endl;
105 cerr <<
"WARNING: Unrecognised config option " << key
106 <<
", proceeding anyway." << endl;
109 it->second.m_beenSet =
true;
111 if (it->second.m_isBool && val==
"")
113 it->second.m_value =
"1";
117 it->second.m_value = val;
128 cerr <<
"No configuration options for this module." << endl;
134 cerr << setw(10) << it.first <<
": " << it.second.m_desc << endl;
146 if (!it.second.m_beenSet)
148 it.second.m_value = it.second.m_defValue;
159 ifstream inFile(filename.c_str(), ios::binary);
160 vector<char> data(64, 0);
161 inFile.read(&data[0], 64);
163 string check(&data[0], 64);
166 if (check.compare(0, 4,
"#std") == 0)
174 if (check.compare(26, 7,
"Session") == 0)
190 cout <<
"Field size = " <<
m_f->m_data[0].size() *
sizeof(
NekDouble)
std::map< std::string, ConfigOption > m_config
List of configuration values.
Represents a command-line configuration option.
FIELD_UTILS_EXPORT void SetDefaults()
Sets default configuration options for those which have not been set.
std::shared_ptr< Field > FieldSharedPtr
std::pair< ModuleType, std::string > ModuleKey
const char *const ModuleTypeMap[]
OutputModule(FieldSharedPtr p_f)
FIELD_UTILS_EXPORT void RegisterConfig(std::string key, std::string value="")
Register a configuration option with a module.
std::ofstream m_fldFile
Output stream.
std::ostream & operator<<(std::ostream &os, const ModuleKey &rhs)
FIELD_UTILS_EXPORT void OpenStream()
Open a file for output.
StandardMatrixTag boost::call_traits< LhsDataType >::const_reference rhs
FIELD_UTILS_EXPORT void PrintConfig()
Print out all configuration options for a module.
Provides a generic Factory class.
ModuleFactory & GetModuleFactory()
FieldSharedPtr m_f
Field object.