Example #1
0
ProcessWSS::ProcessWSS(FieldSharedPtr f) : ProcessModule(f)
{
    m_config["bnd"] = ConfigOption(false,"All","Boundary to be extracted");
    m_config["addnormals"] = ConfigOption(true,"NotSet","Add normals to output");
    f->m_writeBndFld = true;
    f->m_declareExpansionAsContField = true;
    m_f->m_fldToBnd = false;
}
ProcessEquiSpacedOutput::ProcessEquiSpacedOutput(FieldSharedPtr f)
    : ProcessModule(f)
{
    f->m_setUpEquiSpacedFields = true;

    m_config["tetonly"] = ConfigOption(true, "NotSet",
                                "Only process tetrahedral elements");

    m_config["modalenergy"] = ConfigOption(true,"NotSet","Write output as modal energy");

}
Example #3
0
ProcessAddFld::ProcessAddFld(FieldSharedPtr f) : ProcessModule(f)
{
    m_config["scale"]   = ConfigOption(false, "1.0", "scale factor");

    m_config["fromfld"] = ConfigOption(false, "NotSet",
                                "Fld file form which to interpolate field");

    ASSERTL0(m_config["fromfld"].as<string>().compare("NotSet") != 0,
             "Need to specify fromfld=file.fld ");

}
int lua_Util_setOption(lua_State *lua)
{
    const char *option = luaL_checkstring(lua, 1);
    Config *settings = State::instance()->settings;

    switch(lua_type(lua, 2)) {
        case LUA_TSTRING:
            settings->set(option, ConfigOption(luaL_checkstring(lua, 2)));
            break;
        case LUA_TBOOLEAN:
            settings->set(option, ConfigOption((bool)lua_toboolean(lua, 2)));
            break;
        case LUA_TNUMBER:
            settings->set(option, ConfigOption(lua_tonumber(lua, 2)));
            break;
    }

    return 0;
}
Example #5
0
 void addOption(const std::string& optName,
                const std::string& helpString,
                bool hasShortName,
                char shortName,
                bool hasDefault,
                const std::string& defaultValue)
 {
   std::string name = optName;
   std::transform(name.begin(), name.end(), name.begin(), ::tolower);
   if (options.find(name) != options.end()) {
     std::string message = "Duplicate option registration: " + name;
     throw ConfigurationException(message.c_str());
   }
   options[name] = ConfigOption(helpString,
                                Validator<T>(),
                                hasShortName,
                                shortName,
                                hasDefault,
                                defaultValue);
 }
Example #6
0
 ProcessDetectSurf::ProcessDetectSurf(MeshSharedPtr m) : ProcessModule(m)
 {
     m_config["vol"] = ConfigOption(false, "-1",
         "Tag identifying surface to process.");
 }
Example #7
0
 OutputModule::OutputModule(FieldSharedPtr m) : Module(m)
 {
     m_config["outfile"] = ConfigOption(false, "", "Output filename.");
 }