@@ -1563,17 +1563,8 @@ enum ENUM_OBJECTIVE {
15631563 SURFACE_SPECIES_0 = 58 , /* !< \brief Surface Avg. Species_0 objective function definition. */
15641564 SURFACE_SPECIES_VARIANCE = 59 ,/* !< \brief Species Variance objective function definition. */
15651565 CUSTOM_OBJFUNC = 31 , /* !< \brief Custom objective function definition. */
1566- TOTAL_PRESSURE_LOSS = 39 ,
1567- KINETIC_ENERGY_LOSS = 40 ,
1568- TOTAL_EFFICIENCY = 41 ,
1569- TOTAL_STATIC_EFFICIENCY = 42 ,
1570- EULERIAN_WORK = 43 ,
1571- TOTAL_ENTHALPY_IN = 44 ,
1572- FLOW_ANGLE_IN = 45 ,
15731566 FLOW_ANGLE_OUT = 46 ,
15741567 MASS_FLOW_IN = 47 ,
1575- MASS_FLOW_OUT = 48 ,
1576- PRESSURE_RATIO = 49 ,
15771568 ENTROPY_GENERATION = 50 ,
15781569 REFERENCE_GEOMETRY = 60 , /* !< \brief Norm of displacements with respect to target geometry. */
15791570 REFERENCE_NODE = 61 , /* !< \brief Objective function defined as the difference of a particular node respect to a reference position. */
@@ -1617,18 +1608,9 @@ static const MapType<std::string, ENUM_OBJECTIVE> Objective_Map = {
16171608 MakePair (" SURFACE_SPECIES_0" , SURFACE_SPECIES_0)
16181609 MakePair (" SURFACE_SPECIES_VARIANCE" , SURFACE_SPECIES_VARIANCE)
16191610 MakePair (" CUSTOM_OBJFUNC" , CUSTOM_OBJFUNC)
1620- MakePair (" TOTAL_EFFICIENCY" , TOTAL_EFFICIENCY)
1621- MakePair (" TOTAL_STATIC_EFFICIENCY" , TOTAL_STATIC_EFFICIENCY)
1622- MakePair (" TOTAL_PRESSURE_LOSS" , TOTAL_PRESSURE_LOSS)
1623- MakePair (" EULERIAN_WORK" , EULERIAN_WORK)
1624- MakePair (" TOTAL_ENTHALPY_IN" , TOTAL_ENTHALPY_IN)
1625- MakePair (" FLOW_ANGLE_IN" , FLOW_ANGLE_IN)
16261611 MakePair (" FLOW_ANGLE_OUT" , FLOW_ANGLE_OUT)
16271612 MakePair (" MASS_FLOW_IN" , MASS_FLOW_IN)
1628- MakePair (" MASS_FLOW_OUT" , MASS_FLOW_OUT)
1629- MakePair (" PRESSURE_RATIO" , PRESSURE_RATIO)
16301613 MakePair (" ENTROPY_GENERATION" , ENTROPY_GENERATION)
1631- MakePair (" KINETIC_ENERGY_LOSS" , KINETIC_ENERGY_LOSS)
16321614 MakePair (" REFERENCE_GEOMETRY" , REFERENCE_GEOMETRY)
16331615 MakePair (" REFERENCE_NODE" , REFERENCE_NODE)
16341616 MakePair (" VOLUME_FRACTION" , VOLUME_FRACTION)
@@ -1637,46 +1619,6 @@ static const MapType<std::string, ENUM_OBJECTIVE> Objective_Map = {
16371619 MakePair (" STRESS_PENALTY" , STRESS_PENALTY)
16381620};
16391621
1640- /* !
1641- * \brief Types of residual criteria equations
1642- */
1643- enum ENUM_RESIDUAL {
1644- RHO_RESIDUAL = 1 , /* !< \brief Rho equation residual criteria equation. */
1645- RHO_ENERGY_RESIDUAL = 2 /* !< \brief RhoE equation residual criteria equation. */
1646- };
1647- static const MapType<std::string, ENUM_RESIDUAL> Residual_Map = {
1648- MakePair (" RHO" , RHO_RESIDUAL)
1649- MakePair (" RHO_ENERGY" , RHO_ENERGY_RESIDUAL)
1650- };
1651-
1652- /* !
1653- * \brief Types of residual criteria for structural problems
1654- */
1655- enum ENUM_RESFEM {
1656- RESFEM_RELATIVE = 1 , /* !< \brief Relative criteria: Res/Res0. */
1657- RESFEM_ABSOLUTE = 2 /* !< \brief Absolute criteria: abs(Res). */
1658- };
1659- static const MapType<std::string, ENUM_RESFEM> ResFem_Map = {
1660- MakePair (" RELATIVE" , RESFEM_RELATIVE)
1661- MakePair (" ABSOLUTE" , RESFEM_ABSOLUTE)
1662- };
1663-
1664- /* !
1665- * \brief Types of sensitivities to compute
1666- */
1667- enum ENUM_SENS {
1668- SENS_GEOMETRY = 1 , /* !< \brief Geometrical sensitivity. */
1669- SENS_MACH = 2 , /* !< \brief Mach number sensitivity. */
1670- SENS_AOA = 3 , /* !< \brief Angle of attack sensitivity. */
1671- SENS_AOS = 4 /* !< \brief Angle of Sideslip sensitivity. */
1672- };
1673- static const MapType<std::string, ENUM_SENS> Sens_Map = {
1674- MakePair (" SENS_GEOMETRY" , SENS_GEOMETRY)
1675- MakePair (" SENS_MACH" , SENS_MACH)
1676- MakePair (" SENS_AOA" , SENS_AOA)
1677- MakePair (" SENS_AOS" , SENS_AOS)
1678- };
1679-
16801622/* !
16811623 * \brief Types of input file formats
16821624 */
@@ -1823,32 +1765,6 @@ static const MapType<std::string, MG_CYCLE> MG_Cycle_Map = {
18231765 MakePair (" FULLMG_CYCLE" , FULLMG_CYCLE)
18241766};
18251767
1826- /* !
1827- * \brief Type of solution output variables
1828- */
1829- enum ENUM_OUTPUT_VARS {
1830- DENSITY = 1 , /* !< \brief Density. */
1831- VEL_X = 2 , /* !< \brief X-component of velocity. */
1832- VEL_Y = 3 , /* !< \brief Y-component of velocity. */
1833- VEL_Z = 4 , /* !< \brief Z-component of velocity. */
1834- PRESSURE = 5 , /* !< \brief Static pressure. */
1835- MACH = 6 , /* !< \brief Mach number. */
1836- TEMPERATURE = 7 , /* !< \brief Temperature. */
1837- LAM_VISC = 8 , /* !< \brief Laminar viscosity. */
1838- EDDY_VISC = 9 /* !< \brief Eddy viscosity. */
1839- };
1840- static const MapType<std::string, ENUM_OUTPUT_VARS> Output_Vars_Map = {
1841- MakePair (" DENSITY" , DENSITY)
1842- MakePair (" VEL_X" , VEL_X)
1843- MakePair (" VEL_Y" , VEL_Y)
1844- MakePair (" VEL_Z" , VEL_Z)
1845- MakePair (" PRESSURE" , PRESSURE)
1846- MakePair (" MACH" , MACH)
1847- MakePair (" TEMPERATURE" , TEMPERATURE)
1848- MakePair (" LAM_VISC" , LAM_VISC)
1849- MakePair (" EDDY_VISC" , EDDY_VISC)
1850- };
1851-
18521768/* !
18531769 * \brief Types of design parameterizations
18541770 */
@@ -2352,35 +2268,35 @@ class COptionBase {
23522268private:
23532269 std::vector<std::string> value;
23542270public:
2355- COptionBase () {};
2356- virtual ~COptionBase () = 0 ;
2271+ virtual ~COptionBase () = default ;
2272+
2273+ const std::vector<std::string>& GetValue () const {return value;}
23572274
2358- virtual std::string SetValue (std::vector<std::string> value){this ->value = value; return " " ;}
2359- std::vector<std::string> GetValue () {return value;}
2275+ virtual std::string SetValue (const std::vector<std::string>& val) {
2276+ value = val;
2277+ return " " ;
2278+ }
23602279 virtual void SetDefault () = 0;
23612280
2362- std::string optionCheckMultipleValues (std::vector<std::string> & option_value, std::string type_id, std::string option_name) {
2281+ std::string optionCheckMultipleValues (const std::vector<std::string>& option_value,
2282+ std::string type_id, const std::string& option_name) {
23632283 if (option_value.size () != 1 ) {
2364- std::string newString;
2365- newString.append (option_name);
2284+ std::string newString (option_name);
23662285 newString.append (" : multiple values for type " );
23672286 newString.append (type_id);
23682287 return newString;
23692288 }
23702289 return " " ;
23712290 }
23722291
2373- std::string badValue (std::vector<std::string> & option_value, std::string type_id, std::string option_name) {
2374- std::string newString;
2375- newString.append (option_name);
2292+ std::string badValue (std::string type_id, const std::string& option_name) {
2293+ std::string newString (option_name);
23762294 newString.append (" : improper option value for type " );
23772295 newString.append (type_id);
23782296 return newString;
23792297 }
23802298};
23812299
2382- inline COptionBase::~COptionBase () {}
2383-
23842300#ifdef ENABLE_MAPS
23852301#include " option_structure.inl"
23862302#endif
0 commit comments