35 #ifndef FIELDUTILS_MODULE 
   36 #define FIELDUTILS_MODULE 
   56 namespace po = boost::program_options;
 
   93     "CreateGraph",     
"CreateFieldData", 
"ModifyFieldData", 
"CreateExp",
 
   94     "FillExp",         
"ModifyExp",       
"BndExtraction",   
"CreatePts",
 
   95     "ConvertExpToPts", 
"ModifyPts",       
"Output"};
 
  105         unsigned char u8[
sizeof(T)];
 
  110     for (
size_t k = 0; k < 
sizeof(T); k++)
 
  112         dest.u8[k] = source.u8[
sizeof(T) - k - 1];
 
  120     size_t vecSize = u.size();
 
  121     for (
size_t i = 0; i < vecSize; ++i)
 
  153     template <
typename T> T 
as()
 const 
  157             return boost::lexical_cast<T>(
m_value);
 
  159         catch (
const std::exception &e)
 
  161             std::cerr << 
"We are not able to cast m_value " << 
m_value << 
" to " 
  162                       << 
typeid(T).
name() << std::endl
 
  163                       << e.what() << std::endl;
 
  223                                            std::string value = 
"");
 
  241         boost::ignore_unused(vm);
 
#define ASSERTL0(condition, msg)
 
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mode...
 
#define FIELD_UTILS_EXPORT
 
FIELD_UTILS_EXPORT void AddFile(std::string fileType, std::string fileName)
 
FIELD_UTILS_EXPORT void RegisterConfig(std::string key, std::string value="")
Register a configuration option with a module.
 
FIELD_UTILS_EXPORT Module(FieldSharedPtr p_f)
 
std::string GetModuleName()
 
virtual void v_Process(po::variables_map &vm)
 
std::string GetModuleDescription()
 
std::set< std::string > m_allowedFiles
List of allowed file formats.
 
void Process(po::variables_map &vm)
 
virtual std::string v_GetModuleDescription()
 
virtual std::string v_GetModuleName()
 
ModulePriority GetModulePriority()
 
virtual ~Module()=default
 
FieldSharedPtr m_f
Field object.
 
FIELD_UTILS_EXPORT void PrintConfig()
Print out all configuration options for a module.
 
std::map< std::string, ConfigOption > m_config
List of configuration values.
 
virtual ModulePriority v_GetModulePriority()
 
FIELD_UTILS_EXPORT void SetDefaults()
Sets default configuration options for those which have not been set.
 
const ConfigOption & GetConfigOption(const std::string &key) const
 
FIELD_UTILS_EXPORT void EvaluateTriFieldAtEquiSpacedPts(LocalRegions::ExpansionSharedPtr &exp, const Array< OneD, const NekDouble > &infield, Array< OneD, NekDouble > &outfield)
 
Abstract base class for output modules.
 
OutputModule(FieldSharedPtr p_f)
 
std::ofstream m_fldFile
Output stream.
 
FIELD_UTILS_EXPORT void OpenStream()
Open a file for output.
 
Abstract base class for processing modules.
 
ProcessModule(FieldSharedPtr p_f)
 
Provides a generic Factory class.
 
LibUtilities::NekFactory< ModuleKey, Module, FieldSharedPtr > ModuleFactory
 
std::shared_ptr< Field > FieldSharedPtr
 
std::ostream & operator<<(std::ostream &os, const ModuleKey &rhs)
 
std::pair< ModuleType, std::string > ModuleKey
 
std::shared_ptr< InputModule > InputModuleSharedPtr
 
const std::string ModuleTypeMap[]
 
const char *const ModulePriorityMap[]
 
void swap_endian(T &u)
Swap endian ordering of the input variable.
 
std::shared_ptr< Module > ModuleSharedPtr
 
ModuleFactory & GetModuleFactory()
 
std::shared_ptr< Expansion > ExpansionSharedPtr
 
The above copyright notice and this permission notice shall be included.
 
Represents a command-line configuration option.
 
std::string m_value
The value of the configuration option.
 
ConfigOption(bool isBool, std::string defValue, std::string desc)
Construct a new configuration option.
 
bool m_beenSet
True if the configuration option has been set at command line. If false, the default value will be pu...
 
std::string m_defValue
Default value of the configuration option.
 
std::string m_desc
Description of the configuration option.
 
bool m_isBool
True if the configuration option is a boolean (thus does not need additional arguments).
 
T as() const
Re-interpret the value stored in #value as some type using boost::lexical_cast.