From 1b53dd0ae2c39fd816d0f72f224b00991222a3b9 Mon Sep 17 00:00:00 2001 From: bigfooted Date: Fri, 17 Feb 2023 09:21:02 +0100 Subject: [PATCH 01/34] update config_template --- config_template.cfg | 68 +++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 62 insertions(+), 6 deletions(-) diff --git a/config_template.cfg b/config_template.cfg index 0463ce3357f..dd501098f13 100644 --- a/config_template.cfg +++ b/config_template.cfg @@ -29,6 +29,10 @@ SA_OPTIONS= NONE % % Transition model (NONE, LM) KIND_TRANS_MODEL= NONE +% +% Value of RMS roughness for transition model +HROUGHNESS= 1.0e-6 +% % Specify versions/correlations of the LM model (LM2015, MALAN, SULUKSNA, KRAUSE, KRAUSE_HYPER, MEDIDA, MEDIDA_BAEDER, MENTER_LANGTRY) LM_OPTIONS= NONE % @@ -50,6 +54,9 @@ MATH_PROBLEM= DIRECT % Axisymmetric simulation, only compressible flows (NO, YES) AXISYMMETRIC= NO % +% Gravity force +GRAVITY_FORCE= NO +% % Restart solution (NO, YES) RESTART_SOL= NO % @@ -200,6 +207,9 @@ FREESTREAM_VISCOSITY= 1.853E-5 % Free-stream turbulence intensity FREESTREAM_TURBULENCEINTENSITY= 0.05 % +% Value for freestream intermittency +FREESTREAM_INTERMITTENCY= 1.0 +% % Fix turbulence quantities to far-field values inside an upstream half-space TURB_FIXED_VALUES= NO % @@ -259,6 +269,9 @@ INC_INLET_TYPE= VELOCITY_INLET % Damping coefficient for iterative updates at pressure inlets. (0.1 by default) INC_INLET_DAMPING= 0.1 % +% Impose inlet velocity magnitude in the direction of the normal of the inlet face +INC_INLET_USENORMAL= NO +% % List of outlet types for incompressible flows. List length must % match number of outlet markers. Options: PRESSURE_OUTLET, MASS_FLOW_OUTLET INC_OUTLET_TYPE= PRESSURE_OUTLET @@ -266,6 +279,8 @@ INC_OUTLET_TYPE= PRESSURE_OUTLET % Damping coefficient for iterative updates at mass flow outlets. (0.1 by default) INC_OUTLET_DAMPING= 0.1 % +% Bulk Modulus for computing the Mach number +BULK_MODULUS= 1.42E5 % Epsilon^2 multipier in Beta calculation for incompressible preconditioner. BETA_FACTOR= 4.1 % @@ -291,12 +306,22 @@ TARGET_CL= 0.80 % Estimation of dCL/dAlpha (0.2 per degree by default) DCL_DALPHA= 0.2 % +% Damping factor for fixed CL mode +DCM_DIH= 0.05 +% % Maximum number of iterations between AoA updates UPDATE_AOA_ITER_LIMIT= 100 % +% Number of times Alpha is updated in a fix CL problem. +UPDATE_IH= 5 +% % Number of iterations to evaluate dCL_dAlpha by using finite differences (500 by default) ITER_DCL_DALPHA= 500 - +% +% Evaluate the dOF_dCL or dOF_dCMy during run time +EVAL_DOF_DCX= NO +% Damping factor for fixed CL mode. +NETTHRUST_DBCTHRUST= 1.0 % ---------------------- REFERENCE VALUE DEFINITION ---------------------------% % % Reference origin for moment computation (m or in) @@ -336,7 +361,10 @@ CRITICAL_TEMPERATURE= 131.00 % Critical Pressure (3588550.0 N/m^2 by default) CRITICAL_PRESSURE= 3588550.0 % -% Acentri factor (0.035 (air)) +% Critical Density (263.0 kg/m^3 by default) +CRITICAL_DENSITY= 263.0 +% +% Acentric factor (0.035 (air)) ACENTRIC_FACTOR= 0.035 % % Thermodynamics(operating) Pressure (101325 Pa default value, only for incompressible flow and FLUID_MIXTURE) @@ -358,7 +386,7 @@ MOLECULAR_WEIGHT= 28.96, 16.043 % Format -> Cp(T) : b0 + b1*T + b2*T^2 + b3*T^3 + b4*T^4 CP_POLYCOEFFS= (0.0, 0.0, 0.0, 0.0, 0.0) % -% Nonequilibrium fluid options +% --- Nonequilibrium fluid options % % Gas model - mixture GAS_MODEL= AIR-5 @@ -369,6 +397,12 @@ GAS_COMPOSITION= (0.77, 0.23, 0.0, 0.0, 0.0) % Freeze chemical reactions FROZEN_MIXTURE= NO % +% Specify if there is ionization +IONIZATION= NO +% +% Specify if there is VT transfer residual limiting +VT_RESIDUAL_LIMITING= NO +% % NEMO Inlet Options INLET_TEMPERATURE_VE = 288.15 INLET_GAS_COMPOSITION = (0.77, 0.23, 0.0, 0.0, 0.0) @@ -606,6 +640,9 @@ ENGINE_NU_FACTOR= 3.0 % % Actuator disk jump definition using ratio or difference (DIFFERENCE, RATIO) ACTDISK_JUMP= DIFFERENCE +% +% secondary flow value for actuator disk +ACTDISK_SECONDARY_FLOW= 0.0 % % Number of times BC Thrust is updated in a fix Net Thrust problem (5 by default) UPDATE_BCTHRUST= 100 @@ -708,16 +745,22 @@ TIME_DISCRE_RADIATION = EULER_IMPLICIT % % Specify scalar transport model (NONE, SPECIES_TRANSPORT) KIND_SCALAR_MODEL= NONE -% -% Mass diffusivity model (CONSTANT_DIFFUSIVITY) +% mixing model for species transport (DAVIDSON, WILKE) +MIXING_VISCOSITY_MODEL= DAVIDSON +% Mass diffusivity model (CONSTANT_DIFFUSIVITY, CONSTANT_SCHMIDT, UNITY_LEWIS, CONSTANT_LEWIS) DIFFUSIVITY_MODEL= CONSTANT_DIFFUSIVITY % % Mass diffusivity if DIFFUSIVITY_MODEL= CONSTANT_DIFFUSIVITY is chosen. D_air ~= 0.001 DIFFUSIVITY_CONSTANT= 0.001 % +% Laminar Schmidt number for mass diffusion (for constant schmidt number model) +SCHMIDT_NUMBER_LAMINAR= 1.0 % Turbulent Schmidt number of mass diffusion SCHMIDT_NUMBER_TURBULENT= 0.7 % +% list of constant Lewis numbers for all species for +CONSTANT_LEWIS_NUMBER= (1,1,1) +% % Inlet Species boundary marker(s) with the following format: % (inlet_marker, Species1, Species2, ..., SpeciesN-1, inlet_marker2, Species1, Species2, ...) % For N species, N-1 transport equations are solved, the last one Y_N is solved algebraically as 1-(sum of the species 1 to (N-1)) @@ -985,6 +1028,12 @@ SPATIAL_FOURIER= NO % Catalytic wall marker(s) (NONE = no marker) % Format: ( marker name, ... ) CATALYTIC_WALL= ( NONE ) +% specify if catalytic wall is a supercatalytic wall +SUPERCATALYTIC_WALL= NO +% species composition at the supercatalytic wall +SUPERCATALYTIC_WALL_COMPOSITION= (0,0,0) +% catalytic efficiency +CATALYTIC_EFFICIENCY= 0.2 % % Inlet Turbulent boundary marker(s) with the following format: % (inlet_marker1, TurbIntensity1, RatioTurbLamViscosity1, inlet_marker2, TurbIntensity2, RatioTurbLamViscosity2, ...) @@ -1292,7 +1341,14 @@ LEVELS_TIME_ACCURATE_LTS= 1 % % Specify the method for matrix coloring for Jacobian computations (GREEDY_COLORING, NATURAL_COLORING) KIND_MATRIX_COLORING= GREEDY_COLORING - +% +% Specify shock capturing method for DG +KIND_FEM_DG_SHOCK= NONE +% +% -------------------- Weakly Coupled Heat ------------------% +% +WEAKLY_COUPLED_HEAT_EQUATION= NO +% % -------------------- TURBULENT NUMERICAL METHOD DEFINITION ------------------% % % Convective numerical method (SCALAR_UPWIND, BOUNDED_SCALAR) From 98e93198c3a04de379c2c093f02324a05832c5b6 Mon Sep 17 00:00:00 2001 From: bigfooted Date: Sun, 19 Feb 2023 11:11:05 +0100 Subject: [PATCH 02/34] add config options to config_template --- Common/include/CConfig.hpp | 54 +++---- Common/src/CConfig.cpp | 150 ++++++++--------- .../meshreader/CSU2ASCIIMeshReaderFVM.cpp | 3 +- config_template.cfg | 151 +++++++++++++++++- 4 files changed, 248 insertions(+), 110 deletions(-) diff --git a/Common/include/CConfig.hpp b/Common/include/CConfig.hpp index f3b1abd9876..3b488c27314 100644 --- a/Common/include/CConfig.hpp +++ b/Common/include/CConfig.hpp @@ -96,7 +96,7 @@ class CConfig { *TemperatureLimits; /*!< \brief Limits for the primitive variables */ bool ActDisk_DoubleSurface; /*!< \brief actuator disk double surface */ bool Engine_HalfModel; /*!< \brief only half model is in the computational grid */ - bool ActDisk_SU2_DEF; /*!< \brief actuator disk double surface */ + //bool ActDisk_SU2_DEF; /*!< \brief actuator disk double surface */ unsigned short nFFD_Iter; /*!< \brief Iteration for the point inversion problem. */ unsigned short FFD_Blending; /*!< \brief Kind of FFD Blending function. */ su2double FFD_Tol; /*!< \brief Tolerance in the point inversion problem. */ @@ -216,8 +216,8 @@ class CConfig { nMarker_Damper, /*!< \brief Number of damper surface markers. */ nMarker_Load_Dir, /*!< \brief Number of load surface markers defined by magnitude and direction. */ nMarker_Disp_Dir, /*!< \brief Number of load surface markers defined by magnitude and direction. */ - nMarker_Load_Sine, /*!< \brief Number of load surface markers defined by magnitude and direction. */ - nMarker_FlowLoad, /*!< \brief Number of load surface markers. */ + //nMarker_Load_Sine, /*!< \brief Number of load surface markers defined by magnitude and direction. */ + //nMarker_FlowLoad, /*!< \brief Number of load surface markers. */ nMarker_Internal, /*!< \brief Number of internal flow markers. */ nMarker_All, /*!< \brief Total number of markers using the grid information. */ nMarker_Max, /*!< \brief Max number of number of markers using the grid information. */ @@ -328,10 +328,10 @@ class CConfig { su2double *Disp_Dir_Multiplier; /*!< \brief Specified multiplier for load boundaries defined in cartesian coordinates. */ su2double **Load_Dir; /*!< \brief Specified flow direction vector (unit vector) for inlet boundaries. */ su2double **Disp_Dir; /*!< \brief Specified structural displacement direction (unit vector). */ - su2double *Load_Sine_Amplitude; /*!< \brief Specified amplitude for a sine-wave load. */ - su2double *Load_Sine_Frequency; /*!< \brief Specified multiplier for load boundaries defined in cartesian coordinates. */ - su2double **Load_Sine_Dir; /*!< \brief Specified flow direction vector (unit vector) for inlet boundaries. */ - su2double *FlowLoad_Value; /*!< \brief Specified force for flow load boundaries. */ + //su2double *Load_Sine_Amplitude; /*!< \brief Specified amplitude for a sine-wave load. */ + //su2double *Load_Sine_Frequency; /*!< \brief Specified multiplier for load boundaries defined in cartesian coordinates. */ + //su2double **Load_Sine_Dir; /*!< \brief Specified flow direction vector (unit vector) for inlet boundaries. */ + //su2double *FlowLoad_Value; /*!< \brief Specified force for flow load boundaries. */ su2double *ActDiskInlet_MassFlow; /*!< \brief Specified inlet mass flow for actuator disk. */ su2double *ActDiskInlet_Temperature; /*!< \brief Specified inlet temperature for actuator disk. */ su2double *ActDiskInlet_TotalTemperature; /*!< \brief Specified inlet total temperature for actuator disk. */ @@ -1106,7 +1106,7 @@ class CConfig { distortion[2], /*!< \brief SU2_GEO section locations array for the COption class. */ ea_lim[3], /*!< \brief equivalent area limit array for the COption class. */ grid_fix[6], /*!< \brief fixed grid (non-deforming region) array for the COption class. */ - htp_axis[2], /*!< \brief HTP axis for the COption class. */ + //htp_axis[2], /*!< \brief HTP axis for the COption class. */ ffd_axis[3], /*!< \brief FFD axis for the COption class. */ inc_crit[3], /*!< \brief incremental criteria array for the COption class. */ extrarelfac[2], /*!< \brief extra relaxation factor for Giles BC in the COption class. */ @@ -1539,11 +1539,11 @@ class CConfig { */ const su2double *GetHold_GridFixed_Coord(void) const { return grid_fix; } - /*! - * \brief Get the values of subsonic engine. - * \return Values of subsonic engine. - */ - const su2double *GetSubsonicEngine_Values(void) const { return eng_val; } + /*! + * \brief Get the values of subsonic engine. + * \return Values of subsonic engine. + */ + const su2double *GetSubsonicEngine_Values(void) const { return eng_val; } /*! * \brief Get the cycle of a subsonic engine. @@ -5694,11 +5694,11 @@ class CConfig { */ bool GetEngine_HalfModel(void) const { return Engine_HalfModel; } - /*! - * \brief Actuator disk defined with a double surface. - * \return TRUE if the elements must be divided; otherwise FALSE. - */ - bool GetActDisk_SU2_DEF(void) const { return ActDisk_SU2_DEF; } + ///*! + // * \brief Actuator disk defined with a double surface. + // * \return TRUE if the elements must be divided; otherwise FALSE. + // */ + //bool GetActDisk_SU2_DEF(void) const { return ActDisk_SU2_DEF; } /*! * \brief Value of the design variable step, we use this value in design problems. @@ -8166,28 +8166,28 @@ class CConfig { * \param[in] val_index - Index corresponding to the load boundary. * \return The load value. */ - su2double GetLoad_Sine_Amplitude(string val_index) const; + // su2double GetLoad_Sine_Amplitude(string val_index) const; /*! * \brief Get the frequency of the sine-wave at a load boundary in cartesian coordinates. * \param[in] val_index - Index corresponding to the load boundary. * \return The load frequency. */ - su2double GetLoad_Sine_Frequency(string val_index) const; + // su2double GetLoad_Sine_Frequency(string val_index) const; /*! * \brief Get the force direction at a sine-wave loaded boundary in cartesian coordinates. * \param[in] val_index - Index corresponding to the load boundary. * \return The load direction. */ - const su2double* GetLoad_Sine_Dir(string val_index) const; + // const su2double* GetLoad_Sine_Dir(string val_index) const; - /*! - * \brief Get the force value at an load boundary. - * \param[in] val_index - Index corresponding to the load boundary. - * \return The load value. - */ - su2double GetFlowLoad_Value(string val_index) const; + ///*! + // * \brief Get the force value at an load boundary. + // * \param[in] val_index - Index corresponding to the load boundary. + // * \return The load value. + // */ + //su2double GetFlowLoad_Value(string val_index) const; /*! * \brief Cyclic pitch amplitude for rotor blades. diff --git a/Common/src/CConfig.cpp b/Common/src/CConfig.cpp index f0c0d8ea91a..ce144c82983 100644 --- a/Common/src/CConfig.cpp +++ b/Common/src/CConfig.cpp @@ -854,8 +854,8 @@ void CConfig::SetPointersNull(void) { Marker_Isothermal = nullptr; Marker_HeatFlux = nullptr; Marker_EngineInflow = nullptr; Marker_Load = nullptr; Marker_Disp_Dir = nullptr; Marker_RoughWall = nullptr; Marker_EngineExhaust = nullptr; Marker_Displacement = nullptr; Marker_Load = nullptr; - Marker_Load_Dir = nullptr; Marker_Load_Sine = nullptr; Marker_Clamped = nullptr; - Marker_FlowLoad = nullptr; Marker_Internal = nullptr; + Marker_Load_Dir = nullptr; Marker_Clamped = nullptr; + Marker_Internal = nullptr; Marker_All_TagBound = nullptr; Marker_CfgFile_TagBound = nullptr; Marker_All_KindBC = nullptr; Marker_CfgFile_KindBC = nullptr; Marker_All_SendRecv = nullptr; Marker_All_PerBound = nullptr; Marker_ZoneInterface = nullptr; Marker_All_ZoneInterface = nullptr; Marker_Riemann = nullptr; @@ -866,7 +866,7 @@ void CConfig::SetPointersNull(void) { Isothermal_Temperature = nullptr; HeatTransfer_Coeff = nullptr; HeatTransfer_WallTemp = nullptr; Heat_Flux = nullptr; Displ_Value = nullptr; Load_Value = nullptr; - FlowLoad_Value = nullptr; Damper_Constant = nullptr; Wall_Emissivity = nullptr; + Damper_Constant = nullptr; Wall_Emissivity = nullptr; Roughness_Height = nullptr; /*--- Inlet Outlet Boundary Condition settings ---*/ @@ -903,7 +903,7 @@ void CConfig::SetPointersNull(void) { Load_Dir = nullptr; Load_Dir_Value = nullptr; Load_Dir_Multiplier = nullptr; Disp_Dir = nullptr; Disp_Dir_Value = nullptr; Disp_Dir_Multiplier = nullptr; - Load_Sine_Dir = nullptr; Load_Sine_Amplitude = nullptr; Load_Sine_Frequency = nullptr; + //Load_Sine_Dir = nullptr; Load_Sine_Amplitude = nullptr; Load_Sine_Frequency = nullptr; Electric_Field_Mod = nullptr; Electric_Field_Dir = nullptr; RefNode_Displacement = nullptr; Electric_Constant = nullptr; @@ -1435,7 +1435,7 @@ void CConfig::SetConfig_Options() { /*!\brief REF_VELOCITY\n DESCRIPTION: Reference velocity (incompressible only) \ingroup Config*/ addDoubleOption("REF_VELOCITY", Velocity_Ref, -1.0); /* !\brief REF_VISCOSITY \n DESCRIPTION: Reference viscosity (incompressible only) \ingroup Config*/ - addDoubleOption("REF_VISCOSITY", Viscosity_Ref, -1.0); + addDoubleOption("REF_VISCOSITY", Viscosity_Ref, 1.0); /* DESCRIPTION: Type of mesh motion */ addEnumOption("REF_DIMENSIONALIZATION", Ref_NonDim, NonDim_Map, DIMENSIONAL); @@ -1443,8 +1443,8 @@ void CConfig::SetConfig_Options() { /*--- Options related to various boundary markers ---*/ /*!\brief HTP_AXIS\n DESCRIPTION: Location of the HTP axis*/ - htp_axis[0] = 0.0; htp_axis[1] = 0.0; - addDoubleArrayOption("HTP_AXIS", 2, htp_axis); + //htp_axis[0] = 0.0; htp_axis[1] = 0.0; + //addDoubleArrayOption("HTP_AXIS", 2, htp_axis); /*!\brief MARKER_PLOTTING\n DESCRIPTION: Marker(s) of the surface in the surface flow solution file \ingroup Config*/ addStringListOption("MARKER_PLOTTING", nMarker_Plotting, Marker_Plotting); /*!\brief MARKER_MONITORING\n DESCRIPTION: Marker(s) of the surface where evaluate the non-dimensional coefficients \ingroup Config*/ @@ -1584,10 +1584,10 @@ void CConfig::SetConfig_Options() { /*!\brief SPANWISE_KIND \n DESCRIPTION: type of algorithm to identify the span-wise sections at the turbo boundaries. \n OPTIONS: see \link SpanWise_Map \endlink \n Default: AUTOMATIC */ addEnumOption("SPANWISE_KIND", Kind_SpanWise, SpanWise_Map, AUTOMATIC); - /*!\brief TURBOMACHINERY_KIND \n DESCRIPTION: types of turbomachynery architecture. + /*!\brief TURBOMACHINERY_KIND \n DESCRIPTION: types of turbomachinery architecture. \n OPTIONS: see \link TurboMachinery_Map \endlink \n Default: AXIAL */ addEnumListOption("TURBOMACHINERY_KIND",nTurboMachineryKind, Kind_TurboMachinery, TurboMachinery_Map); - /*!\brief MARKER_SHROUD \n DESCRIPTION: markers in which velocity is forced to 0.0 . + /*!\brief MARKER_SHROUD \n DESCRIPTION: markers in which velocity is forced to 0.0. * \n Format: (shroud1, shroud2, ...)*/ addStringListOption("MARKER_SHROUD", nMarker_Shroud, Marker_Shroud); /*!\brief MARKER_SUPERSONIC_INLET \n DESCRIPTION: Supersonic inlet boundary marker(s) @@ -1611,7 +1611,7 @@ void CConfig::SetConfig_Options() { /*!\brief MARKER_HEATTRANSFER DESCRIPTION: Heat flux with specified heat transfer coefficient boundary marker(s)\n * Format: ( Heat transfer marker, heat transfer coefficient, wall temperature (static), ... ) \ingroup Config */ addExhaustOption("MARKER_HEATTRANSFER", nMarker_HeatTransfer, Marker_HeatTransfer, HeatTransfer_Coeff, HeatTransfer_WallTemp); - /*!\brief Smluchowski/Maxwell wall boundary marker(s) \n DESCRIPTION: Slip velocity and temperature jump wall boundary marker(s) + /*!\brief Smoluchowski/Maxwell wall boundary marker(s) \n DESCRIPTION: Slip velocity and temperature jump wall boundary marker(s) Format: ( Heat flux marker, wall temperature (static), momentum accomodation coefficient, thermal accomodation coefficient ... ) \ingroup Config*/ addStringDoubleListOption("MARKER_SMOLUCHOWSKI_MAXWELL", nMarker_Smoluchowski_Maxwell, Marker_Smoluchowski_Maxwell, Isothermal_Temperature); //Missing TMAC and TAC /*!\brief WALL_ROUGHNESS \n DESCRIPTION: Specified roughness heights at wall boundary marker(s) @@ -1630,8 +1630,8 @@ void CConfig::SetConfig_Options() { addBoolOption("ACTDISK_DOUBLE_SURFACE", ActDisk_DoubleSurface, false); /* DESCRIPTION: Only half engine is in the computational grid */ addBoolOption("ENGINE_HALF_MODEL", Engine_HalfModel, false); - /* DESCRIPTION: Actuator disk double surface */ - addBoolOption("ACTDISK_SU2_DEF", ActDisk_SU2_DEF, false); + // /* DESCRIPTION: Actuator disk double surface */ + // addBoolOption("ACTDISK_SU2_DEF", ActDisk_SU2_DEF, false); /* DESCRIPTION: Definition of the distortion rack (radial number of proves / circumferential density (degree) */ distortion[0] = 5.0; distortion[1] = 15.0; addDoubleArrayOption("DISTORTION_RACK", 2, distortion); @@ -1661,7 +1661,7 @@ void CConfig::SetConfig_Options() { addInletOption("MARKER_DISPLACEMENT", nMarker_Disp_Dir, Marker_Disp_Dir, Disp_Dir_Value, Disp_Dir_Multiplier, Disp_Dir); /* DESCRIPTION: Sine load boundary marker(s) Format: (inlet marker, load, multiplier, dir_x, dir_y, dir_z, ... ), i.e. primitive variables specified. */ - addInletOption("MARKER_SINE_LOAD", nMarker_Load_Sine, Marker_Load_Sine, Load_Sine_Amplitude, Load_Sine_Frequency, Load_Sine_Dir); + //addInletOption("MARKER_SINE_LOAD", nMarker_Load_Sine, Marker_Load_Sine, Load_Sine_Amplitude, Load_Sine_Frequency, Load_Sine_Dir); /*!\brief SINE_LOAD\n DESCRIPTION: option to apply the load as a sine*/ addBoolOption("SINE_LOAD", Sine_Load, false); sineload_coeff[0] = 0.0; sineload_coeff[1] = 0.0; sineload_coeff[2] = 0.0; @@ -1671,7 +1671,7 @@ void CConfig::SetConfig_Options() { addBoolOption("RAMP_AND_RELEASE_LOAD", RampAndRelease, false); /* DESCRIPTION: Flow load boundary marker(s) */ - addStringDoubleListOption("MARKER_FLOWLOAD", nMarker_FlowLoad, Marker_FlowLoad, FlowLoad_Value); + //addStringDoubleListOption("MARKER_FLOWLOAD", nMarker_FlowLoad, Marker_FlowLoad, FlowLoad_Value); /* DESCRIPTION: Damping factor for engine inlet condition */ addDoubleOption("DAMP_ENGINE_INFLOW", Damp_Engine_Inflow, 0.95); /* DESCRIPTION: Damping factor for engine exhaust condition */ @@ -1822,6 +1822,8 @@ void CConfig::SetConfig_Options() { /*!\par CONFIG_CATEGORY: Convergence\ingroup Config*/ /*--- Options related to convergence ---*/ + /*!\brief CONV_FIELD\n DESCRIPTION: Output field to monitor \n Default: depends on solver \ingroup Config*/ + addStringListOption("CONV_FIELD", nConvField, ConvField); /*!\brief CONV_RESIDUAL_MINVAL\n DESCRIPTION: Min value of the residual (log10 of the residual)\n DEFAULT: -14.0 \ingroup Config*/ addDoubleOption("CONV_RESIDUAL_MINVAL", MinLogResidual, -14.0); /*!\brief CONV_STARTITER\n DESCRIPTION: Iteration number to begin convergence monitoring\n DEFAULT: 5 \ingroup Config*/ @@ -1830,15 +1832,13 @@ void CConfig::SetConfig_Options() { addUnsignedShortOption("CONV_CAUCHY_ELEMS", Cauchy_Elems, 100); /*!\brief CONV_CAUCHY_EPS\n DESCRIPTION: Epsilon to control the series convergence \n DEFAULT: 1e-10 \ingroup Config*/ addDoubleOption("CONV_CAUCHY_EPS", Cauchy_Eps, 1E-10); - /*!\brief CONV_FIELD\n DESCRIPTION: Output field to monitor \n Default: depends on solver \ingroup Config*/ - addStringListOption("CONV_FIELD", nConvField, ConvField); /*!\brief CONV_WINDOW_STARTITER\n DESCRIPTION: Iteration number after START_ITER_WND to begin convergence monitoring\n DEFAULT: 15 \ingroup Config*/ addUnsignedLongOption("CONV_WINDOW_STARTITER", Wnd_StartConv_Iter, 15); - /*!\brief CONV_WINDOW_CAUCHY_ELEMS\n DESCRIPTION: Number of elements to apply the criteria. \n DEFAULT 100 \ingroup Config*/ - addUnsignedShortOption("CONV_WINDOW_CAUCHY_ELEMS", Wnd_Cauchy_Elems, 100); /*!\brief CONV_WINDOW_CAUCHY_EPS\n DESCRIPTION: Epsilon to control the series convergence \n DEFAULT: 1e-3 \ingroup Config*/ addDoubleOption("CONV_WINDOW_CAUCHY_EPS", Wnd_Cauchy_Eps, 1E-3); + /*!\brief CONV_WINDOW_CAUCHY_ELEMS\n DESCRIPTION: Number of elements to apply the criteria. \n DEFAULT 100 \ingroup Config*/ + addUnsignedShortOption("CONV_WINDOW_CAUCHY_ELEMS", Wnd_Cauchy_Elems, 100); /*!\brief WINDOW_CAUCHY_CRIT \n DESCRIPTION: Determines, if the cauchy convergence criterion should be used for windowed time averaged objective functions*/ addBoolOption("WINDOW_CAUCHY_CRIT",Wnd_Cauchy_Crit, false); /*!\brief CONV_WINDOW_FIELD @@ -2051,7 +2051,7 @@ void CConfig::SetConfig_Options() { /*!\par CONFIG_CATEGORY: Input/output files and formats \ingroup Config */ /*--- Options related to input/output files and formats ---*/ - +nijso /*!\brief OUTPUT_FORMAT \n DESCRIPTION: I/O format for output plots. \n OPTIONS: see \link TabOutput_Map \endlink \n DEFAULT: TECPLOT \ingroup Config */ addEnumOption("TABULAR_FORMAT", Tab_FileFormat, TabOutput_Map, TAB_OUTPUT::TAB_CSV); /*!\brief OUTPUT_PRECISION \n DESCRIPTION: Set .precision(value) to specified value for SU2_DOT and HISTORY output. Useful for exact gradient validation. \n DEFAULT: 6 \ingroup Config */ @@ -5429,10 +5429,10 @@ void CConfig::SetMarkers(SU2_COMPONENT val_software) { iMarker_Smoluchowski_Maxwell, iMarker_Isothermal,iMarker_HeatFlux,iMarker_HeatTansfer, iMarker_EngineInflow, iMarker_EngineExhaust, iMarker_Damper, - iMarker_Displacement, iMarker_Load, iMarker_FlowLoad, iMarker_Internal, + iMarker_Displacement, iMarker_Load, iMarker_Internal, iMarker_Monitoring, iMarker_Designing, iMarker_GeoEval, iMarker_Plotting, iMarker_Analyze, iMarker_DV, iMarker_Moving, iMarker_SobolevBC, iMarker_PyCustom, iMarker_Supersonic_Inlet, iMarker_Supersonic_Outlet, - iMarker_Clamped, iMarker_ZoneInterface, iMarker_CHTInterface, iMarker_Load_Dir, iMarker_Disp_Dir, iMarker_Load_Sine, + iMarker_Clamped, iMarker_ZoneInterface, iMarker_CHTInterface, iMarker_Load_Dir, iMarker_Disp_Dir, iMarker_Fluid_Load, iMarker_Deform_Mesh, iMarker_Deform_Mesh_Sym_Plane, iMarker_ActDiskInlet, iMarker_ActDiskOutlet, iMarker_Turbomachinery, iMarker_MixingPlaneInterface; @@ -5448,8 +5448,8 @@ void CConfig::SetMarkers(SU2_COMPONENT val_software) { nMarker_HeatFlux + nMarker_HeatTransfer + nMarker_EngineInflow + nMarker_EngineExhaust + nMarker_Internal + nMarker_Supersonic_Inlet + nMarker_Supersonic_Outlet + nMarker_Displacement + nMarker_Load + - nMarker_FlowLoad + nMarker_Custom + nMarker_Damper + nMarker_Fluid_Load + - nMarker_Clamped + nMarker_Load_Sine + nMarker_Load_Dir + nMarker_Disp_Dir + + nMarker_Custom + nMarker_Damper + nMarker_Fluid_Load + + nMarker_Clamped + nMarker_Load_Dir + nMarker_Disp_Dir + nMarker_ActDiskInlet + nMarker_ActDiskOutlet + nMarker_ZoneInterface; /*--- Add the possible send/receive domains ---*/ @@ -5780,22 +5780,22 @@ void CConfig::SetMarkers(SU2_COMPONENT val_software) { iMarker_CfgFile++; } - for (iMarker_Load_Sine = 0; iMarker_Load_Sine < nMarker_Load_Sine; iMarker_Load_Sine++) { - Marker_CfgFile_TagBound[iMarker_CfgFile] = Marker_Load_Sine[iMarker_Load_Sine]; - Marker_CfgFile_KindBC[iMarker_CfgFile] = LOAD_SINE_BOUNDARY; - iMarker_CfgFile++; - } + // for (iMarker_Load_Sine = 0; iMarker_Load_Sine < nMarker_Load_Sine; iMarker_Load_Sine++) { + // Marker_CfgFile_TagBound[iMarker_CfgFile] = Marker_Load_Sine[iMarker_Load_Sine]; + // Marker_CfgFile_KindBC[iMarker_CfgFile] = LOAD_SINE_BOUNDARY; + // iMarker_CfgFile++; + // } for (iMarker_Fluid_Load = 0; iMarker_Fluid_Load < nMarker_Fluid_Load; iMarker_Fluid_Load++) { Marker_CfgFile_TagBound[iMarker_CfgFile] = Marker_Fluid_Load[iMarker_Fluid_Load]; iMarker_CfgFile++; } - for (iMarker_FlowLoad = 0; iMarker_FlowLoad < nMarker_FlowLoad; iMarker_FlowLoad++) { - Marker_CfgFile_TagBound[iMarker_CfgFile] = Marker_FlowLoad[iMarker_FlowLoad]; - Marker_CfgFile_KindBC[iMarker_CfgFile] = FLOWLOAD_BOUNDARY; - iMarker_CfgFile++; - } + // for (iMarker_FlowLoad = 0; iMarker_FlowLoad < nMarker_FlowLoad; iMarker_FlowLoad++) { + // Marker_CfgFile_TagBound[iMarker_CfgFile] = Marker_FlowLoad[iMarker_FlowLoad]; + // Marker_CfgFile_KindBC[iMarker_CfgFile] = FLOWLOAD_BOUNDARY; + // iMarker_CfgFile++; + // } for (iMarker_CfgFile = 0; iMarker_CfgFile < nMarker_CfgFile; iMarker_CfgFile++) { Marker_CfgFile_Monitoring[iMarker_CfgFile] = NO; @@ -5956,9 +5956,9 @@ void CConfig::SetOutput(SU2_COMPONENT val_software, unsigned short val_izone) { iMarker_Smoluchowski_Maxwell, iWall_Catalytic, iMarker_Giles, iMarker_Outlet, iMarker_Isothermal, iMarker_HeatFlux, iMarker_HeatTransfer, iMarker_EngineInflow, iMarker_EngineExhaust, iMarker_Displacement, iMarker_Damper, - iMarker_Load, iMarker_FlowLoad, iMarker_Internal, iMarker_Monitoring, + iMarker_Load, iMarker_Internal, iMarker_Monitoring, iMarker_Designing, iMarker_GeoEval, iMarker_Plotting, iMarker_Analyze, iMarker_DV, iDV_Value, - iMarker_ZoneInterface, iMarker_PyCustom, iMarker_Load_Dir, iMarker_Disp_Dir, iMarker_Load_Sine, iMarker_Clamped, + iMarker_ZoneInterface, iMarker_PyCustom, iMarker_Load_Dir, iMarker_Disp_Dir, iMarker_Clamped, iMarker_Moving, iMarker_Supersonic_Inlet, iMarker_Supersonic_Outlet, iMarker_ActDiskInlet, iMarker_Emissivity, iMarker_ActDiskOutlet, iMarker_MixingPlaneInterface, @@ -7239,14 +7239,14 @@ void CConfig::SetOutput(SU2_COMPONENT val_software, unsigned short val_izone) { BoundaryTable.PrintFooter(); } - if (nMarker_FlowLoad != 0) { - BoundaryTable << "Flow load boundary"; - for (iMarker_FlowLoad = 0; iMarker_FlowLoad < nMarker_FlowLoad; iMarker_FlowLoad++) { - BoundaryTable << Marker_FlowLoad[iMarker_FlowLoad]; - if (iMarker_FlowLoad < nMarker_FlowLoad-1) BoundaryTable << " "; - } - BoundaryTable.PrintFooter(); - } + // if (nMarker_FlowLoad != 0) { + // BoundaryTable << "Flow load boundary"; + // for (iMarker_FlowLoad = 0; iMarker_FlowLoad < nMarker_FlowLoad; iMarker_FlowLoad++) { + // BoundaryTable << Marker_FlowLoad[iMarker_FlowLoad]; + // if (iMarker_FlowLoad < nMarker_FlowLoad-1) BoundaryTable << " "; + // } + // BoundaryTable.PrintFooter(); + // } if (nMarker_Internal != 0) { BoundaryTable << "Internal boundary"; @@ -7446,14 +7446,14 @@ void CConfig::SetOutput(SU2_COMPONENT val_software, unsigned short val_izone) { BoundaryTable.PrintFooter(); } - if (nMarker_Load_Sine != 0) { - BoundaryTable << "Sine-Wave boundary"; - for (iMarker_Load_Sine = 0; iMarker_Load_Sine < nMarker_Load_Sine; iMarker_Load_Sine++) { - BoundaryTable << Marker_Load_Sine[iMarker_Load_Sine]; - if (iMarker_Load_Sine < nMarker_Load_Sine-1) BoundaryTable << " "; - } - BoundaryTable.PrintFooter(); - } + // if (nMarker_Load_Sine != 0) { + // BoundaryTable << "Sine-Wave boundary"; + // for (iMarker_Load_Sine = 0; iMarker_Load_Sine < nMarker_Load_Sine; iMarker_Load_Sine++) { + // BoundaryTable << Marker_Load_Sine[iMarker_Load_Sine]; + // if (iMarker_Load_Sine < nMarker_Load_Sine-1) BoundaryTable << " "; + // } + // BoundaryTable.PrintFooter(); + // } if (nMarker_Emissivity != 0) { BoundaryTable << "Radiative boundary"; @@ -9484,26 +9484,26 @@ const su2double* CConfig::GetDisp_Dir(string val_marker) const { return Disp_Dir[iMarker_Disp_Dir]; } -su2double CConfig::GetLoad_Sine_Amplitude(string val_marker) const { - unsigned short iMarker_Load_Sine; - for (iMarker_Load_Sine = 0; iMarker_Load_Sine < nMarker_Load_Sine; iMarker_Load_Sine++) - if (Marker_Load_Sine[iMarker_Load_Sine] == val_marker) break; - return Load_Sine_Amplitude[iMarker_Load_Sine]; -} +// su2double CConfig::GetLoad_Sine_Amplitude(string val_marker) const { +// unsigned short iMarker_Load_Sine; +// for (iMarker_Load_Sine = 0; iMarker_Load_Sine < nMarker_Load_Sine; iMarker_Load_Sine++) +// if (Marker_Load_Sine[iMarker_Load_Sine] == val_marker) break; +// return Load_Sine_Amplitude[iMarker_Load_Sine]; +// } -su2double CConfig::GetLoad_Sine_Frequency(string val_marker) const { - unsigned short iMarker_Load_Sine; - for (iMarker_Load_Sine = 0; iMarker_Load_Sine < nMarker_Load_Sine; iMarker_Load_Sine++) - if (Marker_Load_Sine[iMarker_Load_Sine] == val_marker) break; - return Load_Sine_Frequency[iMarker_Load_Sine]; -} +// su2double CConfig::GetLoad_Sine_Frequency(string val_marker) const { +// unsigned short iMarker_Load_Sine; +// for (iMarker_Load_Sine = 0; iMarker_Load_Sine < nMarker_Load_Sine; iMarker_Load_Sine++) +// if (Marker_Load_Sine[iMarker_Load_Sine] == val_marker) break; +// return Load_Sine_Frequency[iMarker_Load_Sine]; +// } -const su2double* CConfig::GetLoad_Sine_Dir(string val_marker) const { - unsigned short iMarker_Load_Sine; - for (iMarker_Load_Sine = 0; iMarker_Load_Sine < nMarker_Load_Sine; iMarker_Load_Sine++) - if (Marker_Load_Sine[iMarker_Load_Sine] == val_marker) break; - return Load_Sine_Dir[iMarker_Load_Sine]; -} +// const su2double* CConfig::GetLoad_Sine_Dir(string val_marker) const { +// unsigned short iMarker_Load_Sine; +// for (iMarker_Load_Sine = 0; iMarker_Load_Sine < nMarker_Load_Sine; iMarker_Load_Sine++) +// if (Marker_Load_Sine[iMarker_Load_Sine] == val_marker) break; +// return Load_Sine_Dir[iMarker_Load_Sine]; +// } su2double CConfig::GetWall_Emissivity(string val_marker) const { @@ -9517,12 +9517,12 @@ su2double CConfig::GetWall_Emissivity(string val_marker) const { return Wall_Emissivity[iMarker_Emissivity]; } -su2double CConfig::GetFlowLoad_Value(string val_marker) const { - unsigned short iMarker_FlowLoad; - for (iMarker_FlowLoad = 0; iMarker_FlowLoad < nMarker_FlowLoad; iMarker_FlowLoad++) - if (Marker_FlowLoad[iMarker_FlowLoad] == val_marker) break; - return FlowLoad_Value[iMarker_FlowLoad]; -} +//su2double CConfig::GetFlowLoad_Value(string val_marker) const { +// unsigned short iMarker_FlowLoad; +// for (iMarker_FlowLoad = 0; iMarker_FlowLoad < nMarker_FlowLoad; iMarker_FlowLoad++) +// if (Marker_FlowLoad[iMarker_FlowLoad] == val_marker) break; +// return FlowLoad_Value[iMarker_FlowLoad]; +//} short CConfig::FindInterfaceMarker(unsigned short iInterface) const { diff --git a/Common/src/geometry/meshreader/CSU2ASCIIMeshReaderFVM.cpp b/Common/src/geometry/meshreader/CSU2ASCIIMeshReaderFVM.cpp index 92e63d0623d..8aed5f58615 100644 --- a/Common/src/geometry/meshreader/CSU2ASCIIMeshReaderFVM.cpp +++ b/Common/src/geometry/meshreader/CSU2ASCIIMeshReaderFVM.cpp @@ -40,8 +40,7 @@ CSU2ASCIIMeshReaderFVM::CSU2ASCIIMeshReaderFVM(CConfig *val_config, actuator_disk = (((config->GetnMarker_ActDiskInlet() != 0) || (config->GetnMarker_ActDiskOutlet() != 0)) && ((config->GetKind_SU2() == SU2_COMPONENT::SU2_CFD) || - ((config->GetKind_SU2() == SU2_COMPONENT::SU2_DEF) && - (config->GetActDisk_SU2_DEF())))); + (config->GetKind_SU2() == SU2_COMPONENT::SU2_DEF) )); if (config->GetActDisk_DoubleSurface()) actuator_disk = false; /* Read the basic metadata and perform some basic error checks. */ diff --git a/config_template.cfg b/config_template.cfg index dd501098f13..cc68faa89ec 100644 --- a/config_template.cfg +++ b/config_template.cfg @@ -153,6 +153,9 @@ WINDOW_START_ITER = 500 % Window used for reverse sweep and direct run. Options (SQUARE, HANN, HANN_SQUARE, BUMP) Square is default. WINDOW_FUNCTION = SQUARE % +% Starting direct solver iteration for the unsteady adjoint +UNST_ADJOINT_ITER= 0 +% % ------------------------------- DES Parameters ------------------------------% % % Specify Hybrid RANS/LES model (SA_DES, SA_DDES, SA_ZDES, SA_EDDES) @@ -322,6 +325,19 @@ ITER_DCL_DALPHA= 500 EVAL_DOF_DCX= NO % Damping factor for fixed CL mode. NETTHRUST_DBCTHRUST= 1.0 +% +% parameter for the definition of a complex objective function +DCD_DCL_VALUE= 0.0 +% +% parameter for the definition of a complex objective function +DCMX_DCL_VALUE= 0.0 +% +% parameter for the definition of a complex objective function +DCMY_DCL_VALUE= 0.0 +% +% parameter for the definition of a complex objective function +DCMZ_DCL_VALUE= 0.0 + % ---------------------- REFERENCE VALUE DEFINITION ---------------------------% % % Reference origin for moment computation (m or in) @@ -332,6 +348,12 @@ REF_ORIGIN_MOMENT_Z = 0.00 % Reference length for moment non-dimensional coefficients (m or in) REF_LENGTH= 1.0 % +% Reference velocity (incompressible only) +REF_VELOCITY= 1.0 +% +% Reference viscosity (incompressible only) +REF_VISCOSITY= 1.0 +% % Reference area for non-dimensional force coefficients (0 implies automatic % calculation) (m^2 or in^2) REF_AREA= 1.0 @@ -620,6 +642,9 @@ DRAG_IN_SONICBOOM= 0.0 % -------------------------- ENGINE SIMULATION --------------------------------% % +% Evaluate a problem with engines +ENGINE= NO +% % Highlite area to compute MFR (1 in2 by default) HIGHLITE_AREA= 1.0 % @@ -640,10 +665,14 @@ ENGINE_NU_FACTOR= 3.0 % % Actuator disk jump definition using ratio or difference (DIFFERENCE, RATIO) ACTDISK_JUMP= DIFFERENCE -% +% % secondary flow value for actuator disk ACTDISK_SECONDARY_FLOW= 0.0 % +% Actuator disk double surface +ACTDISK_DOUBLE_SURFACE= NO +% +% % Number of times BC Thrust is updated in a fix Net Thrust problem (5 by default) UPDATE_BCTHRUST= 100 % @@ -658,6 +687,9 @@ SUBSONIC_ENGINE_CYL= ( 0.0, 0.0, 0.0, 1.0, 0.0 , 0.0, 1.0 ) % % Flow variables that define the subsonic region (Mach, Alpha, Beta, Pressure, Temperature) SUBSONIC_ENGINE_VALUES= ( 0.4, 0.0, 0.0, 2116.216, 518.67 ) +% +% Definition of the distortion rack (radial number of proves / circumferential density (degree) +DISTORTION_RACK= (0.0, 0.0) % ------------------------- TURBOMACHINERY SIMULATION -------------------------% % @@ -702,7 +734,15 @@ MIXEDOUT_COEFF= (1.0, 1.0E-05, 15) % Limit of Mach number below which the mixedout algorithm is substituted % with a AREA average algorithm to avoid numerical issues AVERAGE_MACH_LIMIT= 0.05 - +% +% Integer number of periodic time instances for Harmonic Balance +TIME_INSTANCES= 1 +% +% Time period for Harmonic Balance wihtout moving meshes +HB_PERIOD= -1 +% +% Turn on/off harmonic balance preconditioning +HB_PRECONDITION= NO % ------------------- RADIATIVE HEAT TRANSFER SIMULATION ----------------------% % % Type of radiation model (NONE, P1) @@ -758,7 +798,7 @@ SCHMIDT_NUMBER_LAMINAR= 1.0 % Turbulent Schmidt number of mass diffusion SCHMIDT_NUMBER_TURBULENT= 0.7 % -% list of constant Lewis numbers for all species for +% list of constant Lewis numbers for all species for CONSTANT_LEWIS_NUMBER= (1,1,1) % % Inlet Species boundary marker(s) with the following format: @@ -891,6 +931,11 @@ SPECIFIED_INLET_PROFILE= NO % File specifying inlet profile INLET_FILENAME= inlet.dat % +% If a file is provided to specify the inlet profile, +% this tolerance will be used to match the coordinates in the input file to +% the points on the grid. +% INLET_MATCHING_TOLERANCE= 1e-6 +% % Inlet boundary marker(s) with the following formats (NONE = no marker) % Total Conditions: (inlet marker, total temp, total pressure, flow_direction_x, % flow_direction_y, flow_direction_z, ... ) where flow_direction is @@ -987,6 +1032,9 @@ MARKER_SHROUD= (NONE) % MARKER_ZONE_INTERFACE= ( NONE ) % +% CHT interface boundary marker(s) +MARKER_CHT_INTERFACE= ( NONE ) +% % Specifies the interface (s) % The kind of interface is defined by listing pairs of markers (one from each % zone connected by the interface) @@ -999,6 +1047,9 @@ MARKER_ZONE_INTERFACE= ( NONE ) % MARKER_FLUID_INTERFACE= ( NONE ) % +% Marker(s) in which the flow load is computed/applied +MARKER_FLUID_LOAD= ( NONE ) +% % Kind of interface interpolation among different zones (NEAREST_NEIGHBOR, % ISOPARAMETRIC, SLIDING_MESH) KIND_INTERPOLATION= NEAREST_NEIGHBOR @@ -1007,6 +1058,12 @@ KIND_INTERPOLATION= NEAREST_NEIGHBOR % the natural groth of the machine (i.e, from the first blade to the last) MARKER_TURBOMACHINERY= ( NONE ) % +% Integer number of spanwise sections to compute 3D turbo BC and Performance for turbomachinery +NUM_SPANWISE_SECTIONS= 1 +% +% type of algorithm to identify the span-wise sections at the turbo boundaries. 1 means automatic. +SPANWISE_KIND= 1 +% % Mixing-plane interface markers must be specified to activate the transfer of % information between zones MARKER_MIXINGPLANE_INTERFACE= ( NONE ) @@ -1038,7 +1095,37 @@ CATALYTIC_EFFICIENCY= 0.2 % Inlet Turbulent boundary marker(s) with the following format: % (inlet_marker1, TurbIntensity1, RatioTurbLamViscosity1, inlet_marker2, TurbIntensity2, RatioTurbLamViscosity2, ...) MARKER_INLET_TURBULENT= (inlet1, 0.05, 15, inlet2, 0.02, ...) - +% +% Custom boundary marker(s) +MARKER_CUSTOM= ( NONE ) +% +% Smoluchowski/Maxwell wall boundary marker(s) +MARKER_SMOLUCHOWSKI_MAXWELL= ( NONE ) +% +% Clamped boundary marker(s) +MARKER_CLAMPED= ( NONE ) +% +% Load boundary marker(s) +MARKER_DAMPER= ( NONE ) +% +% Load boundary marker(s) +% Format: (inlet marker, load, multiplier, dir_x, dir_y, dir_z, ... ), +% i.e. primitive variables specified. +MARKER_LOAD= ( NONE ) +% +% option to apply the load as a sine +SINE_LOAD= NO +% the 1st coeff is the amplitude, +% the 2nd is the frequency, +% the 3rd is the phase in radians +SINE_LOAD_COEFF= (0.0, 0.0, 0.0) +% +RAMP_AND_RELEASE_LOAD= NO +% +% Load boundary marker(s) +% Format: (inlet marker, load, multiplier, dir_x, dir_y, dir_z, ... ), +% i.e. primitive variables specified. +MARKER_DISPLACEMENT= ( NONE ) % ------------------------ WALL ROUGHNESS DEFINITION --------------------------% % The equivalent sand grain roughness height (k_s) on each of the wall. This must be in m. % This is a list of (string, double) each element corresponding to the MARKER defined in WALL_TYPE. @@ -1062,6 +1149,13 @@ WALLMODEL_MAXITER= 200 % [Expert] relaxation factor for the Newton iterations of the standard wall function WALLMODEL_RELFAC= 0.5 +% ------------------------ CONJUGATE HEAT TRANSFER --------------------------% +% +% Relaxation of the CHT coupling +RELAXATION_FACTOR_CHT= 1.0 +% +% + % ------------------------ SURFACES IDENTIFICATION ----------------------------% % % Marker(s) of the surface in the surface flow solution file @@ -1115,6 +1209,9 @@ CFL_ADAPT_PARAM= ( 0.1, 2.0, 10.0, 1e10, 0.001 ) % Maximum Delta Time in local time stepping simulations MAX_DELTA_TIME= 1E6 % +% External iteration offset due to restart +EXT_ITER_OFFSET= 0 +% % Runge-Kutta alpha coefficients RK_ALPHA_COEFF= ( 0.66667, 0.66667, 1.000000 ) % @@ -1184,6 +1281,8 @@ ADJ_SHARP_LIMITER_COEFF= 3.0 % Remove sharp edges from the sensitivity evaluation (NO, YES) SENS_REMOVE_SHARP = NO % +SENS_SMOOTHING= NONE +% % Freeze the value of the limiter after a number of iterations LIMITER_ITER= 999999 % @@ -1212,6 +1311,15 @@ LINEAR_SOLVER= FGMRES % Same for discrete adjoint (smoothers not supported), replaces LINEAR_SOLVER in SU2_*_AD codes. DISCADJ_LIN_SOLVER= FGMRES % +% Linear solver for the turbulent adjoint systems +ADJTURB_LIN_SOLVER= FGMRES +% +% Preconditioner for the turbulent adjoint Krylov linear solvers +ADJTURB_LIN_PREC= ILU +% +% Maximum number of iterations of the turbulent adjoint linear solver for the implicit formulation +ADJTURB_LIN_ITER= 10 +% % Preconditioner of the Krylov linear solver or type of smoother (ILU, LU_SGS, LINELET, JACOBI) LINEAR_SOLVER_PREC= ILU % @@ -1266,6 +1374,15 @@ CONV_NUM_METHOD_FLOW= ROE % Roe Low Dissipation function for Hybrid RANS/LES simulations (FD, NTS, NTS_DUCROS) ROE_LOW_DISSIPATION= FD % +% Roe coefficient +ROE_KAPPA= 0.5 +% +% Time Step for dual time stepping simulations (s) +MIN_ROE_TURKEL_PREC= 0.01 +% +% Time Step for dual time stepping simulations (s) +MAX_ROE_TURKEL_PREC= 0.2 +% % Post-reconstruction correction for low Mach number flows (NO, YES) LOW_MACH_CORR= NO % @@ -1289,6 +1406,10 @@ ENTROPY_FIX_COEFF= 0.0 % only) more diagonal dominant (but mathematically incorrect) so that higher CFL can be used. CENTRAL_JACOBIAN_FIX_FACTOR= 4.0 % +% Control numerical properties of the global Jacobian matrix using a multiplication factor +% for incompressible central schemes +CENTRAL_INC_JACOBIAN_FIX_FACTOR= 1.0 +% % Time discretization (RUNGE-KUTTA_EXPLICIT, EULER_IMPLICIT, EULER_EXPLICIT) TIME_DISCRE_FLOW= EULER_IMPLICIT % @@ -1296,7 +1417,12 @@ TIME_DISCRE_FLOW= EULER_IMPLICIT % For multizone discrete adjoint it will use FGMRES on inner iterations with restart frequency % equal to "QUASI_NEWTON_NUM_SAMPLES". NEWTON_KRYLOV= NO - +% +% Integer parameters {startup iters, precond iters, initial tolerance relaxation}. +NEWTON_KRYLOV_IPARAM= (10, 3, 2) +% +% Double parameters {startup residual drop, precond tolerance, full tolerance residual drop, findiff step}. +NEWTON_KRYLOV_DPARAM= (1.0, 0.1, -6.0, 1e-5) % ------------------- FEM FLOW NUMERICAL METHOD DEFINITION --------------------% % % FEM numerical method (DG) @@ -1330,7 +1456,7 @@ ALIGNED_BYTES_MATMUL= 128 TIME_DISCRE_FEM_FLOW= RUNGE-KUTTA_EXPLICIT % % Number of time DOFs for the predictor step of ADER-DG (2 by default) -%TIME_DOFS_ADER_DG= 2 +TIME_DOFS_ADER_DG= 2 % Factor applied during quadrature in time for ADER-DG. (2.0 by default) %QUADRATURE_FACTOR_TIME_ADER_DG = 2.0 % @@ -1345,6 +1471,8 @@ KIND_MATRIX_COLORING= GREEDY_COLORING % Specify shock capturing method for DG KIND_FEM_DG_SHOCK= NONE % +% Time discretization +TIME_DISCRE_FEA= NEWMARK_IMPLICIT % -------------------- Weakly Coupled Heat ------------------% % WEAKLY_COUPLED_HEAT_EQUATION= NO @@ -1382,6 +1510,9 @@ TIME_DISCRE_HEAT= EULER_IMPLICIT % Frozen the slope limiter in the discrete adjoint formulation (NO, YES) FROZEN_LIMITER_DISC= NO % +% Continuous Adjoint frozen viscosity +% FROZEN_VISC_CONT= NO +% % Frozen the turbulent viscosity in the discrete adjoint formulation (NO, YES) FROZEN_VISC_DISC= NO % @@ -1436,9 +1567,14 @@ GEO_MARKER= ( airfoil ) % Description of the geometry to be analyzed (AIRFOIL, WING) GEO_DESCRIPTION= AIRFOIL % +% Z location of the waterline +GEO_WATERLINE_LOCATION= 0.0 +% % Coordinate of the stations to be analyzed GEO_LOCATION_STATIONS= (0.0, 0.5, 1.0) % +% Definition of the nacelle location (higlite coordinates, tilt angle, toe angle) +GEO_NACELLE_LOCATION= (0.0, 0.0, 0.0, 0.0, 0.0) % Geometrical bounds (Y coordinate) for the wing geometry analysis or % fuselage evaluation (X coordinate) GEO_BOUNDS= (1.5, 3.5) @@ -1924,6 +2060,9 @@ DEFINITION_DV= ( 1, 1.0 | airfoil | 0, 0.05 ); ( 1, 1.0 | airfoil | 0, 0.10 ); ( % Use combined objective within gradient evaluation: may reduce cost to compute gradients when using the adjoint formulation. OPT_COMBINE_OBJECTIVE = NO % +% +% Number of iterations to average the objective +ITER_AVERAGE_OBJ= 0 % --------------------- LIBROM PARAMETERS -----------------------% % LibROM can be found here: https://github.com/LLNL/libROM % From b850cd31ca01942a873812360323838d3767e0a6 Mon Sep 17 00:00:00 2001 From: bigfooted Date: Sun, 19 Feb 2023 11:21:07 +0100 Subject: [PATCH 03/34] alignment --- Common/include/CConfig.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Common/include/CConfig.hpp b/Common/include/CConfig.hpp index 3b488c27314..62f5a8b856e 100644 --- a/Common/include/CConfig.hpp +++ b/Common/include/CConfig.hpp @@ -1539,10 +1539,10 @@ class CConfig { */ const su2double *GetHold_GridFixed_Coord(void) const { return grid_fix; } - /*! - * \brief Get the values of subsonic engine. - * \return Values of subsonic engine. - */ + /*! + * \brief Get the values of subsonic engine. + * \return Values of subsonic engine. + */ const su2double *GetSubsonicEngine_Values(void) const { return eng_val; } /*! From efa6a4fe22769349f70ca66a9e5bb6eb34cb962f Mon Sep 17 00:00:00 2001 From: Nijso Date: Mon, 20 Feb 2023 08:46:57 +0100 Subject: [PATCH 04/34] Update config_template.cfg Co-authored-by: Wally Maier --- config_template.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config_template.cfg b/config_template.cfg index cc68faa89ec..9fbdc29f4d2 100644 --- a/config_template.cfg +++ b/config_template.cfg @@ -1099,7 +1099,7 @@ MARKER_INLET_TURBULENT= (inlet1, 0.05, 15, inlet2, 0.02, ...) % Custom boundary marker(s) MARKER_CUSTOM= ( NONE ) % -% Smoluchowski/Maxwell wall boundary marker(s) +% Smoluchowski/Maxwell slip wall boundary marker(s) MARKER_SMOLUCHOWSKI_MAXWELL= ( NONE ) % % Clamped boundary marker(s) From 26df91bb42643bdd64f19b578330a3bfdc875e06 Mon Sep 17 00:00:00 2001 From: bigfooted Date: Mon, 20 Feb 2023 15:58:18 +0100 Subject: [PATCH 05/34] add config options to config_template --- Common/include/CConfig.hpp | 26 ++--- .../grid_movement/CSurfaceMovement.hpp | 12 +-- Common/src/CConfig.cpp | 26 ++--- config_template.cfg | 95 +++++++++++++++++++ 4 files changed, 127 insertions(+), 32 deletions(-) diff --git a/Common/include/CConfig.hpp b/Common/include/CConfig.hpp index 62f5a8b856e..4e061e79409 100644 --- a/Common/include/CConfig.hpp +++ b/Common/include/CConfig.hpp @@ -923,8 +923,8 @@ class CConfig { bool RampAndRelease; /*!< \brief option for ramp load and release */ bool Sine_Load; /*!< \brief option for sine load */ su2double Thermal_Diffusivity; /*!< \brief Thermal diffusivity used in the heat solver. */ - su2double Cyclic_Pitch, /*!< \brief Cyclic pitch for rotorcraft simulations. */ - Collective_Pitch; /*!< \brief Collective pitch for rotorcraft simulations. */ + //su2double Cyclic_Pitch, /*!< \brief Cyclic pitch for rotorcraft simulations. */ + //Collective_Pitch; /*!< \brief Collective pitch for rotorcraft simulations. */ su2double Mach_Motion; /*!< \brief Mach number based on mesh velocity and freestream quantities. */ su2double Motion_Origin[3] = {0.0}, /*!< \brief Mesh motion origin. */ @@ -8189,17 +8189,17 @@ class CConfig { // */ //su2double GetFlowLoad_Value(string val_index) const; - /*! - * \brief Cyclic pitch amplitude for rotor blades. - * \return The specified cyclic pitch amplitude. - */ - su2double GetCyclic_Pitch(void) const { return Cyclic_Pitch; } - - /*! - * \brief Collective pitch setting for rotor blades. - * \return The specified collective pitch setting. - */ - su2double GetCollective_Pitch(void) const { return Collective_Pitch; } + // /*! + // * \brief Cyclic pitch amplitude for rotor blades. + // * \return The specified cyclic pitch amplitude. + // */ + // su2double GetCyclic_Pitch(void) const { return Cyclic_Pitch; } + + // /*! + // * \brief Collective pitch setting for rotor blades. + // * \return The specified collective pitch setting. + // */ + // su2double GetCollective_Pitch(void) const { return Collective_Pitch; } /*! * \brief Get name of the arbitrary mesh motion input file. diff --git a/Common/include/grid_movement/CSurfaceMovement.hpp b/Common/include/grid_movement/CSurfaceMovement.hpp index 564071e9338..9e6be8fdbe6 100644 --- a/Common/include/grid_movement/CSurfaceMovement.hpp +++ b/Common/include/grid_movement/CSurfaceMovement.hpp @@ -156,12 +156,12 @@ class CSurfaceMovement : public CGridMovement { void SetBoundary_Flutter3D(CGeometry *geometry, CConfig *config, CFreeFormDefBox **FFDBox, unsigned long iter, unsigned short iZone); - /*! - * \brief Set the collective pitch for a blade surface movement. - * \param[in] geometry - Geometrical definition of the problem. - * \param[in] config - Definition of the particular problem. - */ - void SetCollective_Pitch(CGeometry *geometry, CConfig *config); + // /*! + // * \brief Set the collective pitch for a blade surface movement. + // * \param[in] geometry - Geometrical definition of the problem. + // * \param[in] config - Definition of the particular problem. + // */ + // void SetCollective_Pitch(CGeometry *geometry, CConfig *config); /*! * \brief Set any surface deformationsbased on an input file. diff --git a/Common/src/CConfig.cpp b/Common/src/CConfig.cpp index ce144c82983..3baf03c048a 100644 --- a/Common/src/CConfig.cpp +++ b/Common/src/CConfig.cpp @@ -2051,7 +2051,7 @@ void CConfig::SetConfig_Options() { /*!\par CONFIG_CATEGORY: Input/output files and formats \ingroup Config */ /*--- Options related to input/output files and formats ---*/ -nijso + /*!\brief OUTPUT_FORMAT \n DESCRIPTION: I/O format for output plots. \n OPTIONS: see \link TabOutput_Map \endlink \n DEFAULT: TECPLOT \ingroup Config */ addEnumOption("TABULAR_FORMAT", Tab_FileFormat, TabOutput_Map, TAB_OUTPUT::TAB_CSV); /*!\brief OUTPUT_PRECISION \n DESCRIPTION: Set .precision(value) to specified value for SU2_DOT and HISTORY output. Useful for exact gradient validation. \n DEFAULT: 6 \ingroup Config */ @@ -2078,7 +2078,7 @@ nijso /* DESCRIPTION: Determine if the mesh file supports multizone. \n DEFAULT: true (temporarily) */ addBoolOption("MULTIZONE_MESH", Multizone_Mesh, true); - /* DESCRIPTION: Determine if we need to allocate memory to store the multizone residual. \n DEFAULT: true (temporarily) */ + /* DESCRIPTION: Determine if we need to allocate memory to store the multizone residual. \n DEFAULT: false (temporarily) */ addBoolOption("MULTIZONE_RESIDUAL", Multizone_Residual, false); /*!\brief CONV_FILENAME \n DESCRIPTION: Output file convergence history (w/o extension) \n DEFAULT: history \ingroup Config*/ @@ -2307,9 +2307,9 @@ nijso addDoubleOption("DEFORM_LIMIT", Deform_Limit, 1E6); /* DESCRIPTION: Type of element stiffness imposed for FEA mesh deformation (INVERSE_VOLUME, WALL_DISTANCE, CONSTANT_STIFFNESS) */ addEnumOption("DEFORM_STIFFNESS_TYPE", Deform_StiffnessType, Deform_Stiffness_Map, SOLID_WALL_DISTANCE); - /* DESCRIPTION: Poisson's ratio for constant stiffness FEA method of grid deformation */ + /* DESCRIPTION: Young's modulus for constant stiffness FEA method of grid deformation */ addDoubleOption("DEFORM_ELASTICITY_MODULUS", Deform_ElasticityMod, 2E11); - /* DESCRIPTION: Young's modulus and Poisson's ratio for constant stiffness FEA method of grid deformation */ + /* DESCRIPTION: Poisson's ratio for constant stiffness FEA method of grid deformation */ addDoubleOption("DEFORM_POISSONS_RATIO", Deform_PoissonRatio, 0.3); /* DESCRIPTION: Size of the layer of highest stiffness for wall distance-based mesh stiffness */ addDoubleOption("DEFORM_STIFF_LAYER_SIZE", Deform_StiffLayerSize, 0.0); @@ -2325,10 +2325,10 @@ nijso /*!\par CONFIG_CATEGORY: Rotorcraft problem \ingroup Config*/ /*--- option related to rotorcraft problems ---*/ - /* DESCRIPTION: MISSING ---*/ - addDoubleOption("CYCLIC_PITCH", Cyclic_Pitch, 0.0); - /* DESCRIPTION: MISSING ---*/ - addDoubleOption("COLLECTIVE_PITCH", Collective_Pitch, 0.0); + // /* DESCRIPTION: MISSING ---*/ + // addDoubleOption("CYCLIC_PITCH", Cyclic_Pitch, 0.0); + // /* DESCRIPTION: MISSING ---*/ + // addDoubleOption("COLLECTIVE_PITCH", Collective_Pitch, 0.0); /*!\par CONFIG_CATEGORY: FEM flow solver definition \ingroup Config*/ /*--- Options related to the finite element flow solver---*/ @@ -2356,7 +2356,7 @@ nijso /*!\par CONFIG_CATEGORY: FEA solver \ingroup Config*/ /*--- Options related to the FEA solver ---*/ - /*!\brief FEA_FILENAME \n DESCRIPTION: Filename to input for element-based properties \n Default: element_properties.dat \ingroup Config */ + /*!\brief FEA_FILENAME \n DESCRIPTION: Filename to input for element-based properties \n Default: default_element_properties.dat \ingroup Config */ addStringOption("FEA_FILENAME", FEA_FileName, string("default_element_properties.dat")); /* DESCRIPTION: Determine if advanced features are used from the element-based FEA analysis (NO, YES = experimental) */ addBoolOption("FEA_ADVANCED_MODE", FEAAdvancedMode, false); @@ -2385,7 +2385,7 @@ nijso /*!\brief DESIGN_VARIABLE_FEA * \n DESCRIPTION: Design variable for FEA problems \n OPTIONS: See \link DVFEA_Map \endlink \n DEFAULT VENKATAKRISHNAN \ingroup Config */ addEnumOption("DESIGN_VARIABLE_FEA", Kind_DV_FEA, DVFEA_Map, NODV_FEA); - +// nijso /* DESCRIPTION: Consider a reference solution for the structure (optimization applications) * Options: NO, YES \ingroup Config */ addBoolOption("REFERENCE_GEOMETRY", RefGeom, false); @@ -2398,9 +2398,6 @@ nijso /*!\brief REFERENCE_GEOMETRY_SURFACE\n DESCRIPTION: If true consider only the surfaces where loads are applied. \ingroup Config*/ addBoolOption("REFERENCE_GEOMETRY_SURFACE", RefGeomSurf, false); - /*!\brief TOTAL_DV_PENALTY\n DESCRIPTION: Penalty weight value to maintain the total sum of DV constant \ingroup Config*/ - addDoubleOption("TOTAL_DV_PENALTY", DV_Penalty, 0); - /*!\brief REFERENCE_NODE\n DESCRIPTION: Reference node for the structure (optimization applications) */ addUnsignedLongOption("REFERENCE_NODE", refNodeID, 0); /*!\brief REFERENCE_NODE_DISPLACEMENT\n DESCRIPTION: Target displacement of the reference node \ingroup Config*/ @@ -2408,6 +2405,9 @@ nijso /*!\brief REFERENCE_NODE_PENALTY\n DESCRIPTION: Penalty weight value for the objective function \ingroup Config*/ addDoubleOption("REFERENCE_NODE_PENALTY", RefNode_Penalty, 1E3); + /*!\brief TOTAL_DV_PENALTY\n DESCRIPTION: Penalty weight value to maintain the total sum of DV constant \ingroup Config*/ + addDoubleOption("TOTAL_DV_PENALTY", DV_Penalty, 0); + /*!\brief STRESS_PENALTY_PARAM\n DESCRIPTION: Maximum allowed stress and KS exponent for structural optimization \ingroup Config*/ addDoubleArrayOption("STRESS_PENALTY_PARAM", 2, StressPenaltyParam.data()); diff --git a/config_template.cfg b/config_template.cfg index cc68faa89ec..8c4072f8343 100644 --- a/config_template.cfg +++ b/config_template.cfg @@ -743,6 +743,10 @@ HB_PERIOD= -1 % % Turn on/off harmonic balance preconditioning HB_PRECONDITION= NO +% +% Omega_HB = 2*PI*frequency - frequencies for Harmonic Balance method +OMEGA_HB= (0,1.0,-1.0) + % ------------------- RADIATIVE HEAT TRANSFER SIMULATION ----------------------% % % Type of radiation model (NONE, P1) @@ -1363,6 +1367,11 @@ MG_DAMP_RESTRICTION= 0.75 % % Damping factor for the correction prolongation MG_DAMP_PROLONGATION= 0.75 +% +% -------------------------- MESH SMOOTHING -----------------------------% +% +% Before each computation, implicitly smooth the nodal coordinates +SMOOTH_GEOMETRY= 0 % -------------------- FLOW NUMERICAL METHOD DEFINITION -----------------------% % @@ -1473,6 +1482,41 @@ KIND_FEM_DG_SHOCK= NONE % % Time discretization TIME_DISCRE_FEA= NEWMARK_IMPLICIT +% +% ------------------- FEA SOLVER FOR FLUID-STRUCTURE INTERACTION --------------------% +% +% Filename to input for element-based properties +FEA_FILENAME= default_element_properties.dat +% +% Determine if advanced features are used from the element-based FEA analysis (NO, YES = experimental) +FEA_ADVANCED_MODE= NO +% +% Modulus of elasticity +ELASTICITY_MODULUS= 1000.0 +% +% Poisson ratio +POISSON_RATIO= 0.35 +% +% Knowles B constant +KNOWLES_B= 1.0 +% +% Knowles N constant +KNOWLES_N= 1.0 + +% -------------------- Dielectric effects ------------------% +% +% Include DE effects +DE_EFFECTS= NO +% +% Value of the Dielectric Elastomer constant +ELECTRIC_FIELD_CONST= 4.25e-11 +% +% Modulus of the Electric Fields +ELECTRIC_FIELD_MOD= 20e5 +% +% Direction of the Electic Fields +ELECTRIC_FIELD_DIR= (0.0, 1.0) + % -------------------- Weakly Coupled Heat ------------------% % WEAKLY_COUPLED_HEAT_EQUATION= NO @@ -1541,6 +1585,13 @@ LIMIT_ADJFLOW= 1E6 % % Use multigrid in the adjoint problem (NO, YES) MG_ADJFLOW= YES +% ---------------- MULTIZONE DEFINITION --------------% +% +% Determine if the mesh file supports multizone. \n DEFAULT: true (temporarily) +MULTIZONE_MESH= YES +% +% Determine if we need to allocate memory to store the multizone residual. \n DEFAULT: true (temporarily) +MULTIZONE_RESIDUAL= NO % ---------------- ADJOINT-TURBULENT NUMERICAL METHOD DEFINITION --------------% % @@ -1665,6 +1716,16 @@ DV_SENS_FILENAME= surface_sensitivity.dat % rows of x, y, z, dJ/dx, dJ/dy, dJ/dz for each grid point. DV_SENSITIVITY_FORMAT= SU2_NATIVE DV_UNORDERED_SENS_FILENAME= unordered_sensitivity.dat +% +% Hold the grid fixed in a region +HOLD_GRID_FIXED= NO +% +% Coordinates of the box where the grid will be deformed (Xmin, Ymin, Zmin, Xmax, Ymax, Zmax) +HOLD_GRID_FIXED_COORDS= (-1e15, -1e15, -1e15, 1e15, 1e15, 1e15) +% +% Design variable for FEA problems +% options: NONE, YOUNG_MODULUS, POISSON_RATIO, DENSITY, DEAD_WEIGHT, ELECTRIC_FIELD +DESIGN_VARIABLE_FEA= NONE % ---------------- MESH DEFORMATION PARAMETERS (NEW SOLVER) -------------------% % @@ -1706,6 +1767,15 @@ DEFORM_STIFFNESS_TYPE= WALL_DISTANCE % Deform the grid only close to the surface. It is possible to specify how much % of the volumetric grid is going to be deformed in meters or inches (1E6 by default) DEFORM_LIMIT = 1E6 +% +% Young modulus for constant stiffness FEA method of grid deformation +DEFORM_ELASTICITY_MODULUS= 2e11 +% +% Poisson ratio for constant stiffness FEA method of grid deformation +DEFORM_POISSON_RATIO= 0.3 +% +% Size of the layer of highest stiffness for wall distance-based mesh stiffness +DEFORM_STIFF_LAYER_SIZE= 0.0 % -------------------- FREE-FORM DEFORMATION PARAMETERS -----------------------% % @@ -1891,6 +1961,10 @@ OUTPUT_WRT_FREQ= 10, 250, 42 % Output the performance summary to the console at the end of SU2_CFD WRT_PERFORMANCE= NO % +% Output the tape statistics (discrete adjoint) +WRT_AD_STATISTICS= NO +% +% % Overwrite or append iteration number to the restart files when saving WRT_RESTART_OVERWRITE= YES % @@ -1900,6 +1974,9 @@ WRT_SURFACE_OVERWRITE= YES % Overwrite or append iteration number to the volume files when saving WRT_VOLUME_OVERWRITE= YES % +% MPI communication level (NONE, MINIMAL, FULL) +COMM_LEVEL= FULL + % ------------------------- INPUT/OUTPUT FILE INFORMATION --------------------------% % % Mesh input file @@ -1908,6 +1985,15 @@ MESH_FILENAME= mesh_NACA0012_inv.su2 % Mesh input file format (SU2, CGNS) MESH_FORMAT= SU2 % +% List of the number of grid points in the RECTANGLE or BOX grid in the x,y,z directions. (default: (33,33,33) ). +MESH_BOX_SIZE= (33, 33, 33) +% +% List of the length of the RECTANGLE or BOX grid in the x,y,z directions. (default: (1.0,1.0,1.0) ). +MESH_BOX_LENGTH= (1.0, 1.0, 1.0) +% +% List of the offset from 0.0 of the RECTANGLE or BOX grid in the x,y,z directions. (default: (0.0,0.0,0.0) ). +MESH_BOX_OFFSET= (0.0, 0.0, 0.0) +% % Mesh output file MESH_OUT_FILENAME= mesh_out.su2 % @@ -1920,6 +2006,9 @@ SOLUTION_ADJ_FILENAME= solution_adj.dat % Output tabular file format (TECPLOT, CSV) TABULAR_FORMAT= CSV % +% Set .precision(value) to specified value for SU2_DOT and HISTORY output. Useful for exact gradient validation. +OUTPUT_PRECISION= 10 +% % Files to output % Possible formats : (TECPLOT_ASCII, TECPLOT, SURFACE_TECPLOT_ASCII, % SURFACE_TECPLOT, CSV, SURFACE_CSV, PARAVIEW_ASCII, PARAVIEW_LEGACY, SURFACE_PARAVIEW_ASCII, @@ -1957,6 +2046,12 @@ SURFACE_FILENAME= surface_flow % Output file surface adjoint coefficient (w/o extension) SURFACE_ADJ_FILENAME= surface_adjoint % +% Output file surface sensitivity (discrete adjoint) (w/o extension) +SURFACE_SENS_FILENAME= surface_sens +% +% Output file volume sensitivity (discrete adjoint)) +VOLUME_SENS_FILENAME= volume_sens +% % Read binary restart files (YES, NO) READ_BINARY_RESTART= YES % From d606ef32bfac234a8f60d26bdf54c89a7d0b39b3 Mon Sep 17 00:00:00 2001 From: bigfooted Date: Wed, 8 Mar 2023 23:57:20 +0100 Subject: [PATCH 06/34] update config_template --- Common/include/option_structure.inl | 2 +- Common/src/CConfig.cpp | 11 +- config_template.cfg | 289 +++++++++++++++++++++++++++- 3 files changed, 285 insertions(+), 17 deletions(-) diff --git a/Common/include/option_structure.inl b/Common/include/option_structure.inl index 758033da153..9b5934033f2 100644 --- a/Common/include/option_structure.inl +++ b/Common/include/option_structure.inl @@ -646,7 +646,7 @@ public: default : { string newstring; newstring.append(this->name); - newstring.append(": undefined design variable type found in configuration file."); + newstring.append(": undefined design variable type found in configuration file. "); return newstring; } } diff --git a/Common/src/CConfig.cpp b/Common/src/CConfig.cpp index 74efdf63c5d..feee6e94c8a 100644 --- a/Common/src/CConfig.cpp +++ b/Common/src/CConfig.cpp @@ -2385,7 +2385,6 @@ void CConfig::SetConfig_Options() { /*!\brief DESIGN_VARIABLE_FEA * \n DESCRIPTION: Design variable for FEA problems \n OPTIONS: See \link DVFEA_Map \endlink \n DEFAULT VENKATAKRISHNAN \ingroup Config */ addEnumOption("DESIGN_VARIABLE_FEA", Kind_DV_FEA, DVFEA_Map, NODV_FEA); -// nijso /* DESCRIPTION: Consider a reference solution for the structure (optimization applications) * Options: NO, YES \ingroup Config */ addBoolOption("REFERENCE_GEOMETRY", RefGeom, false); @@ -2442,7 +2441,7 @@ void CConfig::SetConfig_Options() { addDoubleOption("DYN_TIME", Total_DynTime, 1.0); /* DESCRIPTION: Parameter alpha for Newmark scheme (s) */ addDoubleOption("NEWMARK_BETA", Newmark_beta, 0.25); - /* DESCRIPTION: Parameter delta for Newmark scheme (s) */ + /* DESCRIPTION: Parameter gamma for Newmark scheme (s) */ addDoubleOption("NEWMARK_GAMMA", Newmark_gamma, 0.5); /* DESCRIPTION: Apply the load as a ramp */ addBoolOption("RAMP_LOADING", Ramp_Load, false); @@ -2522,7 +2521,7 @@ void CConfig::SetConfig_Options() { /* DESCRIPTION: Determines if the convergence history of each individual zone is written to file */ addBoolOption("WRT_ZONE_HIST", Wrt_ZoneHist, false); - /* DESCRIPTION: Determines if the special output is written out */ + /* DESCRIPTION: Determines if the forces breakdown is written out */ addBoolOption("WRT_FORCES_BREAKDOWN", Wrt_ForcesBreakdown, false); @@ -2624,7 +2623,7 @@ void CConfig::SetConfig_Options() { /*!\par CONFIG_CATEGORY: Visualize Control Volumes \ingroup Config*/ /*--- options related to visualizing control volumes ---*/ - /* DESCRIPTION: Node number for the CV to be visualized */ + /* DESCRIPTION: Node number for the CV to be visualized (tecplot) (nijso: delete?) */ addLongOption("VISUALIZE_CV", Visualize_CV, -1); /*!\par CONFIG_CATEGORY: Inverse design problem \ingroup Config*/ @@ -2639,10 +2638,10 @@ void CConfig::SetConfig_Options() { /*!\par CONFIG_CATEGORY: Unsupported options \ingroup Config*/ /*--- Options that are experimental and not intended for general use ---*/ - /* DESCRIPTION: Write extra output */ + /* DESCRIPTION: Write extra output (EXPERIMENTAL, NOT FOR GENERAL USE) */ addBoolOption("EXTRA_OUTPUT", ExtraOutput, false); - /* DESCRIPTION: Write extra heat output for a given zone heat solver zone */ + /* DESCRIPTION: Write extra heat output for a given heat solver zone */ addLongOption("EXTRA_HEAT_ZONE_OUTPUT", ExtraHeatOutputZone, -1); /*--- options related to the FFD problem ---*/ diff --git a/config_template.cfg b/config_template.cfg index d61da71e13a..add187190a4 100644 --- a/config_template.cfg +++ b/config_template.cfg @@ -429,6 +429,19 @@ VT_RESIDUAL_LIMITING= NO INLET_TEMPERATURE_VE = 288.15 INLET_GAS_COMPOSITION = (0.77, 0.23, 0.0, 0.0, 0.0) % +% --------------------------- REFERENCE VALUES FOR DEFORMATION ----------------% +% +% Consider a reference solution for the structure +REFERENCE_GEOMETRY= NO +% +% Penalty weight value for the objective function +REFERENCE_GEOMETRY_PENALTY= 1E6 +% +% Reference geometry filename +REFERENCE_GEOMETRY_FILENAME= reference_geometry.dat +% +% Format of the reference geometry file +REFERENCE_GEOMETRY_FORMAT= % --------------------------- VISCOSITY MODEL ---------------------------------% % % Viscosity model (SUTHERLAND, CONSTANT_VISCOSITY, POLYNOMIAL_VISCOSITY). @@ -746,6 +759,13 @@ HB_PRECONDITION= NO % % Omega_HB = 2*PI*frequency - frequencies for Harmonic Balance method OMEGA_HB= (0,1.0,-1.0) +% +% Determines if the single-zone driver is used. (TEMPORARY) +SINGLEZONE_DRIVER= NO +% +% Determines if the special output is written out +SPECIAL_OUTPUT= NO + % ------------------- RADIATIVE HEAT TRANSFER SIMULATION ----------------------% % @@ -774,7 +794,7 @@ HEAT_SOURCE_ROTATION_Z = 0.0 HEAT_SOURCE_CENTER = ( 0.0, 0.0, 0.0 ) % % Vector of heat source radii (Heat_Source_Radius_A, Heat_Source_Radius_B, Heat_Source_Radius_C) -HEAT_SOURCE_RADIUS = ( 1.0, 1.0, 1.0 ) +HEAT_SOURCE_AXES = ( 1.0, 1.0, 1.0 ) % % Wall emissivity of the marker for radiation purposes MARKER_EMISSIVITY = ( MARKER_NAME, 1.0 ) @@ -1058,6 +1078,30 @@ MARKER_FLUID_LOAD= ( NONE ) % ISOPARAMETRIC, SLIDING_MESH) KIND_INTERPOLATION= NEAREST_NEIGHBOR % +% Use conservative approach for interpolating between meshes +CONSERVATIVE_INTERPOLATION= YES +% +% Type of radial basis function to use for radial basis function interpolation +KIND_RADIAL_BASIS_FUNCTION = WENDLAND_C2 +% +% Radius for radial basis function. +RADIAL_BASIS_FUNCTION_PARAMETER = 0.015 +% +% Use polynomial term in radial basis function interpolation. +RADIAL_BASIS_FUNCTION_POLYNOMIAL_TERM = YES +% +% Tolerance to prune small coefficients from the RBF interpolation matrix. +RADIAL_BASIS_FUNCTION_PRUNE_TOLERANCE = 0 +% +% Type of spanwise interpolation to use for the inlet face. +INLET_INTERPOLATION_FUNCTION= NONE +% +% +INLET_INTERPOLATION_DATA_TYPE= VRVTHETA +% +% +PRINT_INLET_INTERPOLATED_DATA= NO +% % Inflow and Outflow markers must be specified, for each blade (zone), following % the natural groth of the machine (i.e, from the first blade to the last) MARKER_TURBOMACHINERY= ( NONE ) @@ -1126,6 +1170,33 @@ SINE_LOAD_COEFF= (0.0, 0.0, 0.0) % RAMP_AND_RELEASE_LOAD= NO % +% Apply the load as a ramp +RAMP_LOADING= NO +% +% Time while the load is to be increased linearly +RAMP_TIME= 1.0 +% +% Number of FSI iterations during which a ramp is applied +RAMP_FSI_ITER= 2 +% +% Aitken static relaxation factor +STAT_RELAX_PARAMETER= 0.4 +% +% Aitken dynamic maximum relaxation factor for the first iteration +AITKEN_DYN_MAX_INITIAL= 0.5 +% +% Aitken dynamic minimum relaxation factor for the first iteration +AITKEN_DYN_MIN_INITIAL= 0.5 +% +% Kind of relaxation +BGS_RELAXATION= NONE +% +% Relaxation required +RELAXATION= NO +% +% Transfer method used for multiphysics problems +DYNAMIC_LOAD_TRANSFER= RAMP + % Load boundary marker(s) % Format: (inlet marker, load, multiplier, dir_x, dir_y, dir_z, ... ), % i.e. primitive variables specified. @@ -1153,12 +1224,13 @@ WALLMODEL_MAXITER= 200 % [Expert] relaxation factor for the Newton iterations of the standard wall function WALLMODEL_RELFAC= 0.5 -% ------------------------ CONJUGATE HEAT TRANSFER --------------------------% +% ------------------------ CONJUGATE HEAT TRANSFER (CHT) --------------------------% % % Relaxation of the CHT coupling RELAXATION_FACTOR_CHT= 1.0 % -% +% CHT interface coupling methods +CHT_COUPLING_METHOD= DIRECT_TEMPERATURE_ROBIN_HEATFLUX % ------------------------ SURFACES IDENTIFICATION ----------------------------% % @@ -1432,6 +1504,7 @@ NEWTON_KRYLOV_IPARAM= (10, 3, 2) % % Double parameters {startup residual drop, precond tolerance, full tolerance residual drop, findiff step}. NEWTON_KRYLOV_DPARAM= (1.0, 0.1, -6.0, 1e-5) + % ------------------- FEM FLOW NUMERICAL METHOD DEFINITION --------------------% % % FEM numerical method (DG) @@ -1483,6 +1556,60 @@ KIND_FEM_DG_SHOCK= NONE % Time discretization TIME_DISCRE_FEA= NEWMARK_IMPLICIT % +% Parameter alpha for Newmark scheme (s) +NEWMARK_BETA= 0.25 +% +% Parameter gamma for Newmark scheme (s) +NEWMARK_GAMMA= 0.50 +% +% Newmark - Generalized alpha - coefficients +TIME_INT_STRUCT_COEFFS= 0.0 +% +% Apply dead loads +INCREMENTAL_LOAD= NO +% +% Maximum number of increments of the +NUMBER_INCREMENTS= 10 +% +% Definition of the UTOL RTOL ETOL +INCREMENTAL_CRITERIA= (0.0, 0.0, 0.0) +% +% Use of predictor +PREDICTOR= NO +% +% Order of the predictor +PREDICTOR_ORDER= 0 + +% ------------------- TOPOLOGY OPTIMIZATION --------------------% +TOPOLOGY_OPTIMIZATION= NO +% +% +TOPOL_OPTIM_OUTFILE= element_derivatives.dat +% +% +TOPOL_OPTIM_SIMP_EXPONENT= 1.0 +% +% +TOPOL_OPTIM_SIMP_MINSTIFF= 0.001 +% +% +TOPOL_OPTIM_FILTER_KERNEL= (DILATE, ERODE) +% +% +TOPOL_OPTIM_FILTER_RADIUS= 0.0 +% +% +TOPOL_OPTIM_KERNEL_PARAM= 0.01 +% +% +TOPOL_OPTIM_SEARCH_LIMIT= 0 +% +% +TOPOL_OPTIM_PROJECTION_TYPE= NO_PROJECTION +% +% +TOPOL_OPTIM_PROJECTION_PARAM= 0.0 + % ------------------- FEA SOLVER FOR FLUID-STRUCTURE INTERACTION --------------------% % % Filename to input for element-based properties @@ -1502,6 +1629,12 @@ KNOWLES_B= 1.0 % % Knowles N constant KNOWLES_N= 1.0 +% +% ID of the region we want to compute the sensitivities using direct differentiation +FEA_ID_DIRECTDIFF= 0 +% +% +RESTART_STEADY_STATE= NO % -------------------- Dielectric effects ------------------% % @@ -1548,7 +1681,7 @@ SLOPE_LIMITER_HEAT = NONE % % Time discretization TIME_DISCRE_HEAT= EULER_IMPLICIT -% + % ---------------- ADJOINT-FLOW NUMERICAL METHOD DEFINITION -------------------% % % Frozen the slope limiter in the discrete adjoint formulation (NO, YES) @@ -1585,6 +1718,7 @@ LIMIT_ADJFLOW= 1E6 % % Use multigrid in the adjoint problem (NO, YES) MG_ADJFLOW= YES + % ---------------- MULTIZONE DEFINITION --------------% % % Determine if the mesh file supports multizone. \n DEFAULT: true (temporarily) @@ -1592,6 +1726,12 @@ MULTIZONE_MESH= YES % % Determine if we need to allocate memory to store the multizone residual. \n DEFAULT: true (temporarily) MULTIZONE_RESIDUAL= NO +% +% Determines if the convergence history of each individual zone is written to screen +WRT_ZONE_CONV= NO +% +% Determines if the convergence history of each individual zone is written to file +WRT_ZONE_HIST= NO % ---------------- ADJOINT-TURBULENT NUMERICAL METHOD DEFINITION --------------% % @@ -1604,7 +1744,6 @@ TIME_DISCRE_ADJTURB= EULER_IMPLICIT % Reduction factor of the CFL coefficient in the adjoint turbulent problem CFL_REDUCTION_ADJTURB= 0.01 - % -------------------- NEMO NUMERICAL METHOD DEFINITION -----------------------% % % Mixture transport properties (WILKE,GUPTA-YOS,CHAPMANN-ENSKOG, SUTHERLAND) @@ -1715,6 +1854,7 @@ DV_SENS_FILENAME= surface_sensitivity.dat % as an ASCII file with name given by DV_SENS_FILENAMEand with format as % rows of x, y, z, dJ/dx, dJ/dy, dJ/dz for each grid point. DV_SENSITIVITY_FORMAT= SU2_NATIVE +% DV_UNORDERED_SENS_FILENAME= unordered_sensitivity.dat % % Hold the grid fixed in a region @@ -1726,6 +1866,61 @@ HOLD_GRID_FIXED_COORDS= (-1e15, -1e15, -1e15, 1e15, 1e15, 1e15) % Design variable for FEA problems % options: NONE, YOUNG_MODULUS, POISSON_RATIO, DENSITY, DEAD_WEIGHT, ELECTRIC_FIELD DESIGN_VARIABLE_FEA= NONE +% +% Penalty weight value to maintain the total sum of DV constant +TOTAL_DV_PENALTY= 0.0 +% +% Parameters for the corresponding OF (allowed stress and KS multiplier). +STRESS_PENALTY_PARAM= (1.0, 10.0) +% +% Geometric conditions +GEOMETRIC_CONDITIONS= SMALL_DEFORMATIONS +% +% Material model +MATERIAL_MODEL= LINEAR_ELASTIC +% +% Compressibility of the material +MATERIAL_COMPRESSIBILITY= COMPRESSIBLE +% + +% ---------------- AUTOMATIC DIFFERENTIATION -------------------% +% +% Direct differentiation mode (forward) +DIRECT_DIFF= NONE +% +% Automatic differentiation mode (reverse) +AUTO_DIFF= NO +% +% Preaccumulation in the AD mode. +PREACC= YES + +% ---------------- PRESTRETCH FOR STRUCTURES -------------------% +% Consider a prestretch in the structural domain +PRESTRETCH= NO +% +% Filename to input for prestretching membranes +PRESTRETCH_FILENAME= prestretch_file.dat +% +% Iterative method for non-linear structural analysis +NONLINEAR_FEM_SOLUTION_METHOD= NEWTON_RAPHSON +% +% Formulation for bidimensional elasticity solver +FORMULATION_ELASTICITY_2D= PLANE_STRAIN +% +% Apply dead loads +DEAD_LOAD= NO +% +% pseudo static analysis (no density in dynamic analysis) +PSEUDO_STATIC= NO +% +% Dynamic or static structural analysis +DYNAMIC_ANALYSIS= NO +% +% Time Step for dynamic analysis (s) +DYN_TIMESTEP= 0.0 +% +% Total Physical Time for dual time stepping simulations (s) +DYN_TIME= 1.0 % ---------------- MESH DEFORMATION PARAMETERS (NEW SOLVER) -------------------% % @@ -1777,6 +1972,32 @@ DEFORM_POISSON_RATIO= 0.3 % Size of the layer of highest stiffness for wall distance-based mesh stiffness DEFORM_STIFF_LAYER_SIZE= 0.0 +% -------------------- REFERENCE GEOMETRY -----------------------% +% +% Consider a reference solution for the structure (optimization applications) +REFERENCE_GEOMETRY= NO +% +% Penalty weight value for the objective function +REFERENCE_GEOMETRY_PENALTY= 1.0E6 +% +% Reference geometry filename +REFERENCE_GEOMETRY_FILENAME= reference_geometry.dat +% +% Format of the reference geometry file +REFERENCE_GEOMETRY_FORMAT= SU2_REF +% +% If true consider only the surfaces where loads are applied. +REFERENCE_GEOMETRY_SURFACE= NO +% +% Reference node for the structure (optimization applications) +REFERENCE_NODE= 0 +% +% Target displacement of the reference node +REFERENCE_NODE_DISPLACEMENT= (0.0, 0.0) +% +% Penalty weight value for the objective function +REFERENCE_NODE_PENALTY= 1.0E3 + % -------------------- FREE-FORM DEFORMATION PARAMETERS -----------------------% % % Tolerance of the Free-Form Deformation point inversion @@ -1784,17 +2005,17 @@ FFD_TOLERANCE= 1E-10 % % Maximum number of iterations in the Free-Form Deformation point inversion FFD_ITERATIONS= 500 - +% % Parameters for prevention of self-intersections within FFD box FFD_INTPREV = YES FFD_INTPREV_ITER = 10 FFD_INTPREV_DEPTH = 3 - +% % Parameters for prevention of nonconvex elements in mesh after deformation CONVEXITY_CHECK = YES CONVEXITY_CHECK_ITER = 10 CONVEXITY_CHECK_DEPTH = 3 - +% % % FFD box definition: 3D case (FFD_BoxTag, X1, Y1, Z1, X2, Y2, Z2, X3, Y3, Z3, X4, Y4, Z4, % X5, Y5, Z5, X6, Y6, Z6, X7, Y7, Z7, X8, Y8, Z8) @@ -1974,8 +2195,20 @@ WRT_SURFACE_OVERWRITE= YES % Overwrite or append iteration number to the volume files when saving WRT_VOLUME_OVERWRITE= YES % +% Determines if the forces breakdown is written out +WRT_FORCES_BREAKDOWN= NO +% % MPI communication level (NONE, MINIMAL, FULL) COMM_LEVEL= FULL +% +% Node number for the CV to be visualized (tecplot) (delete?) +VISUALIZE_CV= -1 +% +% Write extra output (EXPERIMENTAL, NOT FOR GENERAL USE) +EXTRA_OUTPUT= NO +% +% Write extra heat output for a given heat solver zone +EXTRA_HEAT_ZONE_OUTPUT= -1 % ------------------------- INPUT/OUTPUT FILE INFORMATION --------------------------% % @@ -2103,14 +2336,14 @@ REORIENT_ELEMENTS= YES % Definition of multipoint design problems, this option should be combined with the % the prefix MULTIPOINT in the objective function or constraint (e.g. MULTIPOINT_DRAG, MULTIPOINT_LIFT, etc.) MULTIPOINT_MACH_NUMBER= (0.79, 0.8, 0.81) +MULTIPOINT_WEIGHT= (0.33333, 0.33333, 0.33333) MULTIPOINT_AOA= (1.25, 1.25, 1.25) MULTIPOINT_SIDESLIP_ANGLE= (0.0, 0.0, 0.0) MULTIPOINT_TARGET_CL= (0.8, 0.8, 0.8) MULTIPOINT_REYNOLDS_NUMBER= (1E6, 1E6, 1E6) -MULTIPOINT_FREESTREAM_PRESSURE= (101325.0, 101325.0, 101325.0) MULTIPOINT_FREESTREAM_TEMPERATURE= (288.15, 288.15, 288.15) +MULTIPOINT_FREESTREAM_PRESSURE= (101325.0, 101325.0, 101325.0) MULTIPOINT_OUTLET_VALUE= (0.0, 0.0, 0.0) -MULTIPOINT_WEIGHT= (0.33333, 0.33333, 0.33333) MULTIPOINT_MESH_FILENAME= (mesh_NACA0012_m79.su2, mesh_NACA0012_m8.su2, mesh_NACA0012_m81.su2) % % Optimization objective function with scaling factor, separated by semicolons. @@ -2176,3 +2409,39 @@ MAX_BASIS_DIM = 100 % % Frequency of snapshots saves, for unsteady problems (default: 1. 2 means every other) ROM_SAVE_FREQ = 1 + +% --------------------- PASTIX PARAMETERS -----------------------% +% +% Number of calls to 'Build' that trigger re-factorization (0 means only once) +PASTIX_FACTORIZATION_FREQUENCY= 1 +% +% 0 - Quiet, 1 - During factorization and cleanup, 2 - Even more detail +PASTIX_VERBOSITY_LEVEL= 0 +% +% Level of fill for PaStiX incomplete LU factorization +PASTIX_FILL_LEVEL= 1 + +% --------------------- PYTHON PARAMETERS -----------------------% +% DESCRIPTION: Gradient method +%GRADIENT_METHOD +% +% DESCRIPTION: Geometrical Parameter +%GEO_PARAM +% +% DESCRIPTION: Current value of the design variables +%DV_VALUE_NEW +% +% DESCRIPTION: Previous value of the design variables +%DV_VALUE_OLD +% +% DESCRIPTION: Number of partitions of the mesh +NUMBER_PART= 1 +% +% DESCRIPTION: Verbosity of the python scripts to Stdout +%CONSOLE +% +% DESCRIPTION: Flag specifying if the mesh was decomposed +%DECOMPOSED +% +% DESCRIPTION: Number of zones of the problem +%NZONES= 1 \ No newline at end of file From 4415e321ed591d0638913cfcf322a57acbf16fc5 Mon Sep 17 00:00:00 2001 From: Nijso Date: Mon, 10 Apr 2023 21:49:35 +0200 Subject: [PATCH 07/34] Update config_template.cfg Co-authored-by: Pedro Gomes <38071223+pcarruscag@users.noreply.github.com> --- config_template.cfg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config_template.cfg b/config_template.cfg index 0f6a2ce27e0..3e4edaba453 100644 --- a/config_template.cfg +++ b/config_template.cfg @@ -1074,8 +1074,8 @@ MARKER_FLUID_INTERFACE= ( NONE ) % Marker(s) in which the flow load is computed/applied MARKER_FLUID_LOAD= ( NONE ) % -% Kind of interface interpolation among different zones (NEAREST_NEIGHBOR, -% ISOPARAMETRIC, SLIDING_MESH) +% Kind of interface interpolation among different zones (NEAREST_NEIGHBOR, WEIGHTED_AVERAGE, +% ISOPARAMETRIC, RADIAL_BASIS_FUNCTION) KIND_INTERPOLATION= NEAREST_NEIGHBOR % % Use conservative approach for interpolating between meshes From fb7a2661662d7ab6ff91a1cc5d97bd39cf90dfb1 Mon Sep 17 00:00:00 2001 From: Nijso Date: Mon, 10 Apr 2023 21:50:31 +0200 Subject: [PATCH 08/34] Update config_template.cfg Co-authored-by: Pedro Gomes <38071223+pcarruscag@users.noreply.github.com> --- config_template.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config_template.cfg b/config_template.cfg index 3e4edaba453..3b43d7967b1 100644 --- a/config_template.cfg +++ b/config_template.cfg @@ -2216,7 +2216,7 @@ EXTRA_HEAT_ZONE_OUTPUT= -1 % Mesh input file MESH_FILENAME= mesh_NACA0012_inv.su2 % -% Mesh input file format (SU2, CGNS) +% Mesh input file format (SU2, CGNS, RECTANGLE, BOX) MESH_FORMAT= SU2 % % List of the number of grid points in the RECTANGLE or BOX grid in the x,y,z directions. (default: (33,33,33) ). From 3736e7c0a4d142d4e9b28ccc46282bc50f2934ff Mon Sep 17 00:00:00 2001 From: bigfooted Date: Sun, 7 May 2023 22:23:08 +0200 Subject: [PATCH 09/34] remove grid adaptation options --- config_template.cfg | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/config_template.cfg b/config_template.cfg index 3b43d7967b1..4290764b45b 100644 --- a/config_template.cfg +++ b/config_template.cfg @@ -1779,23 +1779,6 @@ GEO_NUMBER_STATIONS= 25 % Geometrical evaluation mode (FUNCTION, GRADIENT) GEO_MODE= FUNCTION -% ------------------------- GRID ADAPTATION STRATEGY --------------------------% -% -% Kind of grid adaptation (NONE, PERIODIC, FULL, FULL_FLOW, GRAD_FLOW, -% FULL_ADJOINT, GRAD_ADJOINT, GRAD_FLOW_ADJ, ROBUST, -% FULL_LINEAR, COMPUTABLE, COMPUTABLE_ROBUST, -% REMAINING, WAKE, SMOOTHING, SUPERSONIC_SHOCK) -KIND_ADAPT= FULL_FLOW -% -% Percentage of new elements (% of the original number of elements) -NEW_ELEMS= 5 -% -% Scale factor for the dual volume -DUALVOL_POWER= 0.5 -% -% Adapt the boundary elements (NO, YES) -ADAPT_BOUNDARY= YES - % ----------------------- DESIGN VARIABLE PARAMETERS --------------------------% % % Kind of deformation (NO_DEFORMATION, SCALE_GRID, TRANSLATE_GRID, ROTATE_GRID, @@ -2445,4 +2428,4 @@ NUMBER_PART= 1 %DECOMPOSED % % DESCRIPTION: Number of zones of the problem -%NZONES= 1 \ No newline at end of file +%NZONES= 1 From 3f4b04d09058cd873de0ccf1a80433bf4123228a Mon Sep 17 00:00:00 2001 From: bigfooted Date: Sun, 7 May 2023 23:28:52 +0200 Subject: [PATCH 10/34] remove some commented code --- Common/include/CConfig.hpp | 7 ------ Common/src/CConfig.cpp | 22 ------------------- .../drivers/CDiscAdjDeformationDriver.hpp | 2 +- 3 files changed, 1 insertion(+), 30 deletions(-) diff --git a/Common/include/CConfig.hpp b/Common/include/CConfig.hpp index fe9374d5ac5..2b0d855caf2 100644 --- a/Common/include/CConfig.hpp +++ b/Common/include/CConfig.hpp @@ -96,7 +96,6 @@ class CConfig { *TemperatureLimits; /*!< \brief Limits for the primitive variables */ bool ActDisk_DoubleSurface; /*!< \brief actuator disk double surface */ bool Engine_HalfModel; /*!< \brief only half model is in the computational grid */ - //bool ActDisk_SU2_DEF; /*!< \brief actuator disk double surface */ unsigned short nFFD_Iter; /*!< \brief Iteration for the point inversion problem. */ unsigned short FFD_Blending; /*!< \brief Kind of FFD Blending function. */ su2double FFD_Tol; /*!< \brief Tolerance in the point inversion problem. */ @@ -212,8 +211,6 @@ class CConfig { nMarker_Damper, /*!< \brief Number of damper surface markers. */ nMarker_Load_Dir, /*!< \brief Number of load surface markers defined by magnitude and direction. */ nMarker_Disp_Dir, /*!< \brief Number of load surface markers defined by magnitude and direction. */ - //nMarker_Load_Sine, /*!< \brief Number of load surface markers defined by magnitude and direction. */ - //nMarker_FlowLoad, /*!< \brief Number of load surface markers. */ nMarker_Internal, /*!< \brief Number of internal flow markers. */ nMarker_All, /*!< \brief Total number of markers using the grid information. */ nMarker_Max, /*!< \brief Max number of number of markers using the grid information. */ @@ -324,10 +321,6 @@ class CConfig { su2double *Disp_Dir_Multiplier; /*!< \brief Specified multiplier for load boundaries defined in cartesian coordinates. */ su2double **Load_Dir; /*!< \brief Specified flow direction vector (unit vector) for inlet boundaries. */ su2double **Disp_Dir; /*!< \brief Specified structural displacement direction (unit vector). */ - //su2double *Load_Sine_Amplitude; /*!< \brief Specified amplitude for a sine-wave load. */ - //su2double *Load_Sine_Frequency; /*!< \brief Specified multiplier for load boundaries defined in cartesian coordinates. */ - //su2double **Load_Sine_Dir; /*!< \brief Specified flow direction vector (unit vector) for inlet boundaries. */ - //su2double *FlowLoad_Value; /*!< \brief Specified force for flow load boundaries. */ su2double *ActDiskInlet_MassFlow; /*!< \brief Specified inlet mass flow for actuator disk. */ su2double *ActDiskInlet_Temperature; /*!< \brief Specified inlet temperature for actuator disk. */ su2double *ActDiskInlet_TotalTemperature; /*!< \brief Specified inlet total temperature for actuator disk. */ diff --git a/Common/src/CConfig.cpp b/Common/src/CConfig.cpp index 9160a227862..e74de8c4ea6 100644 --- a/Common/src/CConfig.cpp +++ b/Common/src/CConfig.cpp @@ -904,7 +904,6 @@ void CConfig::SetPointersNull() { Load_Dir = nullptr; Load_Dir_Value = nullptr; Load_Dir_Multiplier = nullptr; Disp_Dir = nullptr; Disp_Dir_Value = nullptr; Disp_Dir_Multiplier = nullptr; - //Load_Sine_Dir = nullptr; Load_Sine_Amplitude = nullptr; Load_Sine_Frequency = nullptr; Electric_Field_Mod = nullptr; Electric_Field_Dir = nullptr; RefNode_Displacement = nullptr; Electric_Constant = nullptr; @@ -5757,23 +5756,11 @@ void CConfig::SetMarkers(SU2_COMPONENT val_software) { iMarker_CfgFile++; } - // for (iMarker_Load_Sine = 0; iMarker_Load_Sine < nMarker_Load_Sine; iMarker_Load_Sine++) { - // Marker_CfgFile_TagBound[iMarker_CfgFile] = Marker_Load_Sine[iMarker_Load_Sine]; - // Marker_CfgFile_KindBC[iMarker_CfgFile] = LOAD_SINE_BOUNDARY; - // iMarker_CfgFile++; - // } - for (iMarker_Fluid_Load = 0; iMarker_Fluid_Load < nMarker_Fluid_Load; iMarker_Fluid_Load++) { Marker_CfgFile_TagBound[iMarker_CfgFile] = Marker_Fluid_Load[iMarker_Fluid_Load]; iMarker_CfgFile++; } - // for (iMarker_FlowLoad = 0; iMarker_FlowLoad < nMarker_FlowLoad; iMarker_FlowLoad++) { - // Marker_CfgFile_TagBound[iMarker_CfgFile] = Marker_FlowLoad[iMarker_FlowLoad]; - // Marker_CfgFile_KindBC[iMarker_CfgFile] = FLOWLOAD_BOUNDARY; - // iMarker_CfgFile++; - // } - for (iMarker_CfgFile = 0; iMarker_CfgFile < nMarker_CfgFile; iMarker_CfgFile++) { Marker_CfgFile_Monitoring[iMarker_CfgFile] = NO; for (iMarker_Monitoring = 0; iMarker_Monitoring < nMarker_Monitoring; iMarker_Monitoring++) @@ -7431,15 +7418,6 @@ void CConfig::SetOutput(SU2_COMPONENT val_software, unsigned short val_izone) { BoundaryTable.PrintFooter(); } - // if (nMarker_Load_Sine != 0) { - // BoundaryTable << "Sine-Wave boundary"; - // for (iMarker_Load_Sine = 0; iMarker_Load_Sine < nMarker_Load_Sine; iMarker_Load_Sine++) { - // BoundaryTable << Marker_Load_Sine[iMarker_Load_Sine]; - // if (iMarker_Load_Sine < nMarker_Load_Sine-1) BoundaryTable << " "; - // } - // BoundaryTable.PrintFooter(); - // } - if (nMarker_Emissivity != 0) { BoundaryTable << "Radiative boundary"; for (iMarker_Emissivity = 0; iMarker_Emissivity < nMarker_Emissivity; iMarker_Emissivity++) { diff --git a/SU2_DEF/include/drivers/CDiscAdjDeformationDriver.hpp b/SU2_DEF/include/drivers/CDiscAdjDeformationDriver.hpp index 93bf81a55c5..5284fa26220 100644 --- a/SU2_DEF/include/drivers/CDiscAdjDeformationDriver.hpp +++ b/SU2_DEF/include/drivers/CDiscAdjDeformationDriver.hpp @@ -1,5 +1,5 @@ /*! - * \file CDiscAdjDeformationDriver.cpp + * \file CDiscAdjDeformationDriver.hpp * \brief Headers of the main subroutines for driving the projection of sensitivities. * \author T. Economon, H. Kline, R. Sanchez, A. Gastaldi, H. Patel * \version 7.5.1 "Blackbird" From 5a7871001fa3cfa4c2614c5cbafc695fde22a3ed Mon Sep 17 00:00:00 2001 From: Nijso Date: Mon, 8 May 2023 08:35:27 +0200 Subject: [PATCH 11/34] Update config_template.cfg Co-authored-by: Pedro Gomes <38071223+pcarruscag@users.noreply.github.com> --- config_template.cfg | 1 + 1 file changed, 1 insertion(+) diff --git a/config_template.cfg b/config_template.cfg index 33c27db6162..282da7f6161 100644 --- a/config_template.cfg +++ b/config_template.cfg @@ -1202,6 +1202,7 @@ DYNAMIC_LOAD_TRANSFER= RAMP % Format: (inlet marker, load, multiplier, dir_x, dir_y, dir_z, ... ), % i.e. primitive variables specified. MARKER_DISPLACEMENT= ( NONE ) + % ------------------------ WALL ROUGHNESS DEFINITION --------------------------% % The equivalent sand grain roughness height (k_s) on each of the wall. This must be in m. % This is a list of (string, double) each element corresponding to the MARKER defined in WALL_TYPE. From 71f20939ced6a53350ca2701c449729abba9b2b8 Mon Sep 17 00:00:00 2001 From: bigfooted Date: Mon, 8 May 2023 09:00:35 +0200 Subject: [PATCH 12/34] add tick again --- Common/src/CConfig.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Common/src/CConfig.cpp b/Common/src/CConfig.cpp index e74de8c4ea6..7dc34b47442 100644 --- a/Common/src/CConfig.cpp +++ b/Common/src/CConfig.cpp @@ -9454,6 +9454,14 @@ short CConfig::FindInterfaceMarker(unsigned short iInterface) const { return -1; } +void CConfig::Tick(double *val_start_time) { + +#ifdef PROFILE + *val_start_time = SU2_MPI::Wtime(); +#endif + +} + void CConfig::Tock(double val_start_time, const string& val_function_name, int val_group_id) { #ifdef PROFILE From 45a1737fc6f8835645831fac7bd7b336e4c93c12 Mon Sep 17 00:00:00 2001 From: Nijso Date: Tue, 16 May 2023 22:03:50 +0200 Subject: [PATCH 13/34] Update config_template.cfg Co-authored-by: Pedro Gomes <38071223+pcarruscag@users.noreply.github.com> --- config_template.cfg | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/config_template.cfg b/config_template.cfg index 282da7f6161..79e478c02e6 100644 --- a/config_template.cfg +++ b/config_template.cfg @@ -1090,7 +1090,8 @@ KIND_INTERPOLATION= NEAREST_NEIGHBOR % Use conservative approach for interpolating between meshes CONSERVATIVE_INTERPOLATION= YES % -% Type of radial basis function to use for radial basis function interpolation +% Type of radial basis function to use for radial basis function interpolation +% (WENDLAND_C2, INV_MULTI_QUADRIC, GAUSSIAN, THIN_PLATE_SPLINE, MULTI_QUADRIC). KIND_RADIAL_BASIS_FUNCTION = WENDLAND_C2 % % Radius for radial basis function. From 7d43d9bff090796572e8a83d40ec4781e180501b Mon Sep 17 00:00:00 2001 From: Nijso Date: Tue, 16 May 2023 22:04:20 +0200 Subject: [PATCH 14/34] Update config_template.cfg Co-authored-by: Pedro Gomes <38071223+pcarruscag@users.noreply.github.com> --- config_template.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config_template.cfg b/config_template.cfg index 79e478c02e6..e1bc257f3a2 100644 --- a/config_template.cfg +++ b/config_template.cfg @@ -1146,7 +1146,7 @@ CATALYTIC_EFFICIENCY= 0.2 % SST Model: (inlet_marker1, TurbIntensity1, RatioTurbLamViscosity1, inlet_marker2, TurbIntensity2, RatioTurbLamViscosity2, ...) MARKER_INLET_TURBULENT= (inlet1, 0.05, 15, inlet2, 0.02, ...) % -% Custom boundary marker(s) +% Custom boundary marker(s) (this has to be implemented by users in the code). MARKER_CUSTOM= ( NONE ) % % Smoluchowski/Maxwell slip wall boundary marker(s) From 5dbc7afd292f6f7cc3ab983f2ab93ddc8dd95d5d Mon Sep 17 00:00:00 2001 From: Nijso Date: Tue, 16 May 2023 22:04:46 +0200 Subject: [PATCH 15/34] Update config_template.cfg Co-authored-by: Pedro Gomes <38071223+pcarruscag@users.noreply.github.com> --- config_template.cfg | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/config_template.cfg b/config_template.cfg index e1bc257f3a2..ec98fc08d87 100644 --- a/config_template.cfg +++ b/config_template.cfg @@ -2391,8 +2391,10 @@ DEFINITION_DV= ( 1, 1.0 | airfoil | 0, 0.05 ); ( 1, 1.0 | airfoil | 0, 0.10 ); ( OPT_COMBINE_OBJECTIVE = NO % % -% Number of iterations to average the objective +% Number of iterations to average the objective function for unsteady adjoints, +% 0 averages over all time iterations, "N" averages over the last N iterations. ITER_AVERAGE_OBJ= 0 + % --------------------- LIBROM PARAMETERS -----------------------% % LibROM can be found here: https://github.com/LLNL/libROM % From 4473418441ed03923e54cfe205fef8bde0ba030b Mon Sep 17 00:00:00 2001 From: bigfooted Date: Tue, 8 Aug 2023 13:23:50 +0200 Subject: [PATCH 16/34] update --- Common/src/geometry/meshreader/CSU2ASCIIMeshReaderFVM.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Common/src/geometry/meshreader/CSU2ASCIIMeshReaderFVM.cpp b/Common/src/geometry/meshreader/CSU2ASCIIMeshReaderFVM.cpp index cf7c69573cd..bf91c423d05 100644 --- a/Common/src/geometry/meshreader/CSU2ASCIIMeshReaderFVM.cpp +++ b/Common/src/geometry/meshreader/CSU2ASCIIMeshReaderFVM.cpp @@ -34,9 +34,9 @@ CSU2ASCIIMeshReaderFVM::CSU2ASCIIMeshReaderFVM(CConfig* val_config, unsigned sho myZone(val_iZone), nZones(val_nZone), meshFilename(config->GetMesh_FileName()) { - actuator_disk = (((config->GetnMarker_ActDiskInlet() != 0) || (config->GetnMarker_ActDiskOutlet() != 0)) && - ((config->GetKind_SU2() == SU2_COMPONENT::SU2_CFD) || - ((config->GetKind_SU2() == SU2_COMPONENT::SU2_DEF)))); + actuator_disk = + (((config->GetnMarker_ActDiskInlet() != 0) || (config->GetnMarker_ActDiskOutlet() != 0)) && + ((config->GetKind_SU2() == SU2_COMPONENT::SU2_CFD) || ((config->GetKind_SU2() == SU2_COMPONENT::SU2_DEF)))); if (config->GetActDisk_DoubleSurface()) actuator_disk = false; /* Read the basic metadata and perform some basic error checks. */ From 6337414b1f606e79762f210548e571901df1afbc Mon Sep 17 00:00:00 2001 From: bigfooted Date: Tue, 8 Aug 2023 13:25:18 +0200 Subject: [PATCH 17/34] update --- config_template.cfg | 5 ----- 1 file changed, 5 deletions(-) diff --git a/config_template.cfg b/config_template.cfg index f22620bfee6..746e901edc2 100644 --- a/config_template.cfg +++ b/config_template.cfg @@ -1202,7 +1202,6 @@ CATALYTIC_EFFICIENCY= 0.2 % SST Model: (inlet_marker1, TurbIntensity1, RatioTurbLamViscosity1, inlet_marker2, TurbIntensity2, RatioTurbLamViscosity2, ...) MARKER_INLET_TURBULENT= (inlet1, 0.05, 15, inlet2, 0.02, ...) % -<<<<<<< HEAD % Custom boundary marker(s) (this has to be implemented by users in the code). MARKER_CUSTOM= ( NONE ) % @@ -1260,10 +1259,6 @@ DYNAMIC_LOAD_TRANSFER= RAMP % Format: (inlet marker, load, multiplier, dir_x, dir_y, dir_z, ... ), % i.e. primitive variables specified. MARKER_DISPLACEMENT= ( NONE ) -======= -% list of markers species transport and flamelet model where strong boundary conditions should be used -MARKER_SPECIES_STRONG_BC= (inlet, wall) ->>>>>>> origin/develop % ------------------------ WALL ROUGHNESS DEFINITION --------------------------% % The equivalent sand grain roughness height (k_s) on each of the wall. This must be in m. From b4cd072548e239405b2a36778703a20745a89176 Mon Sep 17 00:00:00 2001 From: bigfooted Date: Tue, 8 Aug 2023 14:32:19 +0200 Subject: [PATCH 18/34] clang formatting --- Common/src/CConfig.cpp | 6030 ++++++++++++++++++++++------------------ 1 file changed, 3371 insertions(+), 2659 deletions(-) diff --git a/Common/src/CConfig.cpp b/Common/src/CConfig.cpp index 1365f1a3cd9..1ee3a4548f2 100644 --- a/Common/src/CConfig.cpp +++ b/Common/src/CConfig.cpp @@ -50,22 +50,20 @@ vector Profile_Time_tp; /*!< \brief Vector of elapsed time for vector Profile_ID_tp; /*!< \brief Vector of group ID number for profiled functions. */ map > Profile_Map_tp; /*!< \brief Map containing the final results for profiled functions. */ -map GEMM_Profile_MNK; /*!< \brief Map, which maps the GEMM size to the index where - the data for this GEMM is stored in several vectors. */ -vector GEMM_Profile_NCalls; /*!< \brief Vector, which stores the number of calls to this - GEMM size. */ -vector GEMM_Profile_TotTime; /*!< \brief Total time spent for this GEMM size. */ -vector GEMM_Profile_MinTime; /*!< \brief Minimum time spent for this GEMM size. */ -vector GEMM_Profile_MaxTime; /*!< \brief Maximum time spent for this GEMM size. */ +map GEMM_Profile_MNK; /*!< \brief Map, which maps the GEMM size to the index where + the data for this GEMM is stored in several vectors. */ +vector GEMM_Profile_NCalls; /*!< \brief Vector, which stores the number of calls to this + GEMM size. */ +vector GEMM_Profile_TotTime; /*!< \brief Total time spent for this GEMM size. */ +vector GEMM_Profile_MinTime; /*!< \brief Minimum time spent for this GEMM size. */ +vector GEMM_Profile_MaxTime; /*!< \brief Maximum time spent for this GEMM size. */ //#pragma omp threadprivate(Profile_Function_tp, Profile_Time_tp, Profile_ID_tp, Profile_Map_tp) - CConfig::CConfig(char case_filename[MAX_STRING_SIZE], SU2_COMPONENT val_software, bool verb_high) { - /*--- Set the case name to the base config file name without extension ---*/ - caseName = PrintingToolbox::split(string(case_filename),'.')[0]; + caseName = PrintingToolbox::split(string(case_filename), '.')[0]; base_config = true; @@ -101,13 +99,10 @@ CConfig::CConfig(char case_filename[MAX_STRING_SIZE], SU2_COMPONENT val_software /*--- Configuration file output ---*/ - if ((rank == MASTER_NODE) && verb_high) - SetOutput(val_software, iZone); - + if ((rank == MASTER_NODE) && verb_high) SetOutput(val_software, iZone); } -CConfig::CConfig(istream &case_buffer, SU2_COMPONENT val_software, bool verb_high) { - +CConfig::CConfig(istream& case_buffer, SU2_COMPONENT val_software, bool verb_high) { base_config = true; iZone = 0; @@ -137,13 +132,11 @@ CConfig::CConfig(istream &case_buffer, SU2_COMPONENT val_software, bool verb_hig /*--- Configuration file output ---*/ - if ((rank == MASTER_NODE) && verb_high) - SetOutput(val_software, iZone); - + if ((rank == MASTER_NODE) && verb_high) SetOutput(val_software, iZone); } -CConfig::CConfig(CConfig* config, char case_filename[MAX_STRING_SIZE], SU2_COMPONENT val_software, unsigned short val_iZone, unsigned short val_nZone, bool verb_high) { - +CConfig::CConfig(CConfig* config, char case_filename[MAX_STRING_SIZE], SU2_COMPONENT val_software, + unsigned short val_iZone, unsigned short val_nZone, bool verb_high) { caseName = config->GetCaseName(); unsigned short val_nDim; @@ -181,18 +174,15 @@ CConfig::CConfig(CConfig* config, char case_filename[MAX_STRING_SIZE], SU2_COMPO /*--- Configuration file output ---*/ - if ((rank == MASTER_NODE) && verb_high) - SetOutput(val_software, val_iZone); + if ((rank == MASTER_NODE) && verb_high) SetOutput(val_software, val_iZone); Multizone_Problem = config->GetMultizone_Problem(); - } CConfig::CConfig(char case_filename[MAX_STRING_SIZE], SU2_COMPONENT val_software) { - /*--- Set the case name to the base config file name without extension ---*/ - caseName = PrintingToolbox::split(string(case_filename),'.')[0]; + caseName = PrintingToolbox::split(string(case_filename), '.')[0]; base_config = true; @@ -224,14 +214,12 @@ CConfig::CConfig(char case_filename[MAX_STRING_SIZE], SU2_COMPONENT val_software /*--- Print the header --- */ SetHeader(val_software); - } -CConfig::CConfig(char case_filename[MAX_STRING_SIZE], CConfig *config) { - +CConfig::CConfig(char case_filename[MAX_STRING_SIZE], CConfig* config) { /*--- Set the case name to the base config file name without extension ---*/ - caseName = PrintingToolbox::split(string(case_filename),'.')[0]; + caseName = PrintingToolbox::split(string(case_filename), '.')[0]; base_config = true; @@ -250,19 +238,13 @@ CConfig::CConfig(char case_filename[MAX_STRING_SIZE], CConfig *config) { /*--- Update original config file ---*/ if (runtime_file) { - if (all_options.find("TIME_ITER") == all_options.end()) - config->SetnTime_Iter(nTimeIter); + if (all_options.find("TIME_ITER") == all_options.end()) config->SetnTime_Iter(nTimeIter); } } -SU2_MPI::Comm CConfig::GetMPICommunicator() const { - - return SU2_Communicator; - -} - -void CConfig::Init(){ +SU2_MPI::Comm CConfig::GetMPICommunicator() const { return SU2_Communicator; } +void CConfig::Init() { /*--- Store MPI rank and size ---*/ rank = SU2_MPI::GetRank(); @@ -275,16 +257,11 @@ void CConfig::Init(){ /*--- Reading config options ---*/ SetConfig_Options(); - } -void CConfig::SetMPICommunicator(SU2_MPI::Comm Communicator) { - - SU2_Communicator = Communicator; +void CConfig::SetMPICommunicator(SU2_MPI::Comm Communicator) { SU2_Communicator = Communicator; } -} - -void CConfig::addDoubleOption(const string& name, su2double & option_field, su2double default_value) { +void CConfig::addDoubleOption(const string& name, su2double& option_field, su2double default_value) { // Check if the key is already in the map. If this fails, it is coder error // and not user error, so throw. assert(option_map.find(name) == option_map.end()); @@ -300,198 +277,201 @@ void CConfig::addDoubleOption(const string& name, su2double & option_field, su2d // Create an association between the option name ("CFL") and the parser generated above. // During configuration, the parsing script will get the option name, and use this map // to find how to parse that option. - option_map.insert(pair(name, val)); + option_map.insert(pair(name, val)); } -void CConfig::addStringOption(const string& name, string & option_field, string default_value) { - +void CConfig::addStringOption(const string& name, string& option_field, string default_value) { assert(option_map.find(name) == option_map.end()); all_options.insert(pair(name, true)); COptionBase* val = new COptionString(name, option_field, std::move(default_value)); - option_map.insert(pair(name, val)); + option_map.insert(pair(name, val)); } -void CConfig::addIntegerOption(const string& name, int & option_field, int default_value) { +void CConfig::addIntegerOption(const string& name, int& option_field, int default_value) { assert(option_map.find(name) == option_map.end()); all_options.insert(pair(name, true)); COptionBase* val = new COptionInt(name, option_field, default_value); - option_map.insert(pair(name, val)); + option_map.insert(pair(name, val)); } -void CConfig::addUnsignedLongOption(const string& name, unsigned long & option_field, unsigned long default_value) { +void CConfig::addUnsignedLongOption(const string& name, unsigned long& option_field, unsigned long default_value) { assert(option_map.find(name) == option_map.end()); all_options.insert(pair(name, true)); COptionBase* val = new COptionULong(name, option_field, default_value); - option_map.insert(pair(name, val)); + option_map.insert(pair(name, val)); } -void CConfig::addUnsignedShortOption(const string& name, unsigned short & option_field, unsigned short default_value) { +void CConfig::addUnsignedShortOption(const string& name, unsigned short& option_field, unsigned short default_value) { assert(option_map.find(name) == option_map.end()); all_options.insert(pair(name, true)); COptionBase* val = new COptionUShort(name, option_field, default_value); - option_map.insert(pair(name, val)); + option_map.insert(pair(name, val)); } -void CConfig::addLongOption(const string& name, long & option_field, long default_value) { +void CConfig::addLongOption(const string& name, long& option_field, long default_value) { assert(option_map.find(name) == option_map.end()); all_options.insert(pair(name, true)); COptionBase* val = new COptionLong(name, option_field, default_value); - option_map.insert(pair(name, val)); + option_map.insert(pair(name, val)); } -void CConfig::addBoolOption(const string& name, bool & option_field, bool default_value) { +void CConfig::addBoolOption(const string& name, bool& option_field, bool default_value) { assert(option_map.find(name) == option_map.end()); all_options.insert(pair(name, true)); COptionBase* val = new COptionBool(name, option_field, default_value); - option_map.insert(pair(name, val)); + option_map.insert(pair(name, val)); } // enum types work differently than all of the others because there are a small number of valid // string entries for the type. One must also provide a list of all the valid strings of that type. template -void CConfig::addEnumOption(const string name, TField& option_field, const map& enum_map, Tenum default_value) { +void CConfig::addEnumOption(const string name, TField& option_field, const map& enum_map, + Tenum default_value) { assert(option_map.find(name) == option_map.end()); all_options.insert(pair(name, true)); COptionBase* val = new COptionEnum(name, enum_map, option_field, default_value); - option_map.insert(pair(name, val)); + option_map.insert(pair(name, val)); } // input_size is the number of options read in from the config file template -void CConfig::addEnumListOption(const string name, unsigned short& input_size, TField*& option_field, const map& enum_map) { +void CConfig::addEnumListOption(const string name, unsigned short& input_size, TField*& option_field, + const map& enum_map) { input_size = 0; assert(option_map.find(name) == option_map.end()); all_options.insert(pair(name, true)); - COptionBase* val = new COptionEnumList(name, enum_map, option_field, input_size); - option_map.insert( pair(name, val) ); + COptionBase* val = new COptionEnumList(name, enum_map, option_field, input_size); + option_map.insert(pair(name, val)); } void CConfig::addDoubleArrayOption(const string& name, const int size, su2double* option_field) { assert(option_map.find(name) == option_map.end()); all_options.insert(pair(name, true)); COptionBase* val = new COptionArray(name, size, option_field); - option_map.insert(pair(name, val)); + option_map.insert(pair(name, val)); } void CConfig::addUShortArrayOption(const string& name, const int size, unsigned short* option_field) { assert(option_map.find(name) == option_map.end()); all_options.insert(pair(name, true)); COptionBase* val = new COptionArray(name, size, option_field); - option_map.insert(pair(name, val)); + option_map.insert(pair(name, val)); } -void CConfig::addDoubleListOption(const string& name, unsigned short & size, su2double * & option_field) { +void CConfig::addDoubleListOption(const string& name, unsigned short& size, su2double*& option_field) { assert(option_map.find(name) == option_map.end()); all_options.insert(pair(name, true)); COptionBase* val = new COptionDoubleList(name, size, option_field); - option_map.insert(pair(name, val)); + option_map.insert(pair(name, val)); } -void CConfig::addShortListOption(const string& name, unsigned short & size, short * & option_field) { +void CConfig::addShortListOption(const string& name, unsigned short& size, short*& option_field) { assert(option_map.find(name) == option_map.end()); all_options.insert(pair(name, true)); COptionBase* val = new COptionShortList(name, size, option_field); - option_map.insert(pair(name, val)); + option_map.insert(pair(name, val)); } -void CConfig::addUShortListOption(const string& name, unsigned short & size, unsigned short * & option_field) { +void CConfig::addUShortListOption(const string& name, unsigned short& size, unsigned short*& option_field) { assert(option_map.find(name) == option_map.end()); all_options.insert(pair(name, true)); COptionBase* val = new COptionUShortList(name, size, option_field); - option_map.insert(pair(name, val)); + option_map.insert(pair(name, val)); } -void CConfig::addULongListOption(const string& name, unsigned short & size, unsigned long * & option_field) { +void CConfig::addULongListOption(const string& name, unsigned short& size, unsigned long*& option_field) { assert(option_map.find(name) == option_map.end()); all_options.insert(pair(name, true)); COptionBase* val = new COptionULongList(name, size, option_field); - option_map.insert(pair(name, val)); + option_map.insert(pair(name, val)); } -void CConfig::addStringListOption(const string& name, unsigned short & num_marker, string* & option_field) { +void CConfig::addStringListOption(const string& name, unsigned short& num_marker, string*& option_field) { assert(option_map.find(name) == option_map.end()); all_options.insert(pair(name, true)); COptionBase* val = new COptionStringList(name, num_marker, option_field); - option_map.insert(pair(name, val)); + option_map.insert(pair(name, val)); } -void CConfig::addConvectOption(const string& name, unsigned short & space_field, CENTERED & centered_field, UPWIND & upwind_field) { +void CConfig::addConvectOption(const string& name, unsigned short& space_field, CENTERED& centered_field, + UPWIND& upwind_field) { assert(option_map.find(name) == option_map.end()); all_options.insert(pair(name, true)); COptionBase* val = new COptionConvect(name, space_field, centered_field, upwind_field); - option_map.insert(pair(name, val)); + option_map.insert(pair(name, val)); } -void CConfig::addConvectFEMOption(const string& name, unsigned short & space_field, unsigned short & fem_field) { +void CConfig::addConvectFEMOption(const string& name, unsigned short& space_field, unsigned short& fem_field) { assert(option_map.find(name) == option_map.end()); all_options.insert(pair(name, true)); COptionBase* val = new COptionFEMConvect(name, space_field, fem_field); - option_map.insert(pair(name, val)); + option_map.insert(pair(name, val)); } -void CConfig::addMathProblemOption(const string& name, bool & ContinuousAdjoint, const bool & ContinuousAdjoint_default, - bool & DiscreteAdjoint, const bool & DiscreteAdjoint_default, - bool & Restart_Flow, const bool & Restart_Flow_default) { +void CConfig::addMathProblemOption(const string& name, bool& ContinuousAdjoint, const bool& ContinuousAdjoint_default, + bool& DiscreteAdjoint, const bool& DiscreteAdjoint_default, bool& Restart_Flow, + const bool& Restart_Flow_default) { assert(option_map.find(name) == option_map.end()); all_options.insert(pair(name, true)); - COptionBase* val = new COptionMathProblem(name, ContinuousAdjoint, ContinuousAdjoint_default, DiscreteAdjoint, DiscreteAdjoint_default, Restart_Flow, Restart_Flow_default); - option_map.insert(pair(name, val)); + COptionBase* val = new COptionMathProblem(name, ContinuousAdjoint, ContinuousAdjoint_default, DiscreteAdjoint, + DiscreteAdjoint_default, Restart_Flow, Restart_Flow_default); + option_map.insert(pair(name, val)); } -void CConfig::addDVParamOption(const string& name, unsigned short & nDV_field, su2double** & paramDV, string* & FFDTag, - unsigned short* & design_variable) { +void CConfig::addDVParamOption(const string& name, unsigned short& nDV_field, su2double**& paramDV, string*& FFDTag, + unsigned short*& design_variable) { assert(option_map.find(name) == option_map.end()); all_options.insert(pair(name, true)); COptionBase* val = new COptionDVParam(name, nDV_field, paramDV, FFDTag, design_variable); - option_map.insert(pair(name, val)); + option_map.insert(pair(name, val)); } -void CConfig::addDVValueOption(const string& name, unsigned short* & nDVValue_field, su2double** & valueDV, unsigned short & nDV_field, su2double** & paramDV, - unsigned short* & design_variable) { +void CConfig::addDVValueOption(const string& name, unsigned short*& nDVValue_field, su2double**& valueDV, + unsigned short& nDV_field, su2double**& paramDV, unsigned short*& design_variable) { assert(option_map.find(name) == option_map.end()); all_options.insert(pair(name, true)); COptionBase* val = new COptionDVValue(name, nDVValue_field, valueDV, nDV_field, paramDV, design_variable); - option_map.insert(pair(name, val)); + option_map.insert(pair(name, val)); } -void CConfig::addFFDDefOption(const string& name, unsigned short & nFFD_field, su2double** & coordFFD, string* & FFDTag) { +void CConfig::addFFDDefOption(const string& name, unsigned short& nFFD_field, su2double**& coordFFD, string*& FFDTag) { assert(option_map.find(name) == option_map.end()); all_options.insert(pair(name, true)); COptionBase* val = new COptionFFDDef(name, nFFD_field, coordFFD, FFDTag); - option_map.insert(pair(name, val)); + option_map.insert(pair(name, val)); } -void CConfig::addFFDDegreeOption(const string& name, unsigned short & nFFD_field, unsigned short** & degreeFFD) { +void CConfig::addFFDDegreeOption(const string& name, unsigned short& nFFD_field, unsigned short**& degreeFFD) { assert(option_map.find(name) == option_map.end()); all_options.insert(pair(name, true)); COptionBase* val = new COptionFFDDegree(name, nFFD_field, degreeFFD); - option_map.insert(pair(name, val)); + option_map.insert(pair(name, val)); } -void CConfig::addStringDoubleListOption(const string& name, unsigned short & list_size, string * & string_field, - su2double* & double_field) { +void CConfig::addStringDoubleListOption(const string& name, unsigned short& list_size, string*& string_field, + su2double*& double_field) { assert(option_map.find(name) == option_map.end()); all_options.insert(pair(name, true)); COptionBase* val = new COptionStringValuesList(name, list_size, string_field, double_field); - option_map.insert(pair(name, val)); + option_map.insert(pair(name, val)); } -void CConfig::addInletOption(const string& name, unsigned short & nMarker_Inlet, string * & Marker_Inlet, - su2double* & Ttotal, su2double* & Ptotal, su2double** & FlowDir) { +void CConfig::addInletOption(const string& name, unsigned short& nMarker_Inlet, string*& Marker_Inlet, + su2double*& Ttotal, su2double*& Ptotal, su2double**& FlowDir) { assert(option_map.find(name) == option_map.end()); all_options.insert(pair(name, true)); COptionBase* val = new COptionInlet(name, nMarker_Inlet, Marker_Inlet, Ttotal, Ptotal, FlowDir); - option_map.insert(pair(name, val)); + option_map.insert(pair(name, val)); } -void CConfig::addInletSpeciesOption(const string& name, unsigned short & nMarker_Inlet_Species, - string * & Marker_Inlet_Species, su2double** & inlet_species_val, - unsigned short & nSpecies_per_Inlet) { +void CConfig::addInletSpeciesOption(const string& name, unsigned short& nMarker_Inlet_Species, + string*& Marker_Inlet_Species, su2double**& inlet_species_val, + unsigned short& nSpecies_per_Inlet) { assert(option_map.find(name) == option_map.end()); all_options.insert(pair(name, true)); COptionBase* val = new COptionStringValuesList(name, nMarker_Inlet_Species, Marker_Inlet_Species, inlet_species_val, nSpecies_per_Inlet); - option_map.insert(pair(name, val)); + option_map.insert(pair(name, val)); } void CConfig::addInletTurbOption(const string& name, unsigned short& nMarker_Inlet_Turb, string*& Marker_Inlet_Turb, @@ -504,83 +484,87 @@ void CConfig::addInletTurbOption(const string& name, unsigned short& nMarker_Inl } template -void CConfig::addRiemannOption(const string name, unsigned short & nMarker_Riemann, string * & Marker_Riemann, unsigned short* & option_field, const map & enum_map, - su2double* & var1, su2double* & var2, su2double** & FlowDir) { +void CConfig::addRiemannOption(const string name, unsigned short& nMarker_Riemann, string*& Marker_Riemann, + unsigned short*& option_field, const map& enum_map, su2double*& var1, + su2double*& var2, su2double**& FlowDir) { assert(option_map.find(name) == option_map.end()); all_options.insert(pair(name, true)); - COptionBase* val = new COptionRiemann(name, nMarker_Riemann, Marker_Riemann, option_field, enum_map, var1, var2, FlowDir); - option_map.insert(pair(name, val)); + COptionBase* val = + new COptionRiemann(name, nMarker_Riemann, Marker_Riemann, option_field, enum_map, var1, var2, FlowDir); + option_map.insert(pair(name, val)); } template -void CConfig::addGilesOption(const string name, unsigned short & nMarker_Giles, string * & Marker_Giles, unsigned short* & option_field, const map & enum_map, - su2double* & var1, su2double* & var2, su2double** & FlowDir, su2double* & relaxfactor1, su2double* & relaxfactor2) { +void CConfig::addGilesOption(const string name, unsigned short& nMarker_Giles, string*& Marker_Giles, + unsigned short*& option_field, const map& enum_map, su2double*& var1, + su2double*& var2, su2double**& FlowDir, su2double*& relaxfactor1, + su2double*& relaxfactor2) { assert(option_map.find(name) == option_map.end()); all_options.insert(pair(name, true)); - COptionBase* val = new COptionGiles(name, nMarker_Giles, Marker_Giles, option_field, enum_map, var1, var2, FlowDir, relaxfactor1, relaxfactor2); - option_map.insert(pair(name, val)); + COptionBase* val = new COptionGiles(name, nMarker_Giles, Marker_Giles, option_field, enum_map, var1, var2, + FlowDir, relaxfactor1, relaxfactor2); + option_map.insert(pair(name, val)); } -void CConfig::addExhaustOption(const string& name, unsigned short & nMarker_Exhaust, string * & Marker_Exhaust, - su2double* & Ttotal, su2double* & Ptotal) { +void CConfig::addExhaustOption(const string& name, unsigned short& nMarker_Exhaust, string*& Marker_Exhaust, + su2double*& Ttotal, su2double*& Ptotal) { assert(option_map.find(name) == option_map.end()); all_options.insert(pair(name, true)); COptionBase* val = new COptionExhaust(name, nMarker_Exhaust, Marker_Exhaust, Ttotal, Ptotal); - option_map.insert(pair(name, val)); + option_map.insert(pair(name, val)); } -void CConfig::addPeriodicOption(const string & name, unsigned short & nMarker_PerBound, - string* & Marker_PerBound, string* & Marker_PerDonor, - su2double** & RotCenter, su2double** & RotAngles, su2double** & Translation) { +void CConfig::addPeriodicOption(const string& name, unsigned short& nMarker_PerBound, string*& Marker_PerBound, + string*& Marker_PerDonor, su2double**& RotCenter, su2double**& RotAngles, + su2double**& Translation) { assert(option_map.find(name) == option_map.end()); all_options.insert(pair(name, true)); - COptionBase* val = new COptionPeriodic(name, nMarker_PerBound, Marker_PerBound, Marker_PerDonor, RotCenter, RotAngles, Translation); - option_map.insert(pair(name, val)); + COptionBase* val = + new COptionPeriodic(name, nMarker_PerBound, Marker_PerBound, Marker_PerDonor, RotCenter, RotAngles, Translation); + option_map.insert(pair(name, val)); } -void CConfig::addTurboPerfOption(const string & name, unsigned short & nMarker_TurboPerf, - string* & Marker_TurboBoundIn, string* & Marker_TurboBoundOut) { +void CConfig::addTurboPerfOption(const string& name, unsigned short& nMarker_TurboPerf, string*& Marker_TurboBoundIn, + string*& Marker_TurboBoundOut) { assert(option_map.find(name) == option_map.end()); all_options.insert(pair(name, true)); COptionBase* val = new COptionTurboPerformance(name, nMarker_TurboPerf, Marker_TurboBoundIn, Marker_TurboBoundOut); - option_map.insert(pair(name, val)); + option_map.insert(pair(name, val)); } -void CConfig::addActDiskOption(const string & name, unsigned short & nMarker_ActDiskInlet, - unsigned short & nMarker_ActDiskOutlet, string* & Marker_ActDiskInlet, - string* & Marker_ActDiskOutlet, su2double** & ActDisk_PressJump, - su2double** & ActDisk_TempJump, su2double** & ActDisk_Omega) { +void CConfig::addActDiskOption(const string& name, unsigned short& nMarker_ActDiskInlet, + unsigned short& nMarker_ActDiskOutlet, string*& Marker_ActDiskInlet, + string*& Marker_ActDiskOutlet, su2double**& ActDisk_PressJump, + su2double**& ActDisk_TempJump, su2double**& ActDisk_Omega) { assert(option_map.find(name) == option_map.end()); all_options.insert(pair(name, true)); COptionBase* val = new COptionActDisk(name, nMarker_ActDiskInlet, nMarker_ActDiskOutlet, Marker_ActDiskInlet, Marker_ActDiskOutlet, ActDisk_PressJump, ActDisk_TempJump, ActDisk_Omega); - option_map.insert(pair(name, val)); + option_map.insert(pair(name, val)); } -void CConfig::addWallFunctionOption(const string &name, unsigned short &list_size, string* &string_field, - WALL_FUNCTIONS* &val_Kind_WF, unsigned short** &val_IntInfo_WF, - su2double** &val_DoubleInfo_WF) { +void CConfig::addWallFunctionOption(const string& name, unsigned short& list_size, string*& string_field, + WALL_FUNCTIONS*& val_Kind_WF, unsigned short**& val_IntInfo_WF, + su2double**& val_DoubleInfo_WF) { assert(option_map.find(name) == option_map.end()); all_options.insert(pair(name, true)); - COptionBase* val = new COptionWallFunction(name, list_size, string_field, val_Kind_WF, - val_IntInfo_WF, val_DoubleInfo_WF); - option_map.insert(pair(name, val)); + COptionBase* val = + new COptionWallFunction(name, list_size, string_field, val_Kind_WF, val_IntInfo_WF, val_DoubleInfo_WF); + option_map.insert(pair(name, val)); } void CConfig::addPythonOption(const string& name) { assert(option_map.find(name) == option_map.end()); all_options.insert(pair(name, true)); COptionBase* val = new COptionPython(name); - option_map.insert(pair(name, val)); + option_map.insert(pair(name, val)); } unsigned short CConfig::GetnZone(const string& val_mesh_filename, unsigned short val_format) { - int nZone = 1; /* Default value if nothing is specified. */ switch (val_format) { case SU2: { - /*--- Local variables for reading the SU2 file. ---*/ string text_line; ifstream mesh_file; @@ -588,35 +572,32 @@ unsigned short CConfig::GetnZone(const string& val_mesh_filename, unsigned short /*--- Check if the mesh file can be opened for reading. ---*/ mesh_file.open(val_mesh_filename.c_str(), ios::in); if (mesh_file.fail()) - SU2_MPI::Error(string("There is no geometry file called ") + val_mesh_filename, - CURRENT_FUNCTION); + SU2_MPI::Error(string("There is no geometry file called ") + val_mesh_filename, CURRENT_FUNCTION); /*--- Read the SU2 mesh file until the zone data is reached or when it can be decided that it is not present. ---*/ - while( getline (mesh_file, text_line) ) { - + while (getline(mesh_file, text_line)) { /*--- Search for the "NZONE" keyword to see if there are multiple Zones ---*/ - if(text_line.find ("NZONE=",0) != string::npos) { - text_line.erase (0,6); nZone = atoi(text_line.c_str()); + if (text_line.find("NZONE=", 0) != string::npos) { + text_line.erase(0, 6); + nZone = atoi(text_line.c_str()); break; } /*--- If one of the keywords IZONE, NELEM or NPOIN, NMARK is encountered, it can be assumed that the NZONE keyword is not present and the loop can be terminated. ---*/ - if(text_line.find ("IZONE=",0) != string::npos) break; - if(text_line.find ("NELEM=",0) != string::npos) break; - if(text_line.find ("NPOIN=",0) != string::npos) break; - if(text_line.find ("NMARK=",0) != string::npos) break; + if (text_line.find("IZONE=", 0) != string::npos) break; + if (text_line.find("NELEM=", 0) != string::npos) break; + if (text_line.find("NPOIN=", 0) != string::npos) break; + if (text_line.find("NMARK=", 0) != string::npos) break; } mesh_file.close(); break; - } case CGNS_GRID: { - #ifdef HAVE_CGNS /*--- Local variables which are needed when calling the CGNS mid-level API. ---*/ @@ -627,10 +608,9 @@ unsigned short CConfig::GetnZone(const string& val_mesh_filename, unsigned short /*--- Check whether the supplied file is truly a CGNS file. ---*/ - if ( cg_is_cgns(val_mesh_filename.c_str(), &file_type) != CG_OK ) { - SU2_MPI::Error(val_mesh_filename + - string(" was not found or is not a properly formatted CGNS file.\n") + - string("Note that SU2 expects unstructured CGNS files in ADF data format."), + if (cg_is_cgns(val_mesh_filename.c_str(), &file_type) != CG_OK) { + SU2_MPI::Error(val_mesh_filename + string(" was not found or is not a properly formatted CGNS file.\n") + + string("Note that SU2 expects unstructured CGNS files in ADF data format."), CURRENT_FUNCTION); } @@ -649,34 +629,30 @@ unsigned short CConfig::GetnZone(const string& val_mesh_filename, unsigned short error if there is because this reader can currently only handle one database. ---*/ - if ( nbases > 1 ) { - SU2_MPI::Error("CGNS reader currently incapable of handling more than 1 database." , - CURRENT_FUNCTION); + if (nbases > 1) { + SU2_MPI::Error("CGNS reader currently incapable of handling more than 1 database.", CURRENT_FUNCTION); } /*--- Read the databases. Note that the indexing starts at 1. ---*/ - for ( int i = 1; i <= nbases; i++ ) { - + for (int i = 1; i <= nbases; i++) { if (cg_base_read(fn, i, basename, &cell_dim, &phys_dim)) cg_error_exit(); /*--- Get the number of zones for this base. ---*/ if (cg_nzones(fn, i, &nzones)) cg_error_exit(); - } /*--- Close the CGNS file. ---*/ - if ( cg_close(fn) ) cg_error_exit(); + if (cg_close(fn)) cg_error_exit(); /*--- Set the number of zones as read from the CGNS file ---*/ nZone = nzones; #else - SU2_MPI::Error(string(" SU2 built without CGNS support. \n") + - string(" To use CGNS, build SU2 accordingly."), + SU2_MPI::Error(string(" SU2 built without CGNS support. \n") + string(" To use CGNS, build SU2 accordingly."), CURRENT_FUNCTION); #endif @@ -692,17 +668,14 @@ unsigned short CConfig::GetnZone(const string& val_mesh_filename, unsigned short } } - return (unsigned short) nZone; - + return (unsigned short)nZone; } unsigned short CConfig::GetnDim(const string& val_mesh_filename, unsigned short val_format) { - short nDim = -1; switch (val_format) { case SU2: { - /*--- Local variables for reading the SU2 file. ---*/ string text_line; ifstream mesh_file; @@ -710,41 +683,43 @@ unsigned short CConfig::GetnDim(const string& val_mesh_filename, unsigned short /*--- Open grid file ---*/ mesh_file.open(val_mesh_filename.c_str(), ios::in); if (mesh_file.fail()) { - SU2_MPI::Error(string("The SU2 mesh file named ") + val_mesh_filename + string(" was not found."), CURRENT_FUNCTION); + SU2_MPI::Error(string("The SU2 mesh file named ") + val_mesh_filename + string(" was not found."), + CURRENT_FUNCTION); } /*--- Read the SU2 mesh file until the dimension data is reached or when it can be decided that it is not present. ---*/ - while( getline (mesh_file, text_line) ) { - + while (getline(mesh_file, text_line)) { /*--- Search for the "NDIME" keyword to determine the number of dimensions. ---*/ - if(text_line.find ("NDIME=",0) != string::npos) { - text_line.erase (0,6); nDim = atoi(text_line.c_str()); + if (text_line.find("NDIME=", 0) != string::npos) { + text_line.erase(0, 6); + nDim = atoi(text_line.c_str()); break; } /*--- If one of the keywords NELEM or NPOIN, NMARK is encountered, it can be assumed that the NZONE keyword is not present and the loop can be terminated. ---*/ - if(text_line.find ("NELEM=",0) != string::npos) break; - if(text_line.find ("NPOIN=",0) != string::npos) break; - if(text_line.find ("NMARK=",0) != string::npos) break; + if (text_line.find("NELEM=", 0) != string::npos) break; + if (text_line.find("NPOIN=", 0) != string::npos) break; + if (text_line.find("NMARK=", 0) != string::npos) break; } mesh_file.close(); /*--- Throw an error if the dimension was not found. ---*/ if (nDim == -1) { - SU2_MPI::Error(val_mesh_filename + string(" is not an SU2 mesh file or has the wrong format \n ('NDIME=' not found). Please check."), - CURRENT_FUNCTION); + SU2_MPI::Error( + val_mesh_filename + + string(" is not an SU2 mesh file or has the wrong format \n ('NDIME=' not found). Please check."), + CURRENT_FUNCTION); } break; } case CGNS_GRID: { - #ifdef HAVE_CGNS /*--- Local variables which are needed when calling the CGNS mid-level API. ---*/ @@ -753,10 +728,9 @@ unsigned short CConfig::GetnDim(const string& val_mesh_filename, unsigned short char basename[CGNS_STRING_SIZE]; /*--- Check whether the supplied file is truly a CGNS file. ---*/ - if ( cg_is_cgns(val_mesh_filename.c_str(), &file_type) != CG_OK ) { - SU2_MPI::Error(val_mesh_filename + - string(" was not found or is not a properly formatted CGNS file.\n") + - string("Note that SU2 expects unstructured CGNS files in ADF data format."), + if (cg_is_cgns(val_mesh_filename.c_str(), &file_type) != CG_OK) { + SU2_MPI::Error(val_mesh_filename + string(" was not found or is not a properly formatted CGNS file.\n") + + string("Note that SU2 expects unstructured CGNS files in ADF data format."), CURRENT_FUNCTION); } @@ -772,9 +746,8 @@ unsigned short CConfig::GetnDim(const string& val_mesh_filename, unsigned short /*--- Check if there is more than one database. Throw an error if there is because this reader can currently only handle one database. ---*/ - if ( nbases > 1 ) - SU2_MPI::Error("CGNS reader currently incapable of handling more than 1 database." , - CURRENT_FUNCTION); + if (nbases > 1) + SU2_MPI::Error("CGNS reader currently incapable of handling more than 1 database.", CURRENT_FUNCTION); /*--- Read the database. Note that the indexing starts at 1. Afterwards close the file again. ---*/ @@ -785,8 +758,7 @@ unsigned short CConfig::GetnDim(const string& val_mesh_filename, unsigned short nDim = cell_dim; #else - SU2_MPI::Error(string(" SU2 built without CGNS support. \n") + - string(" To use CGNS, build SU2 accordingly."), + SU2_MPI::Error(string(" SU2 built without CGNS support. \n") + string(" To use CGNS, build SU2 accordingly."), CURRENT_FUNCTION); #endif @@ -805,192 +777,326 @@ unsigned short CConfig::GetnDim(const string& val_mesh_filename, unsigned short /*--- After reading the mesh, assert that the dimension is equal to 2 or 3. ---*/ assert((nDim == 2) || (nDim == 3)); - return (unsigned short) nDim; + return (unsigned short)nDim; } void CConfig::SetPointersNull() { - - Marker_CfgFile_GeoEval = nullptr; Marker_All_GeoEval = nullptr; - Marker_CfgFile_Monitoring = nullptr; Marker_All_Monitoring = nullptr; - Marker_CfgFile_Designing = nullptr; Marker_All_Designing = nullptr; - Marker_CfgFile_Plotting = nullptr; Marker_All_Plotting = nullptr; - Marker_CfgFile_Analyze = nullptr; Marker_All_Analyze = nullptr; - Marker_CfgFile_DV = nullptr; Marker_All_DV = nullptr; - Marker_CfgFile_Moving = nullptr; Marker_All_Moving = nullptr; - Marker_CfgFile_PerBound = nullptr; Marker_All_PerBound = nullptr; Marker_PerBound = nullptr; - Marker_CfgFile_Turbomachinery = nullptr; Marker_All_Turbomachinery = nullptr; - Marker_CfgFile_TurbomachineryFlag = nullptr; Marker_All_TurbomachineryFlag = nullptr; - Marker_CfgFile_MixingPlaneInterface = nullptr; Marker_All_MixingPlaneInterface = nullptr; + Marker_CfgFile_GeoEval = nullptr; + Marker_All_GeoEval = nullptr; + Marker_CfgFile_Monitoring = nullptr; + Marker_All_Monitoring = nullptr; + Marker_CfgFile_Designing = nullptr; + Marker_All_Designing = nullptr; + Marker_CfgFile_Plotting = nullptr; + Marker_All_Plotting = nullptr; + Marker_CfgFile_Analyze = nullptr; + Marker_All_Analyze = nullptr; + Marker_CfgFile_DV = nullptr; + Marker_All_DV = nullptr; + Marker_CfgFile_Moving = nullptr; + Marker_All_Moving = nullptr; + Marker_CfgFile_PerBound = nullptr; + Marker_All_PerBound = nullptr; + Marker_PerBound = nullptr; + Marker_CfgFile_Turbomachinery = nullptr; + Marker_All_Turbomachinery = nullptr; + Marker_CfgFile_TurbomachineryFlag = nullptr; + Marker_All_TurbomachineryFlag = nullptr; + Marker_CfgFile_MixingPlaneInterface = nullptr; + Marker_All_MixingPlaneInterface = nullptr; Marker_CfgFile_ZoneInterface = nullptr; - Marker_CfgFile_Deform_Mesh = nullptr; Marker_All_Deform_Mesh = nullptr; - Marker_CfgFile_Deform_Mesh_Sym_Plane = nullptr; Marker_All_Deform_Mesh_Sym_Plane = nullptr; - Marker_CfgFile_Fluid_Load = nullptr; Marker_All_Fluid_Load = nullptr; - Marker_CfgFile_SobolevBC = nullptr; Marker_All_SobolevBC = nullptr; - - Marker_CfgFile_Turbomachinery = nullptr; Marker_All_Turbomachinery = nullptr; - Marker_CfgFile_TurbomachineryFlag = nullptr; Marker_All_TurbomachineryFlag = nullptr; - Marker_CfgFile_MixingPlaneInterface = nullptr; Marker_All_MixingPlaneInterface = nullptr; - - Marker_CfgFile_PyCustom = nullptr; Marker_All_PyCustom = nullptr; - - Marker_DV = nullptr; Marker_Moving = nullptr; Marker_Monitoring = nullptr; - Marker_Designing = nullptr; Marker_GeoEval = nullptr; Marker_Plotting = nullptr; - Marker_Analyze = nullptr; Marker_PyCustom = nullptr; Marker_WallFunctions = nullptr; - Marker_CfgFile_KindBC = nullptr; Marker_All_KindBC = nullptr; Marker_SobolevBC = nullptr; - Marker_StrongBC = nullptr; - - Kind_WallFunctions = nullptr; - IntInfo_WallFunctions = nullptr; + Marker_CfgFile_Deform_Mesh = nullptr; + Marker_All_Deform_Mesh = nullptr; + Marker_CfgFile_Deform_Mesh_Sym_Plane = nullptr; + Marker_All_Deform_Mesh_Sym_Plane = nullptr; + Marker_CfgFile_Fluid_Load = nullptr; + Marker_All_Fluid_Load = nullptr; + Marker_CfgFile_SobolevBC = nullptr; + Marker_All_SobolevBC = nullptr; + + Marker_CfgFile_Turbomachinery = nullptr; + Marker_All_Turbomachinery = nullptr; + Marker_CfgFile_TurbomachineryFlag = nullptr; + Marker_All_TurbomachineryFlag = nullptr; + Marker_CfgFile_MixingPlaneInterface = nullptr; + Marker_All_MixingPlaneInterface = nullptr; + + Marker_CfgFile_PyCustom = nullptr; + Marker_All_PyCustom = nullptr; + + Marker_DV = nullptr; + Marker_Moving = nullptr; + Marker_Monitoring = nullptr; + Marker_Designing = nullptr; + Marker_GeoEval = nullptr; + Marker_Plotting = nullptr; + Marker_Analyze = nullptr; + Marker_PyCustom = nullptr; + Marker_WallFunctions = nullptr; + Marker_CfgFile_KindBC = nullptr; + Marker_All_KindBC = nullptr; + Marker_SobolevBC = nullptr; + Marker_StrongBC = nullptr; + + Kind_WallFunctions = nullptr; + IntInfo_WallFunctions = nullptr; DoubleInfo_WallFunctions = nullptr; Config_Filenames = nullptr; /*--- Marker Pointers ---*/ - Marker_Euler = nullptr; Marker_FarField = nullptr; Marker_Custom = nullptr; - Marker_SymWall = nullptr; Marker_PerBound = nullptr; - Marker_PerDonor = nullptr; Marker_NearFieldBound = nullptr; Marker_Inlet_Turb = nullptr; - Marker_Deform_Mesh = nullptr; Marker_Deform_Mesh_Sym_Plane= nullptr; Marker_Fluid_Load = nullptr; - Marker_Inlet = nullptr; Marker_Outlet = nullptr; Marker_Inlet_Species = nullptr; - Marker_Supersonic_Inlet = nullptr; Marker_Supersonic_Outlet = nullptr; Marker_Smoluchowski_Maxwell= nullptr; - Marker_Isothermal = nullptr; Marker_HeatFlux = nullptr; Marker_EngineInflow = nullptr; - Marker_Load = nullptr; Marker_Disp_Dir = nullptr; Marker_RoughWall = nullptr; - Marker_EngineExhaust = nullptr; Marker_Displacement = nullptr; Marker_Load = nullptr; - Marker_Load_Dir = nullptr; Marker_Clamped = nullptr; - Marker_Internal = nullptr; - Marker_All_TagBound = nullptr; Marker_CfgFile_TagBound = nullptr; Marker_All_KindBC = nullptr; - Marker_CfgFile_KindBC = nullptr; Marker_All_SendRecv = nullptr; Marker_All_PerBound = nullptr; - Marker_ZoneInterface = nullptr; Marker_All_ZoneInterface = nullptr; Marker_Riemann = nullptr; - Marker_Fluid_InterfaceBound = nullptr; Marker_CHTInterface = nullptr; Marker_Damper = nullptr; - Marker_Emissivity = nullptr; Marker_HeatTransfer = nullptr; - - /*--- Boundary Condition settings ---*/ - - Isothermal_Temperature = nullptr; HeatTransfer_Coeff = nullptr; HeatTransfer_WallTemp = nullptr; - Heat_Flux = nullptr; Displ_Value = nullptr; Load_Value = nullptr; - Damper_Constant = nullptr; Wall_Emissivity = nullptr; - Roughness_Height = nullptr; + Marker_Euler = nullptr; + Marker_FarField = nullptr; + Marker_Custom = nullptr; + Marker_SymWall = nullptr; + Marker_PerBound = nullptr; + Marker_PerDonor = nullptr; + Marker_NearFieldBound = nullptr; + Marker_Inlet_Turb = nullptr; + Marker_Deform_Mesh = nullptr; + Marker_Deform_Mesh_Sym_Plane = nullptr; + Marker_Fluid_Load = nullptr; + Marker_Inlet = nullptr; + Marker_Outlet = nullptr; + Marker_Inlet_Species = nullptr; + Marker_Supersonic_Inlet = nullptr; + Marker_Supersonic_Outlet = nullptr; + Marker_Smoluchowski_Maxwell = nullptr; + Marker_Isothermal = nullptr; + Marker_HeatFlux = nullptr; + Marker_EngineInflow = nullptr; + Marker_Load = nullptr; + Marker_Disp_Dir = nullptr; + Marker_RoughWall = nullptr; + Marker_EngineExhaust = nullptr; + Marker_Displacement = nullptr; + Marker_Load = nullptr; + Marker_Load_Dir = nullptr; + Marker_Clamped = nullptr; + Marker_Internal = nullptr; + Marker_All_TagBound = nullptr; + Marker_CfgFile_TagBound = nullptr; + Marker_All_KindBC = nullptr; + Marker_CfgFile_KindBC = nullptr; + Marker_All_SendRecv = nullptr; + Marker_All_PerBound = nullptr; + Marker_ZoneInterface = nullptr; + Marker_All_ZoneInterface = nullptr; + Marker_Riemann = nullptr; + Marker_Fluid_InterfaceBound = nullptr; + Marker_CHTInterface = nullptr; + Marker_Damper = nullptr; + Marker_Emissivity = nullptr; + Marker_HeatTransfer = nullptr; + + /*--- Boundary Condition settings ---*/ + + Isothermal_Temperature = nullptr; + HeatTransfer_Coeff = nullptr; + HeatTransfer_WallTemp = nullptr; + Heat_Flux = nullptr; + Displ_Value = nullptr; + Load_Value = nullptr; + Damper_Constant = nullptr; + Wall_Emissivity = nullptr; + Roughness_Height = nullptr; /*--- Inlet Outlet Boundary Condition settings ---*/ - Inlet_Ttotal = nullptr; Inlet_Ptotal = nullptr; - Inlet_FlowDir = nullptr; Inlet_Temperature = nullptr; Inlet_Pressure = nullptr; - Inlet_Velocity = nullptr; - Outlet_Pressure = nullptr; Inlet_SpeciesVal = nullptr; Inlet_TurbVal = nullptr; + Inlet_Ttotal = nullptr; + Inlet_Ptotal = nullptr; + Inlet_FlowDir = nullptr; + Inlet_Temperature = nullptr; + Inlet_Pressure = nullptr; + Inlet_Velocity = nullptr; + Outlet_Pressure = nullptr; + Inlet_SpeciesVal = nullptr; + Inlet_TurbVal = nullptr; /*--- Engine Boundary Condition settings ---*/ - Inflow_Pressure = nullptr; Inflow_MassFlow = nullptr; Inflow_ReverseMassFlow = nullptr; - Inflow_TotalPressure = nullptr; Inflow_Temperature = nullptr; Inflow_TotalTemperature = nullptr; - Inflow_RamDrag = nullptr; Inflow_Force = nullptr; Inflow_Power = nullptr; - Inflow_Mach = nullptr; - - Exhaust_Pressure = nullptr; Exhaust_Temperature = nullptr; Exhaust_MassFlow = nullptr; - Exhaust_TotalPressure = nullptr; Exhaust_TotalTemperature = nullptr; - Exhaust_GrossThrust = nullptr; Exhaust_Force = nullptr; - Exhaust_Power = nullptr; Exhaust_Temperature_Target = nullptr; + Inflow_Pressure = nullptr; + Inflow_MassFlow = nullptr; + Inflow_ReverseMassFlow = nullptr; + Inflow_TotalPressure = nullptr; + Inflow_Temperature = nullptr; + Inflow_TotalTemperature = nullptr; + Inflow_RamDrag = nullptr; + Inflow_Force = nullptr; + Inflow_Power = nullptr; + Inflow_Mach = nullptr; + + Exhaust_Pressure = nullptr; + Exhaust_Temperature = nullptr; + Exhaust_MassFlow = nullptr; + Exhaust_TotalPressure = nullptr; + Exhaust_TotalTemperature = nullptr; + Exhaust_GrossThrust = nullptr; + Exhaust_Force = nullptr; + Exhaust_Power = nullptr; + Exhaust_Temperature_Target = nullptr; Exhaust_Pressure_Target = nullptr; - Engine_Mach = nullptr; Engine_Force = nullptr; - Engine_Power = nullptr; Engine_NetThrust = nullptr; Engine_GrossThrust = nullptr; - Engine_Area = nullptr; EngineInflow_Target = nullptr; - - Exhaust_Temperature_Target = nullptr; Exhaust_Temperature = nullptr; Exhaust_Pressure = nullptr; - Exhaust_Pressure_Target = nullptr; Inlet_Ttotal = nullptr; Inlet_Ptotal = nullptr; - Inlet_FlowDir = nullptr; Inlet_Temperature = nullptr; Inlet_Pressure = nullptr; - Inlet_Velocity = nullptr; Inflow_Mach = nullptr; Inflow_Pressure = nullptr; - Outlet_Pressure = nullptr; Isothermal_Temperature = nullptr; - - ElasticityMod = nullptr; PoissonRatio = nullptr; MaterialDensity = nullptr; - - Load_Dir = nullptr; Load_Dir_Value = nullptr; Load_Dir_Multiplier = nullptr; - Disp_Dir = nullptr; Disp_Dir_Value = nullptr; Disp_Dir_Multiplier = nullptr; - Electric_Field_Mod = nullptr; Electric_Field_Dir = nullptr; RefNode_Displacement = nullptr; + Engine_Mach = nullptr; + Engine_Force = nullptr; + Engine_Power = nullptr; + Engine_NetThrust = nullptr; + Engine_GrossThrust = nullptr; + Engine_Area = nullptr; + EngineInflow_Target = nullptr; + + Exhaust_Temperature_Target = nullptr; + Exhaust_Temperature = nullptr; + Exhaust_Pressure = nullptr; + Exhaust_Pressure_Target = nullptr; + Inlet_Ttotal = nullptr; + Inlet_Ptotal = nullptr; + Inlet_FlowDir = nullptr; + Inlet_Temperature = nullptr; + Inlet_Pressure = nullptr; + Inlet_Velocity = nullptr; + Inflow_Mach = nullptr; + Inflow_Pressure = nullptr; + Outlet_Pressure = nullptr; + Isothermal_Temperature = nullptr; + + ElasticityMod = nullptr; + PoissonRatio = nullptr; + MaterialDensity = nullptr; + + Load_Dir = nullptr; + Load_Dir_Value = nullptr; + Load_Dir_Multiplier = nullptr; + Disp_Dir = nullptr; + Disp_Dir_Value = nullptr; + Disp_Dir_Multiplier = nullptr; + Electric_Field_Mod = nullptr; + Electric_Field_Dir = nullptr; + RefNode_Displacement = nullptr; Electric_Constant = nullptr; /*--- Actuator Disk Boundary Condition settings ---*/ - ActDiskInlet_Pressure = nullptr; ActDiskInlet_TotalPressure = nullptr; ActDiskInlet_Temperature = nullptr; - ActDiskInlet_TotalTemperature = nullptr; ActDiskInlet_MassFlow = nullptr; ActDiskInlet_RamDrag = nullptr; - ActDiskInlet_Force = nullptr; ActDiskInlet_Power = nullptr; - - ActDiskOutlet_Pressure = nullptr; - ActDiskOutlet_TotalPressure = nullptr; ActDiskOutlet_GrossThrust = nullptr; ActDiskOutlet_Force = nullptr; - ActDiskOutlet_Power = nullptr; ActDiskOutlet_Temperature = nullptr; ActDiskOutlet_TotalTemperature = nullptr; - ActDiskOutlet_MassFlow = nullptr; - - ActDisk_DeltaPress = nullptr; ActDisk_DeltaTemp = nullptr; - ActDisk_TotalPressRatio = nullptr; ActDisk_TotalTempRatio = nullptr; ActDisk_StaticPressRatio = nullptr; - ActDisk_StaticTempRatio = nullptr; ActDisk_NetThrust = nullptr; ActDisk_GrossThrust = nullptr; - ActDisk_Power = nullptr; ActDisk_MassFlow = nullptr; ActDisk_Area = nullptr; - ActDisk_ReverseMassFlow = nullptr; Surface_MassFlow = nullptr; Surface_Mach = nullptr; - Surface_Temperature = nullptr; Surface_Pressure = nullptr; Surface_Density = nullptr; Surface_Enthalpy = nullptr; - Surface_NormalVelocity = nullptr; Surface_TotalTemperature = nullptr; Surface_TotalPressure = nullptr; Surface_PressureDrop = nullptr; - Surface_DC60 = nullptr; Surface_IDC = nullptr; - Surface_Species_Variance = nullptr; Surface_Species_0 = nullptr; - - Outlet_MassFlow = nullptr; Outlet_Density = nullptr; Outlet_Area = nullptr; - - Surface_Uniformity = nullptr; Surface_SecondaryStrength = nullptr; Surface_SecondOverUniform = nullptr; + ActDiskInlet_Pressure = nullptr; + ActDiskInlet_TotalPressure = nullptr; + ActDiskInlet_Temperature = nullptr; + ActDiskInlet_TotalTemperature = nullptr; + ActDiskInlet_MassFlow = nullptr; + ActDiskInlet_RamDrag = nullptr; + ActDiskInlet_Force = nullptr; + ActDiskInlet_Power = nullptr; + + ActDiskOutlet_Pressure = nullptr; + ActDiskOutlet_TotalPressure = nullptr; + ActDiskOutlet_GrossThrust = nullptr; + ActDiskOutlet_Force = nullptr; + ActDiskOutlet_Power = nullptr; + ActDiskOutlet_Temperature = nullptr; + ActDiskOutlet_TotalTemperature = nullptr; + ActDiskOutlet_MassFlow = nullptr; + + ActDisk_DeltaPress = nullptr; + ActDisk_DeltaTemp = nullptr; + ActDisk_TotalPressRatio = nullptr; + ActDisk_TotalTempRatio = nullptr; + ActDisk_StaticPressRatio = nullptr; + ActDisk_StaticTempRatio = nullptr; + ActDisk_NetThrust = nullptr; + ActDisk_GrossThrust = nullptr; + ActDisk_Power = nullptr; + ActDisk_MassFlow = nullptr; + ActDisk_Area = nullptr; + ActDisk_ReverseMassFlow = nullptr; + Surface_MassFlow = nullptr; + Surface_Mach = nullptr; + Surface_Temperature = nullptr; + Surface_Pressure = nullptr; + Surface_Density = nullptr; + Surface_Enthalpy = nullptr; + Surface_NormalVelocity = nullptr; + Surface_TotalTemperature = nullptr; + Surface_TotalPressure = nullptr; + Surface_PressureDrop = nullptr; + Surface_DC60 = nullptr; + Surface_IDC = nullptr; + Surface_Species_Variance = nullptr; + Surface_Species_0 = nullptr; + + Outlet_MassFlow = nullptr; + Outlet_Density = nullptr; + Outlet_Area = nullptr; + + Surface_Uniformity = nullptr; + Surface_SecondaryStrength = nullptr; + Surface_SecondOverUniform = nullptr; Surface_MomentumDistortion = nullptr; - Surface_IDC_Mach = nullptr; Surface_IDR = nullptr; ActDisk_Mach = nullptr; - ActDisk_Force = nullptr; ActDisk_BCThrust = nullptr; ActDisk_BCThrust_Old = nullptr; + Surface_IDC_Mach = nullptr; + Surface_IDR = nullptr; + ActDisk_Mach = nullptr; + ActDisk_Force = nullptr; + ActDisk_BCThrust = nullptr; + ActDisk_BCThrust_Old = nullptr; /*--- Miscellaneous/unsorted ---*/ - Aeroelastic_plunge = nullptr; - Aeroelastic_pitch = nullptr; + Aeroelastic_plunge = nullptr; + Aeroelastic_pitch = nullptr; - CFL_AdaptParam = nullptr; - CFL = nullptr; - PlaneTag = nullptr; - ParamDV = nullptr; - DV_Value = nullptr; - Design_Variable = nullptr; + CFL_AdaptParam = nullptr; + CFL = nullptr; + PlaneTag = nullptr; + ParamDV = nullptr; + DV_Value = nullptr; + Design_Variable = nullptr; - TimeDOFsADER_DG = nullptr; - TimeIntegrationADER_DG = nullptr; + TimeDOFsADER_DG = nullptr; + TimeIntegrationADER_DG = nullptr; WeightsIntegrationADER_DG = nullptr; - RK_Alpha_Step = nullptr; - MG_CorrecSmooth = nullptr; - MG_PreSmooth = nullptr; - MG_PostSmooth = nullptr; - Int_Coeffs = nullptr; + RK_Alpha_Step = nullptr; + MG_CorrecSmooth = nullptr; + MG_PreSmooth = nullptr; + MG_PostSmooth = nullptr; + Int_Coeffs = nullptr; Kind_Inc_Inlet = nullptr; Kind_Inc_Outlet = nullptr; - Kind_ObjFunc = nullptr; + Kind_ObjFunc = nullptr; Weight_ObjFunc = nullptr; /*--- Species solver pointers. ---*/ - Species_Init = nullptr; - Species_Clipping_Min = nullptr; - Species_Clipping_Max = nullptr; + Species_Init = nullptr; + Species_Clipping_Min = nullptr; + Species_Clipping_Max = nullptr; /*--- Moving mesh pointers ---*/ nKind_SurfaceMovement = 0; Kind_SurfaceMovement = nullptr; - LocationStations = nullptr; - MarkerMotion_Origin = nullptr; - MarkerTranslation_Rate = nullptr; - MarkerRotation_Rate = nullptr; - MarkerPitching_Omega = nullptr; - MarkerPitching_Ampl = nullptr; - MarkerPitching_Phase = nullptr; - MarkerPlunging_Omega = nullptr; - MarkerPlunging_Ampl = nullptr; - RefOriginMoment_X = nullptr; RefOriginMoment_Y = nullptr; RefOriginMoment_Z = nullptr; - MoveMotion_Origin = nullptr; + LocationStations = nullptr; + MarkerMotion_Origin = nullptr; + MarkerTranslation_Rate = nullptr; + MarkerRotation_Rate = nullptr; + MarkerPitching_Omega = nullptr; + MarkerPitching_Ampl = nullptr; + MarkerPitching_Phase = nullptr; + MarkerPlunging_Omega = nullptr; + MarkerPlunging_Ampl = nullptr; + RefOriginMoment_X = nullptr; + RefOriginMoment_Y = nullptr; + RefOriginMoment_Z = nullptr; + MoveMotion_Origin = nullptr; /*--- Periodic BC pointers. ---*/ - Periodic_Translation= nullptr; Periodic_RotAngles = nullptr; Periodic_RotCenter = nullptr; + Periodic_Translation = nullptr; + Periodic_RotAngles = nullptr; + Periodic_RotCenter = nullptr; /* Harmonic Balance Frequency pointer */ @@ -998,35 +1104,35 @@ void CConfig::SetPointersNull() { /*--- Initialize some default arrays to NULL. ---*/ - Riemann_FlowDir = nullptr; - Giles_FlowDir = nullptr; - CoordFFDBox = nullptr; - DegreeFFDBox = nullptr; - FFDTag = nullptr; - nDV_Value = nullptr; - TagFFDBox = nullptr; - - Kind_Data_Riemann = nullptr; - Riemann_Var1 = nullptr; - Riemann_Var2 = nullptr; - Kind_Data_Giles = nullptr; - Giles_Var1 = nullptr; - Giles_Var2 = nullptr; - RelaxFactorAverage = nullptr; - RelaxFactorFourier = nullptr; - nSpan_iZones = nullptr; - Kind_TurboMachinery = nullptr; - - Marker_MixingPlaneInterface = nullptr; - Marker_TurboBoundIn = nullptr; - Marker_TurboBoundOut = nullptr; - Marker_Giles = nullptr; - Marker_Shroud = nullptr; - - nBlades = nullptr; - FreeStreamTurboNormal = nullptr; - - top_optim_kernels = nullptr; + Riemann_FlowDir = nullptr; + Giles_FlowDir = nullptr; + CoordFFDBox = nullptr; + DegreeFFDBox = nullptr; + FFDTag = nullptr; + nDV_Value = nullptr; + TagFFDBox = nullptr; + + Kind_Data_Riemann = nullptr; + Riemann_Var1 = nullptr; + Riemann_Var2 = nullptr; + Kind_Data_Giles = nullptr; + Giles_Var1 = nullptr; + Giles_Var2 = nullptr; + RelaxFactorAverage = nullptr; + RelaxFactorFourier = nullptr; + nSpan_iZones = nullptr; + Kind_TurboMachinery = nullptr; + + Marker_MixingPlaneInterface = nullptr; + Marker_TurboBoundIn = nullptr; + Marker_TurboBoundOut = nullptr; + Marker_Giles = nullptr; + Marker_Shroud = nullptr; + + nBlades = nullptr; + FreeStreamTurboNormal = nullptr; + + top_optim_kernels = nullptr; top_optim_kernel_params = nullptr; top_optim_filter_radius = nullptr; @@ -1039,10 +1145,10 @@ void CConfig::SetPointersNull() { /*--- Variable initialization ---*/ - TimeIter = 0; - InnerIter = 0; + TimeIter = 0; + InnerIter = 0; nIntCoeffs = 0; - OuterIter = 0; + OuterIter = 0; AoA_Offset = 0; AoS_Offset = 0; @@ -1065,11 +1171,9 @@ void CConfig::SetPointersNull() { Total_UnstTimeND = 0.0; Kind_TimeNumScheme = EULER_IMPLICIT; - } void CConfig::SetConfig_Options() { - // This config file is parsed by a number of programs to make it easy to write SU2 // wrapper scripts (in python, go, etc.) so please do // the best you can to follow the established format. It's very hard to parse c++ code @@ -1081,11 +1185,13 @@ void CConfig::SetConfig_Options() { /*!\par CONFIG_CATEGORY: Problem Definition \ingroup Config */ /*--- Options related to problem definition and partitioning ---*/ - /*!\brief SOLVER \n DESCRIPTION: Type of solver \n Options: see \link Solver_Map \endlink \n DEFAULT: NONE \ingroup Config*/ + /*!\brief SOLVER \n DESCRIPTION: Type of solver \n Options: see \link Solver_Map \endlink \n DEFAULT: NONE \ingroup + * Config*/ addEnumOption("SOLVER", Kind_Solver, Solver_Map, MAIN_SOLVER::NONE); /*!\brief MULTIZONE \n DESCRIPTION: Enable multizone mode \ingroup Config*/ addBoolOption("MULTIZONE", Multizone_Problem, NO); - /*!\brief PHYSICAL_PROBLEM \n DESCRIPTION: Physical governing equations \n Options: see \link Solver_Map \endlink \n DEFAULT: NONE \ingroup Config*/ + /*!\brief PHYSICAL_PROBLEM \n DESCRIPTION: Physical governing equations \n Options: see \link Solver_Map \endlink \n + * DEFAULT: NONE \ingroup Config*/ addEnumOption("MULTIZONE_SOLVER", Kind_MZSolver, Multizone_Map, ENUM_MULTIZONE::MZ_BLOCK_GAUSS_SEIDEL); #ifdef CODI_REVERSE_TYPE const bool discAdjDefault = true; @@ -1093,37 +1199,50 @@ void CConfig::SetConfig_Options() { const bool discAdjDefault = false; #endif /*!\brief MATH_PROBLEM \n DESCRIPTION: Mathematical problem \n Options: DIRECT, ADJOINT \ingroup Config*/ - addMathProblemOption("MATH_PROBLEM", ContinuousAdjoint, false, DiscreteAdjoint, discAdjDefault, Restart_Flow, discAdjDefault); - /*!\brief KIND_TURB_MODEL \n DESCRIPTION: Specify turbulence model \n Options: see \link Turb_Model_Map \endlink \n DEFAULT: NONE \ingroup Config*/ + addMathProblemOption("MATH_PROBLEM", ContinuousAdjoint, false, DiscreteAdjoint, discAdjDefault, Restart_Flow, + discAdjDefault); + /*!\brief KIND_TURB_MODEL \n DESCRIPTION: Specify turbulence model \n Options: see \link Turb_Model_Map \endlink \n + * DEFAULT: NONE \ingroup Config*/ addEnumOption("KIND_TURB_MODEL", Kind_Turb_Model, Turb_Model_Map, TURB_MODEL::NONE); - /*!\brief SST_OPTIONS \n DESCRIPTION: Specify SST turbulence model options/corrections. \n Options: see \link SST_Options_Map \endlink \n DEFAULT: NONE \ingroup Config*/ + /*!\brief SST_OPTIONS \n DESCRIPTION: Specify SST turbulence model options/corrections. \n Options: see \link + * SST_Options_Map \endlink \n DEFAULT: NONE \ingroup Config*/ addEnumListOption("SST_OPTIONS", nSST_Options, SST_Options, SST_Options_Map); - /*!\brief SST_OPTIONS \n DESCRIPTION: Specify SA turbulence model options/corrections. \n Options: see \link SA_Options_Map \endlink \n DEFAULT: NONE \ingroup Config*/ + /*!\brief SST_OPTIONS \n DESCRIPTION: Specify SA turbulence model options/corrections. \n Options: see \link + * SA_Options_Map \endlink \n DEFAULT: NONE \ingroup Config*/ addEnumListOption("SA_OPTIONS", nSA_Options, SA_Options, SA_Options_Map); - /*!\brief KIND_TRANS_MODEL \n DESCRIPTION: Specify transition model OPTIONS: see \link Trans_Model_Map \endlink \n DEFAULT: NONE \ingroup Config*/ + /*!\brief KIND_TRANS_MODEL \n DESCRIPTION: Specify transition model OPTIONS: see \link Trans_Model_Map \endlink \n + * DEFAULT: NONE \ingroup Config*/ addEnumOption("KIND_TRANS_MODEL", Kind_Trans_Model, Trans_Model_Map, TURB_TRANS_MODEL::NONE); - /*!\brief SST_OPTIONS \n DESCRIPTION: Specify LM transition model options/correlations. \n Options: see \link LM_Options_Map \endlink \n DEFAULT: NONE \ingroup Config*/ + /*!\brief SST_OPTIONS \n DESCRIPTION: Specify LM transition model options/correlations. \n Options: see \link + * LM_Options_Map \endlink \n DEFAULT: NONE \ingroup Config*/ addEnumListOption("LM_OPTIONS", nLM_Options, LM_Options, LM_Options_Map); /*!\brief HROUGHNESS \n DESCRIPTION: Value of RMS roughness for transition model \n DEFAULT: 1E-6 \ingroup Config*/ addDoubleOption("HROUGHNESS", hRoughness, 1e-6); - /*!\brief KIND_SCALAR_MODEL \n DESCRIPTION: Specify scalar transport model \n Options: see \link Scalar_Model_Map \endlink \n DEFAULT: NONE \ingroup Config*/ + /*!\brief KIND_SCALAR_MODEL \n DESCRIPTION: Specify scalar transport model \n Options: see \link Scalar_Model_Map + * \endlink \n DEFAULT: NONE \ingroup Config*/ addEnumOption("KIND_SCALAR_MODEL", Kind_Species_Model, Species_Model_Map, SPECIES_MODEL::NONE); - /*!\brief KIND_SGS_MODEL \n DESCRIPTION: Specify subgrid scale model OPTIONS: see \link SGS_Model_Map \endlink \n DEFAULT: NONE \ingroup Config*/ + /*!\brief KIND_SGS_MODEL \n DESCRIPTION: Specify subgrid scale model OPTIONS: see \link SGS_Model_Map \endlink \n + * DEFAULT: NONE \ingroup Config*/ addEnumOption("KIND_SGS_MODEL", Kind_SGS_Model, SGS_Model_Map, TURB_SGS_MODEL::NONE); - /*!\brief KIND_FEM_DG_SHOCK \n DESCRIPTION: Specify shock capturing method for DG OPTIONS: see \link ShockCapturingDG_Map \endlink \n DEFAULT: NONE \ingroup Config*/ + /*!\brief KIND_FEM_DG_SHOCK \n DESCRIPTION: Specify shock capturing method for DG OPTIONS: see \link + * ShockCapturingDG_Map \endlink \n DEFAULT: NONE \ingroup Config*/ addEnumOption("KIND_FEM_DG_SHOCK", Kind_FEM_Shock_Capturing_DG, ShockCapturingDG_Map, FEM_SHOCK_CAPTURING_DG::NONE); - /*!\brief KIND_VERIFICATION_SOLUTION \n DESCRIPTION: Specify the verification solution OPTIONS: see \link Verification_Solution_Map \endlink \n DEFAULT: NO_VERIFICATION_SOLUTION \ingroup Config*/ - addEnumOption("KIND_VERIFICATION_SOLUTION", Kind_Verification_Solution, Verification_Solution_Map, VERIFICATION_SOLUTION::NONE); + /*!\brief KIND_VERIFICATION_SOLUTION \n DESCRIPTION: Specify the verification solution OPTIONS: see \link + * Verification_Solution_Map \endlink \n DEFAULT: NO_VERIFICATION_SOLUTION \ingroup Config*/ + addEnumOption("KIND_VERIFICATION_SOLUTION", Kind_Verification_Solution, Verification_Solution_Map, + VERIFICATION_SOLUTION::NONE); - /*!\brief KIND_MATRIX_COLORING \n DESCRIPTION: Specify the method for matrix coloring for Jacobian computations OPTIONS: see \link MatrixColoring_Map \endlink \n DEFAULT GREEDY_COLORING \ingroup Config*/ + /*!\brief KIND_MATRIX_COLORING \n DESCRIPTION: Specify the method for matrix coloring for Jacobian computations + * OPTIONS: see \link MatrixColoring_Map \endlink \n DEFAULT GREEDY_COLORING \ingroup Config*/ addEnumOption("KIND_MATRIX_COLORING", Kind_Matrix_Coloring, MatrixColoring_Map, GREEDY_COLORING); - /*!\brief WEAKLY_COUPLED_HEAT_EQUATION \n DESCRIPTION: Enable heat equation for incompressible flows. \ingroup Config*/ + /*!\brief WEAKLY_COUPLED_HEAT_EQUATION \n DESCRIPTION: Enable heat equation for incompressible flows. \ingroup + * Config*/ addBoolOption("WEAKLY_COUPLED_HEAT_EQUATION", Weakly_Coupled_Heat, NO); /*\brief AXISYMMETRIC \n DESCRIPTION: Axisymmetric simulation \n DEFAULT: false \ingroup Config */ @@ -1134,46 +1253,61 @@ void CConfig::SetConfig_Options() { addBoolOption("VORTICITY_CONFINEMENT", VorticityConfinement, false); /* DESCRIPTION: Apply a body force as a source term (NO, YES) */ addBoolOption("BODY_FORCE", Body_Force, false); - body_force[0] = 0.0; body_force[1] = 0.0; body_force[2] = 0.0; + body_force[0] = 0.0; + body_force[1] = 0.0; + body_force[2] = 0.0; /* DESCRIPTION: Vector of body force values (BodyForce_X, BodyForce_Y, BodyForce_Z) */ addDoubleArrayOption("BODY_FORCE_VECTOR", 3, body_force); - /* DESCRIPTION: Apply a body force as a source term for periodic boundary conditions \n Options: NONE, PRESSURE_DROP, MASSFLOW \n DEFAULT: NONE \ingroup Config */ - addEnumOption("KIND_STREAMWISE_PERIODIC", Kind_Streamwise_Periodic, Streamwise_Periodic_Map, ENUM_STREAMWISE_PERIODIC::NONE); + /* DESCRIPTION: Apply a body force as a source term for periodic boundary conditions \n Options: NONE, PRESSURE_DROP, + * MASSFLOW \n DEFAULT: NONE \ingroup Config */ + addEnumOption("KIND_STREAMWISE_PERIODIC", Kind_Streamwise_Periodic, Streamwise_Periodic_Map, + ENUM_STREAMWISE_PERIODIC::NONE); /* DESCRIPTION: Use real periodicity for temperature \n Options: NO, YES \n DEFAULT: NO \ingroup Config */ addBoolOption("STREAMWISE_PERIODIC_TEMPERATURE", Streamwise_Periodic_Temperature, false); - /* DESCRIPTION: Heatflux boundary at streamwise periodic 'outlet', choose heat [W] such that net domain heatflux is zero. Only active if STREAMWISE_PERIODIC_TEMPERATURE is active. \n DEFAULT: 0.0 \ingroup Config */ + /* DESCRIPTION: Heatflux boundary at streamwise periodic 'outlet', choose heat [W] such that net domain heatflux is + * zero. Only active if STREAMWISE_PERIODIC_TEMPERATURE is active. \n DEFAULT: 0.0 \ingroup Config */ addDoubleOption("STREAMWISE_PERIODIC_OUTLET_HEAT", Streamwise_Periodic_OutletHeat, 0.0); - /* DESCRIPTION: Delta pressure [Pa] on which basis body force will be computed, serves as initial value if MASSFLOW is chosen. \n DEFAULT: 1.0 \ingroup Config */ + /* DESCRIPTION: Delta pressure [Pa] on which basis body force will be computed, serves as initial value if MASSFLOW is + * chosen. \n DEFAULT: 1.0 \ingroup Config */ addDoubleOption("STREAMWISE_PERIODIC_PRESSURE_DROP", Streamwise_Periodic_PressureDrop, 1.0); - /* DESCRIPTION: Target Massflow [kg/s], Delta P will be adapted until m_dot is met. \n DEFAULT: 0.0 \ingroup Config */ + /* DESCRIPTION: Target Massflow [kg/s], Delta P will be adapted until m_dot is met. \n DEFAULT: 0.0 \ingroup Config */ addDoubleOption("STREAMWISE_PERIODIC_MASSFLOW", Streamwise_Periodic_TargetMassFlow, 0.0); - /*!\brief RESTART_SOL \n DESCRIPTION: Restart solution from native solution file \n Options: NO, YES \ingroup Config */ + /*!\brief RESTART_SOL \n DESCRIPTION: Restart solution from native solution file \n Options: NO, YES \ingroup Config + */ addBoolOption("RESTART_SOL", Restart, false); /*!\brief BINARY_RESTART \n DESCRIPTION: Read binary SU2 native restart files. \n Options: YES, NO \ingroup Config */ addBoolOption("READ_BINARY_RESTART", Read_Binary_Restart, true); - /*!\brief WRT_RESTART_OVERWRITE \n DESCRIPTION: overwrite restart files or append iteration number. \n Options: YES, NO \ingroup Config */ + /*!\brief WRT_RESTART_OVERWRITE \n DESCRIPTION: overwrite restart files or append iteration number. \n Options: YES, + * NO \ingroup Config */ addBoolOption("WRT_RESTART_OVERWRITE", Wrt_Restart_Overwrite, true); - /*!\brief WRT_SURFACE_OVERWRITE \n DESCRIPTION: overwrite visualisation files or append iteration number. \n Options: YES, NO \ingroup Config */ + /*!\brief WRT_SURFACE_OVERWRITE \n DESCRIPTION: overwrite visualisation files or append iteration number. \n Options: + * YES, NO \ingroup Config */ addBoolOption("WRT_SURFACE_OVERWRITE", Wrt_Surface_Overwrite, true); - /*!\brief WRT_VOLUME_OVERWRITE \n DESCRIPTION: overwrite visualisation files or append iteration number. \n Options: YES, NO \ingroup Config */ + /*!\brief WRT_VOLUME_OVERWRITE \n DESCRIPTION: overwrite visualisation files or append iteration number. \n Options: + * YES, NO \ingroup Config */ addBoolOption("WRT_VOLUME_OVERWRITE", Wrt_Volume_Overwrite, true); - /*!\brief SYSTEM_MEASUREMENTS \n DESCRIPTION: System of measurements \n OPTIONS: see \link Measurements_Map \endlink \n DEFAULT: SI \ingroup Config*/ + /*!\brief SYSTEM_MEASUREMENTS \n DESCRIPTION: System of measurements \n OPTIONS: see \link Measurements_Map \endlink + * \n DEFAULT: SI \ingroup Config*/ addEnumOption("SYSTEM_MEASUREMENTS", SystemMeasurements, Measurements_Map, SI); /*!\par CONFIG_CATEGORY: FluidModel \ingroup Config*/ - /*!\brief FLUID_MODEL \n DESCRIPTION: Fluid model \n OPTIONS: See \link FluidModel_Map \endlink \n DEFAULT: STANDARD_AIR \ingroup Config*/ + /*!\brief FLUID_MODEL \n DESCRIPTION: Fluid model \n OPTIONS: See \link FluidModel_Map \endlink \n DEFAULT: + * STANDARD_AIR \ingroup Config*/ addEnumOption("FLUID_MODEL", Kind_FluidModel, FluidModel_Map, STANDARD_AIR); - /*!\brief FLUID_NAME \n DESCRIPTION: Fluid name \n OPTIONS: see coolprop homepage \n DEFAULT: nitrogen \ingroup Config*/ + /*!\brief FLUID_NAME \n DESCRIPTION: Fluid name \n OPTIONS: see coolprop homepage \n DEFAULT: nitrogen \ingroup + * Config*/ addStringOption("FLUID_NAME", FluidName, string("nitrogen")); /*!\par CONFIG_CATEGORY: Data-driven fluid model parameters \ingroup Config*/ - /*!\brief INTERPOLATION_METHOD \n DESCRIPTION: Interpolation method used to determine the thermodynamic state of the fluid. \n OPTIONS: See \link DataDrivenMethod_Map \endlink DEFAULT: MLP \ingroup Config*/ - addEnumOption("INTERPOLATION_METHOD",Kind_DataDriven_Method, DataDrivenMethod_Map, ENUM_DATADRIVEN_METHOD::LUT); + /*!\brief INTERPOLATION_METHOD \n DESCRIPTION: Interpolation method used to determine the thermodynamic state of the + * fluid. \n OPTIONS: See \link DataDrivenMethod_Map \endlink DEFAULT: MLP \ingroup Config*/ + addEnumOption("INTERPOLATION_METHOD", Kind_DataDriven_Method, DataDrivenMethod_Map, ENUM_DATADRIVEN_METHOD::LUT); /*!\brief FILENAME_INTERPOLATOR \n DESCRIPTION: Input file for the interpolation method. \n \ingroup Config*/ addStringListOption("FILENAMES_INTERPOLATOR", n_Datadriven_files, DataDriven_Method_FileNames); - /*!\brief DATADRIVEN_NEWTON_RELAXATION \n DESCRIPTION: Relaxation factor for Newton solvers in data-driven fluid model. \n \ingroup Config*/ + /*!\brief DATADRIVEN_NEWTON_RELAXATION \n DESCRIPTION: Relaxation factor for Newton solvers in data-driven fluid + * model. \n \ingroup Config*/ addDoubleOption("DATADRIVEN_NEWTON_RELAXATION", DataDriven_Relaxation_Factor, 0.05); /*!\brief CONFINEMENT_PARAM \n DESCRIPTION: Input Confinement Parameter for Vorticity Confinement*/ @@ -1182,17 +1316,23 @@ void CConfig::SetConfig_Options() { /*!\par CONFIG_CATEGORY: Freestream Conditions \ingroup Config*/ /*--- Options related to freestream specification ---*/ - /*!\brief GAS_CONSTANT \n DESCRIPTION: Specific gas constant (287.058 J/kg*K (air), only for compressible flows) \ingroup Config*/ + /*!\brief GAS_CONSTANT \n DESCRIPTION: Specific gas constant (287.058 J/kg*K (air), only for compressible flows) + * \ingroup Config*/ addDoubleOption("GAS_CONSTANT", Gas_Constant, 287.058); - /*!\brief GAMMA_VALUE \n DESCRIPTION: Ratio of specific heats (1.4 (air), only for compressible flows) \ingroup Config*/ + /*!\brief GAMMA_VALUE \n DESCRIPTION: Ratio of specific heats (1.4 (air), only for compressible flows) \ingroup + * Config*/ addDoubleOption("GAMMA_VALUE", Gamma, 1.4); - /*!\brief THERMODYNAMIC_PRESSURE \n DESCRIPTION: Thermodynamics(operating) Pressure (101325 Pa), only for incompressible flows) \ingroup Config*/ + /*!\brief THERMODYNAMIC_PRESSURE \n DESCRIPTION: Thermodynamics(operating) Pressure (101325 Pa), only for + * incompressible flows) \ingroup Config*/ addDoubleOption("THERMODYNAMIC_PRESSURE", Pressure_Thermodynamic, 101325.0); - /*!\brief CP_VALUE \n DESCRIPTION: Specific heat at constant pressure, Cp (1004.703 J/kg*K (air), constant density incompressible fluids only) \ingroup Config*/ + /*!\brief CP_VALUE \n DESCRIPTION: Specific heat at constant pressure, Cp (1004.703 J/kg*K (air), constant density + * incompressible fluids only) \ingroup Config*/ addDoubleListOption("SPECIFIC_HEAT_CP", nSpecific_Heat_Cp, Specific_Heat_Cp); - /*!\brief THERMAL_EXPANSION_COEFF \n DESCRIPTION: Thermal expansion coefficient (0.00347 K^-1 (air), used for Boussinesq approximation for liquids/non-ideal gases) \ingroup Config*/ + /*!\brief THERMAL_EXPANSION_COEFF \n DESCRIPTION: Thermal expansion coefficient (0.00347 K^-1 (air), used for + * Boussinesq approximation for liquids/non-ideal gases) \ingroup Config*/ addDoubleOption("THERMAL_EXPANSION_COEFF", Thermal_Expansion_Coeff, 0.00347); - /*!\brief MOLECULAR_WEIGHT \n DESCRIPTION: Molecular weight for an incompressible ideal gas (28.96 g/mol (air) default) \ingroup Config*/ + /*!\brief MOLECULAR_WEIGHT \n DESCRIPTION: Molecular weight for an incompressible ideal gas (28.96 g/mol (air) + * default) \ingroup Config*/ addDoubleListOption("MOLECULAR_WEIGHT", nMolecular_Weight, Molecular_Weight); ///* DESCRIPTION: Specify if Mutation++ library is used */ @@ -1205,7 +1345,8 @@ void CConfig::SetConfig_Options() { addDoubleListOption("GAS_COMPOSITION", nSpecies, Gas_Composition); /* DESCRIPTION: Specify mass fraction of each species for NEMO inlet*/ addDoubleListOption("INLET_GAS_COMPOSITION", nSpecies_inlet, Inlet_MassFrac); - /*!\brief INLET_TEMPERATURE_VE \n DESCRIPTION: NEMO inlet temperature_ve (K), if left 0 K, set to Ttr value \ingroup Config*/ + /*!\brief INLET_TEMPERATURE_VE \n DESCRIPTION: NEMO inlet temperature_ve (K), if left 0 K, set to Ttr value \ingroup + * Config*/ addDoubleOption("INLET_TEMPERATURE_VE", Inlet_Temperature_ve, 0.0); /* DESCRIPTION: Specify if mixture is frozen */ addBoolOption("FROZEN_MIXTURE", frozen, false); @@ -1221,7 +1362,8 @@ void CConfig::SetConfig_Options() { addDoubleListOption("SUPERCATALYTIC_WALL_COMPOSITION", nSpecies_Cat_Wall, Supercatalytic_Wall_Composition); /* DESCRIPTION: Specfify catalytic efficiency of wall if using gamma model */ addDoubleOption("CATALYTIC_EFFICIENCY", CatalyticEfficiency, 1.0); - /*!\brief MARKER_MONITORING\n DESCRIPTION: Marker(s) of the surface where evaluate the non-dimensional coefficients \ingroup Config*/ + /*!\brief MARKER_MONITORING\n DESCRIPTION: Marker(s) of the surface where evaluate the non-dimensional coefficients + * \ingroup Config*/ /*--- Options related to VAN der WAALS MODEL and PENG ROBINSON ---*/ @@ -1234,10 +1376,11 @@ void CConfig::SetConfig_Options() { /*--- Options related to VAN der WAALS MODEL and PENG ROBINSON ---*/ /* DESCRIPTION: Critical Density, default value for MDM */ - addDoubleOption("ACENTRIC_FACTOR", Acentric_Factor, 0.035); + addDoubleOption("ACENTRIC_FACTOR", Acentric_Factor, 0.035); - /*--- Options related to Viscosity Model ---*/ - /*!\brief VISCOSITY_MODEL \n DESCRIPTION: model of the viscosity \n OPTIONS: See \link ViscosityModel_Map \endlink \n DEFAULT: SUTHERLAND \ingroup Config*/ + /*--- Options related to Viscosity Model ---*/ + /*!\brief VISCOSITY_MODEL \n DESCRIPTION: model of the viscosity \n OPTIONS: See \link ViscosityModel_Map \endlink \n + * DEFAULT: SUTHERLAND \ingroup Config*/ addEnumOption("VISCOSITY_MODEL", Kind_ViscosityModel, ViscosityModel_Map, VISCOSITYMODEL::SUTHERLAND); /*--- Options related to Constant Viscosity Model ---*/ @@ -1255,20 +1398,24 @@ void CConfig::SetConfig_Options() { addDoubleListOption("SUTHERLAND_CONSTANT", nMu_S, Mu_S); /*--- Options related to Viscosity Model ---*/ - /*!\brief MIXINGVISCOSITY_MODEL \n DESCRIPTION: Mixing model of the viscosity \n OPTIONS: See \link ViscosityModel_Map \endlink \n DEFAULT: DAVIDSON \ingroup Config*/ - addEnumOption("MIXING_VISCOSITY_MODEL", Kind_MixingViscosityModel, MixingViscosityModel_Map, MIXINGVISCOSITYMODEL::DAVIDSON); + /*!\brief MIXINGVISCOSITY_MODEL \n DESCRIPTION: Mixing model of the viscosity \n OPTIONS: See \link ViscosityModel_Map + * \endlink \n DEFAULT: DAVIDSON \ingroup Config*/ + addEnumOption("MIXING_VISCOSITY_MODEL", Kind_MixingViscosityModel, MixingViscosityModel_Map, + MIXINGVISCOSITYMODEL::DAVIDSON); /*--- Options related to Thermal Conductivity Model ---*/ - addEnumOption("CONDUCTIVITY_MODEL", Kind_ConductivityModel, ConductivityModel_Map, CONDUCTIVITYMODEL::CONSTANT_PRANDTL); + addEnumOption("CONDUCTIVITY_MODEL", Kind_ConductivityModel, ConductivityModel_Map, + CONDUCTIVITYMODEL::CONSTANT_PRANDTL); /* DESCRIPTION: Definition of the turbulent thermal conductivity model (CONSTANT_PRANDTL_TURB (default), NONE). */ - addEnumOption("TURBULENT_CONDUCTIVITY_MODEL", Kind_ConductivityModel_Turb, TurbConductivityModel_Map, CONDUCTIVITYMODEL_TURB::CONSTANT_PRANDTL); + addEnumOption("TURBULENT_CONDUCTIVITY_MODEL", Kind_ConductivityModel_Turb, TurbConductivityModel_Map, + CONDUCTIVITYMODEL_TURB::CONSTANT_PRANDTL); - /*--- Options related to Constant Thermal Conductivity Model ---*/ + /*--- Options related to Constant Thermal Conductivity Model ---*/ - /* DESCRIPTION: default value for AIR */ - addDoubleListOption("THERMAL_CONDUCTIVITY_CONSTANT", nThermal_Conductivity_Constant , Thermal_Conductivity_Constant); + /* DESCRIPTION: default value for AIR */ + addDoubleListOption("THERMAL_CONDUCTIVITY_CONSTANT", nThermal_Conductivity_Constant, Thermal_Conductivity_Constant); /*--- Options related to temperature polynomial coefficients for fluid models. ---*/ @@ -1279,24 +1426,31 @@ void CConfig::SetConfig_Options() { /* DESCRIPTION: Definition of the temperature polynomial coefficients for specific heat Cp. */ addDoubleArrayOption("KT_POLYCOEFFS", N_POLY_COEFFS, kt_polycoeffs.data()); - /*!\brief REYNOLDS_NUMBER \n DESCRIPTION: Reynolds number (non-dimensional, based on the free-stream values). Needed for viscous solvers. For incompressible solvers the Reynolds length will always be 1.0 \n DEFAULT: 0.0 \ingroup Config */ + /*!\brief REYNOLDS_NUMBER \n DESCRIPTION: Reynolds number (non-dimensional, based on the free-stream values). Needed + * for viscous solvers. For incompressible solvers the Reynolds length will always be 1.0 \n DEFAULT: 0.0 \ingroup + * Config */ addDoubleOption("REYNOLDS_NUMBER", Reynolds, 0.0); - /*!\brief REYNOLDS_LENGTH \n DESCRIPTION: Reynolds length (1 m by default). Used for compressible solver: incompressible solver will use 1.0. \ingroup Config */ + /*!\brief REYNOLDS_LENGTH \n DESCRIPTION: Reynolds length (1 m by default). Used for compressible solver: + * incompressible solver will use 1.0. \ingroup Config */ addDoubleOption("REYNOLDS_LENGTH", Length_Reynolds, 1.0); - /*!\brief PRANDTL_LAM \n DESCRIPTION: Laminar Prandtl number (0.72 (air), only for compressible flows) \n DEFAULT: 0.72 \ingroup Config*/ - addDoubleListOption("PRANDTL_LAM", nPrandtl_Lam , Prandtl_Lam); - /*!\brief PRANDTL_TURB \n DESCRIPTION: Turbulent Prandtl number (0.9 (air), only for compressible flows) \n DEFAULT 0.90 \ingroup Config*/ - addDoubleListOption("PRANDTL_TURB", nPrandtl_Turb , Prandtl_Turb); + /*!\brief PRANDTL_LAM \n DESCRIPTION: Laminar Prandtl number (0.72 (air), only for compressible flows) \n DEFAULT: + * 0.72 \ingroup Config*/ + addDoubleListOption("PRANDTL_LAM", nPrandtl_Lam, Prandtl_Lam); + /*!\brief PRANDTL_TURB \n DESCRIPTION: Turbulent Prandtl number (0.9 (air), only for compressible flows) \n DEFAULT + * 0.90 \ingroup Config*/ + addDoubleListOption("PRANDTL_TURB", nPrandtl_Turb, Prandtl_Turb); /*--- Options related to wall models. ---*/ - /*!\brief WALLMODEL_KAPPA \n DESCRIPTION: von Karman constant used for the wall model \n DEFAULT 0.41 \ingroup Config*/ + /*!\brief WALLMODEL_KAPPA \n DESCRIPTION: von Karman constant used for the wall model \n DEFAULT 0.41 \ingroup + * Config*/ addDoubleOption("WALLMODEL_KAPPA", wallModel_Kappa, 0.41); /*!\brief WALLMODEL_MAXITER \n DESCRIPTION: Max iterations used for the wall model \n DEFAULT 200 \ingroup Config*/ addUnsignedShortOption("WALLMODEL_MAXITER", wallModel_MaxIter, 200); /*!\brief WALLMODEL_RELFAC \n DESCRIPTION: Relaxation factor used for the wall model \n DEFAULT 0.5 \ingroup Config*/ addDoubleOption("WALLMODEL_RELFAC", wallModel_RelFac, 0.5); - /*!\brief WALLMODEL_MINYPLUS \n DESCRIPTION: lower limit for Y+ used for the wall model \n DEFAULT 5.0 \ingroup Config*/ + /*!\brief WALLMODEL_MINYPLUS \n DESCRIPTION: lower limit for Y+ used for the wall model \n DEFAULT 5.0 \ingroup + * Config*/ addDoubleOption("WALLMODEL_MINYPLUS", wallModel_MinYplus, 5.0); /*!\brief WALLMODEL_B \n DESCRIPTION: constant B used for the wall model \n DEFAULT 5.5 \ingroup Config*/ addDoubleOption("WALLMODEL_B", wallModel_B, 5.5); @@ -1305,55 +1459,70 @@ void CConfig::SetConfig_Options() { addDoubleOption("BULK_MODULUS", Bulk_Modulus, 1.42E5); /* DESCRIPTION: Epsilon^2 multipier in Beta calculation for incompressible preconditioner. */ addDoubleOption("BETA_FACTOR", Beta_Factor, 4.1); - /*!\brief MACH_NUMBER \n DESCRIPTION: Mach number (non-dimensional, based on the free-stream values). 0.0 by default \ingroup Config*/ + /*!\brief MACH_NUMBER \n DESCRIPTION: Mach number (non-dimensional, based on the free-stream values). 0.0 by default + * \ingroup Config*/ addDoubleOption("MACH_NUMBER", Mach, 0.0); - /*!\brief INIT_OPTION \n DESCRIPTION: Init option to choose between Reynolds or thermodynamics quantities for initializing the solution \n OPTIONS: see \link InitOption_Map \endlink \n DEFAULT REYNOLDS \ingroup Config*/ + /*!\brief INIT_OPTION \n DESCRIPTION: Init option to choose between Reynolds or thermodynamics quantities for + * initializing the solution \n OPTIONS: see \link InitOption_Map \endlink \n DEFAULT REYNOLDS \ingroup Config*/ addEnumOption("INIT_OPTION", Kind_InitOption, InitOption_Map, REYNOLDS); /* DESCRIPTION: Free-stream option to choose between density and temperature for initializing the solution */ addEnumOption("FREESTREAM_OPTION", Kind_FreeStreamOption, FreeStreamOption_Map, FREESTREAM_OPTION::TEMPERATURE_FS); /*!\brief FREESTREAM_PRESSURE\n DESCRIPTION: Free-stream pressure (101325.0 N/m^2 by default) \ingroup Config*/ addDoubleOption("FREESTREAM_PRESSURE", Pressure_FreeStream, 101325.0); - /*!\brief FREESTREAM_DENSITY\n DESCRIPTION: Free-stream density (1.2886 Kg/m^3 (air), 998.2 Kg/m^3 (water)) \n DEFAULT -1.0 (calculated from others) \ingroup Config*/ + /*!\brief FREESTREAM_DENSITY\n DESCRIPTION: Free-stream density (1.2886 Kg/m^3 (air), 998.2 Kg/m^3 (water)) \n DEFAULT + * -1.0 (calculated from others) \ingroup Config*/ addDoubleOption("FREESTREAM_DENSITY", Density_FreeStream, -1.0); /*!\brief FREESTREAM_TEMPERATURE\n DESCRIPTION: Free-stream temperature (288.15 K by default) \ingroup Config*/ addDoubleOption("FREESTREAM_TEMPERATURE", Temperature_FreeStream, 288.15); - /*!\brief FREESTREAM_TEMPERATURE_VE\n DESCRIPTION: Free-stream vibrational-electronic temperature (288.15 K by default) \ingroup Config*/ + /*!\brief FREESTREAM_TEMPERATURE_VE\n DESCRIPTION: Free-stream vibrational-electronic temperature (288.15 K by + * default) \ingroup Config*/ addDoubleOption("FREESTREAM_TEMPERATURE_VE", Temperature_ve_FreeStream, 288.15); - /*--- Options related to incompressible flow solver ---*/ /* DESCRIPTION: Option to choose the density model used in the incompressible flow solver. */ addEnumOption("INC_DENSITY_MODEL", Kind_DensityModel, DensityModel_Map, INC_DENSITYMODEL::CONSTANT); - /*!\brief ENERGY_EQUATION \n DESCRIPTION: Solve the energy equation in the incompressible flow solver. \ingroup Config*/ + /*!\brief ENERGY_EQUATION \n DESCRIPTION: Solve the energy equation in the incompressible flow solver. \ingroup + * Config*/ addBoolOption("INC_ENERGY_EQUATION", Energy_Equation, false); /*!\brief INC_DENSITY_REF \n DESCRIPTION: Reference density for incompressible flows \ingroup Config*/ addDoubleOption("INC_DENSITY_REF", Inc_Density_Ref, 1.0); - /*!\brief INC_VELOCITY_REF \n DESCRIPTION: Reference velocity for incompressible flows (1.0 by default) \ingroup Config*/ + /*!\brief INC_VELOCITY_REF \n DESCRIPTION: Reference velocity for incompressible flows (1.0 by default) \ingroup + * Config*/ addDoubleOption("INC_VELOCITY_REF", Inc_Velocity_Ref, 1.0); - /*!\brief INC_TEMPERATURE_REF \n DESCRIPTION: Reference temperature for incompressible flows with the energy equation (1.0 by default) \ingroup Config*/ + /*!\brief INC_TEMPERATURE_REF \n DESCRIPTION: Reference temperature for incompressible flows with the energy equation + * (1.0 by default) \ingroup Config*/ addDoubleOption("INC_TEMPERATURE_REF", Inc_Temperature_Ref, 1.0); - /*!\brief INC_DENSITY_INIT \n DESCRIPTION: Initial density for incompressible flows (1.2886 kg/m^3 by default) \ingroup Config*/ + /*!\brief INC_DENSITY_INIT \n DESCRIPTION: Initial density for incompressible flows (1.2886 kg/m^3 by default) + * \ingroup Config*/ addDoubleOption("INC_DENSITY_INIT", Inc_Density_Init, 1.2886); - /*!\brief INC_VELOCITY_INIT \n DESCRIPTION: Initial velocity for incompressible flows (1.0,0,0 m/s by default) \ingroup Config*/ - vel_init[0] = 1.0; vel_init[1] = 0.0; vel_init[2] = 0.0; + /*!\brief INC_VELOCITY_INIT \n DESCRIPTION: Initial velocity for incompressible flows (1.0,0,0 m/s by default) + * \ingroup Config*/ + vel_init[0] = 1.0; + vel_init[1] = 0.0; + vel_init[2] = 0.0; addDoubleArrayOption("INC_VELOCITY_INIT", 3, vel_init); - /*!\brief INC_TEMPERATURE_INIT \n DESCRIPTION: Initial temperature for incompressible flows with the energy equation (288.15 K by default) \ingroup Config*/ + /*!\brief INC_TEMPERATURE_INIT \n DESCRIPTION: Initial temperature for incompressible flows with the energy equation + * (288.15 K by default) \ingroup Config*/ addDoubleOption("INC_TEMPERATURE_INIT", Inc_Temperature_Init, 288.15); /*!\brief INC_NONDIM \n DESCRIPTION: Non-dimensionalization scheme for incompressible flows. \ingroup Config*/ addEnumOption("INC_NONDIM", Ref_Inc_NonDim, NonDim_Map, INITIAL_VALUES); - /*!\brief INC_INLET_USENORMAL \n DESCRIPTION: Use the local boundary normal for the flow direction with the incompressible pressure inlet. \ingroup Config*/ + /*!\brief INC_INLET_USENORMAL \n DESCRIPTION: Use the local boundary normal for the flow direction with the + * incompressible pressure inlet. \ingroup Config*/ addBoolOption("INC_INLET_USENORMAL", Inc_Inlet_UseNormal, false); - /*!\brief INC_INLET_DAMPING \n DESCRIPTION: Damping factor applied to the iterative updates to the velocity at a pressure inlet in incompressible flow (0.1 by default). \ingroup Config*/ + /*!\brief INC_INLET_DAMPING \n DESCRIPTION: Damping factor applied to the iterative updates to the velocity at a + * pressure inlet in incompressible flow (0.1 by default). \ingroup Config*/ addDoubleOption("INC_INLET_DAMPING", Inc_Inlet_Damping, 0.1); - /*!\brief INC_OUTLET_DAMPING \n DESCRIPTION: Damping factor applied to the iterative updates to the pressure at a mass flow outlet in incompressible flow (0.1 by default). \ingroup Config*/ + /*!\brief INC_OUTLET_DAMPING \n DESCRIPTION: Damping factor applied to the iterative updates to the pressure at a mass + * flow outlet in incompressible flow (0.1 by default). \ingroup Config*/ addDoubleOption("INC_OUTLET_DAMPING", Inc_Outlet_Damping, 0.1); /*--- Options related to the species solver. ---*/ /*!\brief SPECIES_INIT \n DESCRIPTION: Initial values for scalar transport \ingroup Config*/ addDoubleListOption("SPECIES_INIT", nSpecies_Init, Species_Init); - /*!\brief SPECIES_CLIPPING \n DESCRIPTION: Activate clipping for scalar transport equations \n DEFAULT: false \ingroup Config*/ + /*!\brief SPECIES_CLIPPING \n DESCRIPTION: Activate clipping for scalar transport equations \n DEFAULT: false \ingroup + * Config*/ addBoolOption("SPECIES_CLIPPING", Species_Clipping, false); /*!\brief SPECIES_CLIPPING_MAX \n DESCRIPTION: Maximum values for scalar clipping \ingroup Config*/ addDoubleListOption("SPECIES_CLIPPING_MAX", nSpecies_Clipping_Max, Species_Clipping_Max); @@ -1362,27 +1531,38 @@ void CConfig::SetConfig_Options() { /*!\brief FLAME_INIT \n DESCRIPTION: flame initialization using the flamelet model \ingroup Config*/ /*--- flame offset (x,y,z) ---*/ - flame_init[0] = 0.0; flame_init[1] = 0.0; flame_init[2] = 0.0; + flame_init[0] = 0.0; + flame_init[1] = 0.0; + flame_init[2] = 0.0; /*--- flame normal (nx, ny, nz) ---*/ - flame_init[3] = 1.0; flame_init[4] = 0.0; flame_init[5] = 0.0; + flame_init[3] = 1.0; + flame_init[4] = 0.0; + flame_init[5] = 0.0; /*--- flame thickness (x) and flame burnt thickness (after this thickness, we have unburnt conditions again) ---*/ - flame_init[6] = 0.5e-3; flame_init[7] = 1.0; - addDoubleArrayOption("FLAME_INIT", 8,flame_init); + flame_init[6] = 0.5e-3; + flame_init[7] = 1.0; + addDoubleArrayOption("FLAME_INIT", 8, flame_init); /*--- Options related to mass diffusivity and thereby the species solver. ---*/ /*!\brief DIFFUSIVITY_MODEL\n DESCRIPTION: mass diffusivity model \n DEFAULT constant disffusivity \ingroup Config*/ - addEnumOption("DIFFUSIVITY_MODEL", Kind_Diffusivity_Model, Diffusivity_Model_Map, DIFFUSIVITYMODEL::CONSTANT_DIFFUSIVITY); - /*!\brief DIFFUSIVITY_CONSTANT\n DESCRIPTION: mass diffusivity if DIFFUSIVITYMODEL::CONSTANT_DIFFUSIVITY is chosen \n DEFAULT 0.001 (Air) \ingroup Config*/ - addDoubleOption("DIFFUSIVITY_CONSTANT", Diffusivity_Constant , 0.001); - /*!\brief SCHMIDT_LAM \n DESCRIPTION: Laminar Schmidt number of mass diffusion \n DEFAULT 1.0 (~for Gases) \ingroup Config*/ + addEnumOption("DIFFUSIVITY_MODEL", Kind_Diffusivity_Model, Diffusivity_Model_Map, + DIFFUSIVITYMODEL::CONSTANT_DIFFUSIVITY); + /*!\brief DIFFUSIVITY_CONSTANT\n DESCRIPTION: mass diffusivity if DIFFUSIVITYMODEL::CONSTANT_DIFFUSIVITY is chosen \n + * DEFAULT 0.001 (Air) \ingroup Config*/ + addDoubleOption("DIFFUSIVITY_CONSTANT", Diffusivity_Constant, 0.001); + /*!\brief SCHMIDT_LAM \n DESCRIPTION: Laminar Schmidt number of mass diffusion \n DEFAULT 1.0 (~for Gases) \ingroup + * Config*/ addDoubleOption("SCHMIDT_NUMBER_LAMINAR", Schmidt_Number_Laminar, 1.0); - /*!\brief SCHMIDT_TURB \n DESCRIPTION: Turbulent Schmidt number of mass diffusion \n DEFAULT 0.70 (more or less experimental value) \ingroup Config*/ + /*!\brief SCHMIDT_TURB \n DESCRIPTION: Turbulent Schmidt number of mass diffusion \n DEFAULT 0.70 (more or less + * experimental value) \ingroup Config*/ addDoubleOption("SCHMIDT_NUMBER_TURBULENT", Schmidt_Number_Turbulent, 0.7); /*!\brief DESCRIPTION: Constant Lewis number for mass diffusion */ addDoubleListOption("CONSTANT_LEWIS_NUMBER", nConstant_Lewis_Number, Constant_Lewis_Number); - vel_inf[0] = 1.0; vel_inf[1] = 0.0; vel_inf[2] = 0.0; + vel_inf[0] = 1.0; + vel_inf[1] = 0.0; + vel_inf[2] = 0.0; /*!\brief FREESTREAM_VELOCITY\n DESCRIPTION: Free-stream velocity (m/s) */ addDoubleArrayOption("FREESTREAM_VELOCITY", 3, vel_inf); /* DESCRIPTION: Free-stream viscosity (1.853E-5 Ns/m^2 (air), 0.798E-3 Ns/m^2 (water)) */ @@ -1428,11 +1608,10 @@ void CConfig::SetConfig_Options() { /* DESCRIPTION: Number of times Alpha is updated in a fix CL problem. */ addUnsignedLongOption("UPDATE_BCTHRUST", Update_BCThrust, 5); - /*!\par CONFIG_CATEGORY: Reference Conditions \ingroup Config*/ /*--- Options related to reference values for nondimensionalization ---*/ - Length_Ref = 1.0; //<---- NOTE: this should be given an option or set as a const + Length_Ref = 1.0; //<---- NOTE: this should be given an option or set as a const /*!\brief REF_ORIGIN_MOMENT_X\n DESCRIPTION: X Reference origin for moment computation \ingroup Config*/ addDoubleListOption("REF_ORIGIN_MOMENT_X", nRefOriginMoment_X, RefOriginMoment_X); @@ -1440,11 +1619,13 @@ void CConfig::SetConfig_Options() { addDoubleListOption("REF_ORIGIN_MOMENT_Y", nRefOriginMoment_Y, RefOriginMoment_Y); /*!\brief REF_ORIGIN_MOMENT_Z\n DESCRIPTION: Z Reference origin for moment computation \ingroup Config*/ addDoubleListOption("REF_ORIGIN_MOMENT_Z", nRefOriginMoment_Z, RefOriginMoment_Z); - /*!\brief REF_AREA\n DESCRIPTION: Reference area for force coefficients (0 implies automatic calculation) \ingroup Config*/ + /*!\brief REF_AREA\n DESCRIPTION: Reference area for force coefficients (0 implies automatic calculation) \ingroup + * Config*/ addDoubleOption("REF_AREA", RefArea, 1.0); /*!\brief SEMI_SPAN\n DESCRIPTION: Wing semi-span (0 implies automatic calculation) \ingroup Config*/ addDoubleOption("SEMI_SPAN", SemiSpan, 0.0); - /*!\brief REF_LENGTH\n DESCRIPTION: Reference length for pitching, rolling, and yawing non-dimensional moment \ingroup Config*/ + /*!\brief REF_LENGTH\n DESCRIPTION: Reference length for pitching, rolling, and yawing non-dimensional moment \ingroup + * Config*/ addDoubleOption("REF_LENGTH", RefLength, 1.0); /*!\brief REF_SHARP_EDGES\n DESCRIPTION: Reference coefficient for detecting sharp edges \ingroup Config*/ addDoubleOption("REF_SHARP_EDGES", RefSharpEdges, 3.0); @@ -1459,18 +1640,22 @@ void CConfig::SetConfig_Options() { /*--- Options related to various boundary markers ---*/ /*!\brief HTP_AXIS\n DESCRIPTION: Location of the HTP axis*/ - //htp_axis[0] = 0.0; htp_axis[1] = 0.0; - //addDoubleArrayOption("HTP_AXIS", 2, htp_axis); + // htp_axis[0] = 0.0; htp_axis[1] = 0.0; + // addDoubleArrayOption("HTP_AXIS", 2, htp_axis); /*!\brief MARKER_PLOTTING\n DESCRIPTION: Marker(s) of the surface in the surface flow solution file \ingroup Config*/ addStringListOption("MARKER_PLOTTING", nMarker_Plotting, Marker_Plotting); - /*!\brief MARKER_MONITORING\n DESCRIPTION: Marker(s) of the surface where evaluate the non-dimensional coefficients \ingroup Config*/ + /*!\brief MARKER_MONITORING\n DESCRIPTION: Marker(s) of the surface where evaluate the non-dimensional coefficients + * \ingroup Config*/ addStringListOption("MARKER_MONITORING", nMarker_Monitoring, Marker_Monitoring); - /*!\brief MARKER_CONTROL_VOLUME\n DESCRIPTION: Marker(s) of the surface in the surface flow solution file \ingroup Config*/ + /*!\brief MARKER_CONTROL_VOLUME\n DESCRIPTION: Marker(s) of the surface in the surface flow solution file \ingroup + * Config*/ addStringListOption("MARKER_ANALYZE", nMarker_Analyze, Marker_Analyze); - /*!\brief MARKER_DESIGNING\n DESCRIPTION: Marker(s) of the surface where objective function (design problem) will be evaluated \ingroup Config*/ + /*!\brief MARKER_DESIGNING\n DESCRIPTION: Marker(s) of the surface where objective function (design problem) will be + * evaluated \ingroup Config*/ addStringListOption("MARKER_DESIGNING", nMarker_Designing, Marker_Designing); - /*!\brief GEO_MARKER\n DESCRIPTION: Marker(s) of the surface where evaluate the geometrical functions \ingroup Config*/ + /*!\brief GEO_MARKER\n DESCRIPTION: Marker(s) of the surface where evaluate the geometrical functions \ingroup + * Config*/ addStringListOption("GEO_MARKER", nMarker_GeoEval, Marker_GeoEval); /*!\brief MARKER_EULER\n DESCRIPTION: Euler wall boundary marker(s) \ingroup Config*/ addStringListOption("MARKER_EULER", nMarker_Euler, Marker_Euler); @@ -1500,37 +1685,41 @@ void CConfig::SetConfig_Options() { Format: ( periodic marker, donor marker, rotation_center_x, rotation_center_y, rotation_center_z, rotation_angle_x-axis, rotation_angle_y-axis, rotation_angle_z-axis, translation_x, translation_y, translation_z, ... ) */ - addPeriodicOption("MARKER_PERIODIC", nMarker_PerBound, Marker_PerBound, Marker_PerDonor, - Periodic_RotCenter, Periodic_RotAngles, Periodic_Translation); + addPeriodicOption("MARKER_PERIODIC", nMarker_PerBound, Marker_PerBound, Marker_PerDonor, Periodic_RotCenter, + Periodic_RotAngles, Periodic_Translation); /*!\brief MARKER_PYTHON_CUSTOM\n DESCRIPTION: Python customizable marker(s) \ingroup Config*/ addStringListOption("MARKER_PYTHON_CUSTOM", nMarker_PyCustom, Marker_PyCustom); /*!\brief MARKER_WALL_FUNCTIONS\n DESCRIPTION: Viscous wall markers for which wall functions must be applied. Format: (Wall function marker, wall function type, ...) \ingroup Config*/ - addWallFunctionOption("MARKER_WALL_FUNCTIONS", nMarker_WallFunctions, Marker_WallFunctions, - Kind_WallFunctions, IntInfo_WallFunctions, DoubleInfo_WallFunctions); + addWallFunctionOption("MARKER_WALL_FUNCTIONS", nMarker_WallFunctions, Marker_WallFunctions, Kind_WallFunctions, + IntInfo_WallFunctions, DoubleInfo_WallFunctions); /*!\brief MARKER_STRONG_BC\n DESCRIPTION: Markers where a strong BC must be applied.*/ addStringListOption("MARKER_SPECIES_STRONG_BC", nMarker_StrongBC, Marker_StrongBC); - /*!\brief ACTDISK_TYPE \n DESCRIPTION: Actuator Disk boundary type \n OPTIONS: see \link ActDisk_Map \endlink \n Default: VARIABLES_JUMP \ingroup Config*/ + /*!\brief ACTDISK_TYPE \n DESCRIPTION: Actuator Disk boundary type \n OPTIONS: see \link ActDisk_Map \endlink \n + * Default: VARIABLES_JUMP \ingroup Config*/ addEnumOption("ACTDISK_TYPE", Kind_ActDisk, ActDisk_Map, VARIABLES_JUMP); /*!\brief MARKER_ACTDISK\n DESCRIPTION: \ingroup Config*/ - addActDiskOption("MARKER_ACTDISK", - nMarker_ActDiskInlet, nMarker_ActDiskOutlet, Marker_ActDiskInlet, Marker_ActDiskOutlet, - ActDisk_PressJump, ActDisk_TempJump, ActDisk_Omega); + addActDiskOption("MARKER_ACTDISK", nMarker_ActDiskInlet, nMarker_ActDiskOutlet, Marker_ActDiskInlet, + Marker_ActDiskOutlet, ActDisk_PressJump, ActDisk_TempJump, ActDisk_Omega); - /*!\brief ACTDISK_FILENAME \n DESCRIPTION: Input file for a specified actuator disk (w/ extension) \n DEFAULT: actdiskinput.dat \ingroup Config*/ + /*!\brief ACTDISK_FILENAME \n DESCRIPTION: Input file for a specified actuator disk (w/ extension) \n DEFAULT: + * actdiskinput.dat \ingroup Config*/ addStringOption("ACTDISK_FILENAME", ActDisk_FileName, string("actdiskinput.dat")); - /*!\brief INLET_TYPE \n DESCRIPTION: Inlet boundary type \n OPTIONS: see \link Inlet_Map \endlink \n DEFAULT: TOTAL_CONDITIONS \ingroup Config*/ + /*!\brief INLET_TYPE \n DESCRIPTION: Inlet boundary type \n OPTIONS: see \link Inlet_Map \endlink \n DEFAULT: + * TOTAL_CONDITIONS \ingroup Config*/ addEnumOption("INLET_TYPE", Kind_Inlet, Inlet_Map, INLET_TYPE::TOTAL_CONDITIONS); - /*!\brief INC_INLET_TYPE \n DESCRIPTION: List of inlet types for incompressible flows. List length must match number of inlet markers. Options: VELOCITY_INLET, PRESSURE_INLET, INPUT_FILE. \ingroup Config*/ + /*!\brief INC_INLET_TYPE \n DESCRIPTION: List of inlet types for incompressible flows. List length must match number + * of inlet markers. Options: VELOCITY_INLET, PRESSURE_INLET, INPUT_FILE. \ingroup Config*/ addEnumListOption("INC_INLET_TYPE", nInc_Inlet, Kind_Inc_Inlet, Inlet_Map); addBoolOption("SPECIFIED_INLET_PROFILE", Inlet_From_File, false); - /*!\brief INLET_FILENAME \n DESCRIPTION: Input file for a specified inlet profile (w/ extension) \n DEFAULT: inlet.dat \ingroup Config*/ + /*!\brief INLET_FILENAME \n DESCRIPTION: Input file for a specified inlet profile (w/ extension) \n DEFAULT: inlet.dat + * \ingroup Config*/ addStringOption("INLET_FILENAME", Inlet_Filename, string("inlet.dat")); /*!\brief INLET_MATCHING_TOLERANCE * \n DESCRIPTION: If a file is provided to specify the inlet profile, @@ -1547,22 +1736,29 @@ void CConfig::SetConfig_Options() { addInletOption("MARKER_INLET", nMarker_Inlet, Marker_Inlet, Inlet_Ttotal, Inlet_Ptotal, Inlet_FlowDir); /*!\brief MARKER_INLET_SPECIES \n DESCRIPTION: Inlet Species boundary marker(s) with the following format Inlet Species: (inlet_marker, Species1, Species2, ..., SpeciesN-1, inlet_marker2, Species1, Species2, ...) */ - addInletSpeciesOption("MARKER_INLET_SPECIES",nMarker_Inlet_Species, Marker_Inlet_Species, Inlet_SpeciesVal, nSpecies_per_Inlet); + addInletSpeciesOption("MARKER_INLET_SPECIES", nMarker_Inlet_Species, Marker_Inlet_Species, Inlet_SpeciesVal, + nSpecies_per_Inlet); /*!\brief MARKER_INLET_TURBULENT \n DESCRIPTION: Inlet Turbulence boundary marker(s) with the following format Inlet Turbulent: (inlet_marker, TurbulentIntensity1, ViscosityRatio1, inlet_marker2, TurbulentIntensity2, ViscosityRatio2, ...) */ addInletTurbOption("MARKER_INLET_TURBULENT", nMarker_Inlet_Turb, Marker_Inlet_Turb, Inlet_TurbVal, nTurb_Properties); /*!\brief MARKER_RIEMANN \n DESCRIPTION: Riemann boundary marker(s) with the following formats, a unit vector. - * \n OPTIONS: See \link Riemann_Map \endlink. The variables indicated by the option and the flow direction unit vector must be specified. \ingroup Config*/ - addRiemannOption("MARKER_RIEMANN", nMarker_Riemann, Marker_Riemann, Kind_Data_Riemann, Riemann_Map, Riemann_Var1, Riemann_Var2, Riemann_FlowDir); + * \n OPTIONS: See \link Riemann_Map \endlink. The variables indicated by the option and the flow direction unit + * vector must be specified. \ingroup Config*/ + addRiemannOption("MARKER_RIEMANN", nMarker_Riemann, Marker_Riemann, Kind_Data_Riemann, Riemann_Map, Riemann_Var1, + Riemann_Var2, Riemann_FlowDir); /*!\brief MARKER_GILES \n DESCRIPTION: Giles boundary marker(s) with the following formats, a unit vector. */ - /* \n OPTIONS: See \link Giles_Map \endlink. The variables indicated by the option and the flow direction unit vector must be specified. \ingroup Config*/ - addGilesOption("MARKER_GILES", nMarker_Giles, Marker_Giles, Kind_Data_Giles, Giles_Map, Giles_Var1, Giles_Var2, Giles_FlowDir, RelaxFactorAverage, RelaxFactorFourier); + /* \n OPTIONS: See \link Giles_Map \endlink. The variables indicated by the option and the flow direction unit vector + * must be specified. \ingroup Config*/ + addGilesOption("MARKER_GILES", nMarker_Giles, Marker_Giles, Kind_Data_Giles, Giles_Map, Giles_Var1, Giles_Var2, + Giles_FlowDir, RelaxFactorAverage, RelaxFactorFourier); /*!\brief SPATIAL_FOURIER \n DESCRIPTION: Option to compute the spatial fourier trasformation for the Giles BC. */ addBoolOption("SPATIAL_FOURIER", SpatialFourier, false); - /*!\brief GILES_EXTRA_RELAXFACTOR \n DESCRIPTION: the 1st coeff the value of the under relaxation factor to apply to the shroud and hub, - * the 2nd coefficient is the the percentage of span-wise height influenced by this extra under relaxation factor.*/ - extrarelfac[0] = 0.1; extrarelfac[1] = 0.1; + /*!\brief GILES_EXTRA_RELAXFACTOR \n DESCRIPTION: the 1st coeff the value of the under relaxation factor to apply to + * the shroud and hub, the 2nd coefficient is the the percentage of span-wise height influenced by this extra under + * relaxation factor.*/ + extrarelfac[0] = 0.1; + extrarelfac[1] = 0.1; addDoubleArrayOption("GILES_EXTRA_RELAXFACTOR", 2, extrarelfac); /*!\brief AVERAGE_PROCESS_TYPE \n DESCRIPTION: types of mixing process for averaging quantities at the boundaries. \n OPTIONS: see \link MixingProcess_Map \endlink \n DEFAULT: AREA_AVERAGE \ingroup Config*/ @@ -1570,54 +1766,68 @@ void CConfig::SetConfig_Options() { /*!\brief AVERAGE_PROCESS_KIND \n DESCRIPTION: types of mixing process for averaging quantities at the boundaries. \n OPTIONS: see \link MixingProcess_Map \endlink \n DEFAULT: AREA_AVERAGE \ingroup Config*/ addEnumOption("AVERAGE_PROCESS_KIND", Kind_AverageProcess, AverageProcess_Map, AREA); - /*!\brief PERFORMANCE_AVERAGE_PROCESS_KIND \n DESCRIPTION: types of mixing process for averaging quantities at the boundaries for performance computation. - \n OPTIONS: see \link MixingProcess_Map \endlink \n DEFAULT: AREA_AVERAGE \ingroup Config*/ + /*!\brief PERFORMANCE_AVERAGE_PROCESS_KIND \n DESCRIPTION: types of mixing process for averaging quantities at the + boundaries for performance computation. \n OPTIONS: see \link MixingProcess_Map \endlink \n DEFAULT: AREA_AVERAGE + \ingroup Config*/ addEnumOption("PERFORMANCE_AVERAGE_PROCESS_KIND", Kind_PerformanceAverageProcess, AverageProcess_Map, AREA); - mixedout_coeff[0] = 1.0; mixedout_coeff[1] = 1.0E-05; mixedout_coeff[2] = 15.0; + mixedout_coeff[0] = 1.0; + mixedout_coeff[1] = 1.0E-05; + mixedout_coeff[2] = 15.0; /*!\brief MIXEDOUT_COEFF \n DESCRIPTION: the 1st coeff is an under relaxation factor for the Newton method, * the 2nd coefficient is the tolerance for the Newton method, 3rd coefficient is the maximum number of * iteration for the Newton Method.*/ addDoubleArrayOption("MIXEDOUT_COEFF", 3, mixedout_coeff); /*!\brief RAMP_ROTATING_FRAME\n DESCRIPTION: option to ramp up or down the rotating frame velocity value*/ addBoolOption("RAMP_ROTATING_FRAME", RampRotatingFrame, false); - rampRotFrame_coeff[0] = 0; rampRotFrame_coeff[1] = 1.0; rampRotFrame_coeff[2] = 1000.0; - /*!\brief RAMP_ROTATING_FRAME_COEFF \n DESCRIPTION: the 1st coeff is the staring velocity, + rampRotFrame_coeff[0] = 0; + rampRotFrame_coeff[1] = 1.0; + rampRotFrame_coeff[2] = 1000.0; + /*!\brief RAMP_ROTATING_FRAME_COEFF \n DESCRIPTION: the 1st coeff is the staring velocity, * the 2nd coeff is the number of iterations for the update, 3rd is the number of iteration */ addDoubleArrayOption("RAMP_ROTATING_FRAME_COEFF", 3, rampRotFrame_coeff); /* DESCRIPTION: AVERAGE_MACH_LIMIT is a limit value for average procedure based on the mass flux. */ addDoubleOption("AVERAGE_MACH_LIMIT", AverageMachLimit, 0.03); /*!\brief RAMP_OUTLET_PRESSURE\n DESCRIPTION: option to ramp up or down the rotating frame velocity value*/ addBoolOption("RAMP_OUTLET_PRESSURE", RampOutletPressure, false); - rampOutPres_coeff[0] = 100000.0; rampOutPres_coeff[1] = 1.0; rampOutPres_coeff[2] = 1000.0; + rampOutPres_coeff[0] = 100000.0; + rampOutPres_coeff[1] = 1.0; + rampOutPres_coeff[2] = 1000.0; /*!\brief RAMP_OUTLET_PRESSURE_COEFF \n DESCRIPTION: the 1st coeff is the staring outlet pressure, - * the 2nd coeff is the number of iterations for the update, 3rd is the number of total iteration till reaching the final outlet pressure value */ + * the 2nd coeff is the number of iterations for the update, 3rd is the number of total iteration till reaching the + * final outlet pressure value */ addDoubleArrayOption("RAMP_OUTLET_PRESSURE_COEFF", 3, rampOutPres_coeff); - /*!\brief MARKER_MIXINGPLANE \n DESCRIPTION: Identify the boundaries in which the mixing plane is applied. \ingroup Config*/ + /*!\brief MARKER_MIXINGPLANE \n DESCRIPTION: Identify the boundaries in which the mixing plane is applied. \ingroup + * Config*/ addStringListOption("MARKER_MIXINGPLANE_INTERFACE", nMarker_MixingPlaneInterface, Marker_MixingPlaneInterface); /*!\brief TURBULENT_MIXINGPLANE \n DESCRIPTION: Activate mixing plane also for turbulent quantities \ingroup Config*/ addBoolOption("TURBULENT_MIXINGPLANE", turbMixingPlane, false); - /*!\brief MARKER_TURBOMACHINERY \n DESCRIPTION: Identify the inflow and outflow boundaries in which the turbomachinery settings are applied. \ingroup Config*/ + /*!\brief MARKER_TURBOMACHINERY \n DESCRIPTION: Identify the inflow and outflow boundaries in which the turbomachinery + * settings are applied. \ingroup Config*/ addTurboPerfOption("MARKER_TURBOMACHINERY", nMarker_Turbomachinery, Marker_TurboBoundIn, Marker_TurboBoundOut); - /*!\brief NUM_SPANWISE_SECTIONS \n DESCRIPTION: Integer number of spanwise sections to compute 3D turbo BC and Performance for turbomachinery */ + /*!\brief NUM_SPANWISE_SECTIONS \n DESCRIPTION: Integer number of spanwise sections to compute 3D turbo BC and + * Performance for turbomachinery */ addUnsignedShortOption("NUM_SPANWISE_SECTIONS", nSpanWiseSections_User, 1); /*!\brief SPANWISE_KIND \n DESCRIPTION: type of algorithm to identify the span-wise sections at the turbo boundaries. \n OPTIONS: see \link SpanWise_Map \endlink \n Default: AUTOMATIC */ addEnumOption("SPANWISE_KIND", Kind_SpanWise, SpanWise_Map, AUTOMATIC); /*!\brief TURBOMACHINERY_KIND \n DESCRIPTION: types of turbomachinery architecture. \n OPTIONS: see \link TurboMachinery_Map \endlink \n Default: AXIAL */ - addEnumListOption("TURBOMACHINERY_KIND",nTurboMachineryKind, Kind_TurboMachinery, TurboMachinery_Map); + addEnumListOption("TURBOMACHINERY_KIND", nTurboMachineryKind, Kind_TurboMachinery, TurboMachinery_Map); /*!\brief MARKER_SHROUD \n DESCRIPTION: markers in which velocity is forced to 0.0. * \n Format: (shroud1, shroud2, ...)*/ addStringListOption("MARKER_SHROUD", nMarker_Shroud, Marker_Shroud); /*!\brief MARKER_SUPERSONIC_INLET \n DESCRIPTION: Supersonic inlet boundary marker(s) - * \n Format: (inlet marker, temperature, static pressure, velocity_x, velocity_y, velocity_z, ... ), i.e. primitive variables specified. \ingroup Config*/ - addInletOption("MARKER_SUPERSONIC_INLET", nMarker_Supersonic_Inlet, Marker_Supersonic_Inlet, Inlet_Temperature, Inlet_Pressure, Inlet_Velocity); + * \n Format: (inlet marker, temperature, static pressure, velocity_x, velocity_y, velocity_z, ... ), i.e. + * primitive variables specified. \ingroup Config*/ + addInletOption("MARKER_SUPERSONIC_INLET", nMarker_Supersonic_Inlet, Marker_Supersonic_Inlet, Inlet_Temperature, + Inlet_Pressure, Inlet_Velocity); /*!\brief MARKER_SUPERSONIC_OUTLET \n DESCRIPTION: Supersonic outlet boundary marker(s) \ingroup Config*/ addStringListOption("MARKER_SUPERSONIC_OUTLET", nMarker_Supersonic_Outlet, Marker_Supersonic_Outlet); /*!\brief MARKER_OUTLET \n DESCRIPTION: Outlet boundary marker(s)\n Format: ( outlet marker, back pressure (static), ... ) \ingroup Config*/ addStringDoubleListOption("MARKER_OUTLET", nMarker_Outlet, Marker_Outlet, Outlet_Pressure); - /*!\brief INC_INLET_TYPE \n DESCRIPTION: List of outlet types for incompressible flows. List length must match number of inlet markers. Options: PRESSURE_OUTLET, MASS_FLOW_OUTLET. \ingroup Config*/ + /*!\brief INC_INLET_TYPE \n DESCRIPTION: List of outlet types for incompressible flows. List length must match number + * of inlet markers. Options: PRESSURE_OUTLET, MASS_FLOW_OUTLET. \ingroup Config*/ addEnumListOption("INC_OUTLET_TYPE", nInc_Outlet, Kind_Inc_Outlet, Inc_Outlet_Map); /*!\brief MARKER_ISOTHERMAL DESCRIPTION: Isothermal wall boundary marker(s)\n * Format: ( isothermal marker, wall temperature (static), ... ) \ingroup Config */ @@ -1625,14 +1835,18 @@ void CConfig::SetConfig_Options() { /*!\brief MARKER_HEATFLUX \n DESCRIPTION: Specified heat flux wall boundary marker(s) Format: ( Heat flux marker, wall heat flux (static), ... ) \ingroup Config*/ addStringDoubleListOption("MARKER_HEATFLUX", nMarker_HeatFlux, Marker_HeatFlux, Heat_Flux); - /*!\brief INTEGRATED_HEATFLUX \n DESCRIPTION: Prescribe Heatflux in [W] instead of [W/m^2] \ingroup Config \default false */ + /*!\brief INTEGRATED_HEATFLUX \n DESCRIPTION: Prescribe Heatflux in [W] instead of [W/m^2] \ingroup Config \default + * false */ addBoolOption("INTEGRATED_HEATFLUX", Integrated_HeatFlux, false); /*!\brief MARKER_HEATTRANSFER DESCRIPTION: Heat flux with specified heat transfer coefficient boundary marker(s)\n * Format: ( Heat transfer marker, heat transfer coefficient, wall temperature (static), ... ) \ingroup Config */ - addExhaustOption("MARKER_HEATTRANSFER", nMarker_HeatTransfer, Marker_HeatTransfer, HeatTransfer_Coeff, HeatTransfer_WallTemp); - /*!\brief Smoluchowski/Maxwell wall boundary marker(s) \n DESCRIPTION: Slip velocity and temperature jump wall boundary marker(s) - Format: ( Heat flux marker, wall temperature (static), momentum accomodation coefficient, thermal accomodation coefficient ... ) \ingroup Config*/ - addStringDoubleListOption("MARKER_SMOLUCHOWSKI_MAXWELL", nMarker_Smoluchowski_Maxwell, Marker_Smoluchowski_Maxwell, Isothermal_Temperature); //Missing TMAC and TAC + addExhaustOption("MARKER_HEATTRANSFER", nMarker_HeatTransfer, Marker_HeatTransfer, HeatTransfer_Coeff, + HeatTransfer_WallTemp); + /*!\brief Smoluchowski/Maxwell wall boundary marker(s) \n DESCRIPTION: Slip velocity and temperature jump wall + boundary marker(s) Format: ( Heat flux marker, wall temperature (static), momentum accomodation coefficient, thermal + accomodation coefficient ... ) \ingroup Config*/ + addStringDoubleListOption("MARKER_SMOLUCHOWSKI_MAXWELL", nMarker_Smoluchowski_Maxwell, Marker_Smoluchowski_Maxwell, + Isothermal_Temperature); // Missing TMAC and TAC /*!\brief WALL_ROUGHNESS \n DESCRIPTION: Specified roughness heights at wall boundary marker(s) Format: ( Wall marker, roughness_height (static), ... ) \ingroup Config*/ addStringDoubleListOption("WALL_ROUGHNESS", nRough_Wall, Marker_RoughWall, Roughness_Height); @@ -1652,18 +1866,30 @@ void CConfig::SetConfig_Options() { // /* DESCRIPTION: Actuator disk double surface */ // addBoolOption("ACTDISK_SU2_DEF", ActDisk_SU2_DEF, false); /* DESCRIPTION: Definition of the distortion rack (radial number of proves / circumferential density (degree) */ - distortion[0] = 5.0; distortion[1] = 15.0; + distortion[0] = 5.0; + distortion[1] = 15.0; addDoubleArrayOption("DISTORTION_RACK", 2, distortion); /* DESCRIPTION: Values of the box to impose a subsonic nacellle (mach, Pressure, Temperature) */ - eng_val[0]=0.0; eng_val[1]=0.0; eng_val[2]=0.0; eng_val[3]=0.0; eng_val[4]=0.0; + eng_val[0] = 0.0; + eng_val[1] = 0.0; + eng_val[2] = 0.0; + eng_val[3] = 0.0; + eng_val[4] = 0.0; addDoubleArrayOption("SUBSONIC_ENGINE_VALUES", 5, eng_val); - /* DESCRIPTION: Coordinates of the box to impose a subsonic nacellle cylinder (Xmin, Ymin, Zmin, Xmax, Ymax, Zmax, Radius) */ - eng_cyl[0] = 0.0; eng_cyl[1] = 0.0; eng_cyl[2] = 0.0; - eng_cyl[3] = 1E15; eng_cyl[4] = 1E15; eng_cyl[5] = 1E15; eng_cyl[6] = 1E15; + /* DESCRIPTION: Coordinates of the box to impose a subsonic nacellle cylinder (Xmin, Ymin, Zmin, Xmax, Ymax, Zmax, + * Radius) */ + eng_cyl[0] = 0.0; + eng_cyl[1] = 0.0; + eng_cyl[2] = 0.0; + eng_cyl[3] = 1E15; + eng_cyl[4] = 1E15; + eng_cyl[5] = 1E15; + eng_cyl[6] = 1E15; addDoubleArrayOption("SUBSONIC_ENGINE_CYL", 7, eng_cyl); /* DESCRIPTION: Engine exhaust boundary marker(s) Format: (nacelle exhaust marker, total nozzle temp, total nozzle pressure, ... )*/ - addExhaustOption("MARKER_ENGINE_EXHAUST", nMarker_EngineExhaust, Marker_EngineExhaust, Exhaust_Temperature_Target, Exhaust_Pressure_Target); + addExhaustOption("MARKER_ENGINE_EXHAUST", nMarker_EngineExhaust, Marker_EngineExhaust, Exhaust_Temperature_Target, + Exhaust_Pressure_Target); /* DESCRIPTION: Clamped boundary marker(s) */ addStringListOption("MARKER_CLAMPED", nMarker_Clamped, Marker_Clamped); /* DESCRIPTION: Displacement boundary marker(s) */ @@ -1677,25 +1903,31 @@ void CConfig::SetConfig_Options() { addInletOption("MARKER_LOAD", nMarker_Load_Dir, Marker_Load_Dir, Load_Dir_Value, Load_Dir_Multiplier, Load_Dir); /* DESCRIPTION: Load boundary marker(s) Format: (inlet marker, load, multiplier, dir_x, dir_y, dir_z, ... ), i.e. primitive variables specified. */ - addInletOption("MARKER_DISPLACEMENT", nMarker_Disp_Dir, Marker_Disp_Dir, Disp_Dir_Value, Disp_Dir_Multiplier, Disp_Dir); + addInletOption("MARKER_DISPLACEMENT", nMarker_Disp_Dir, Marker_Disp_Dir, Disp_Dir_Value, Disp_Dir_Multiplier, + Disp_Dir); /* DESCRIPTION: Sine load boundary marker(s) Format: (inlet marker, load, multiplier, dir_x, dir_y, dir_z, ... ), i.e. primitive variables specified. */ - //addInletOption("MARKER_SINE_LOAD", nMarker_Load_Sine, Marker_Load_Sine, Load_Sine_Amplitude, Load_Sine_Frequency, Load_Sine_Dir); + // addInletOption("MARKER_SINE_LOAD", nMarker_Load_Sine, Marker_Load_Sine, Load_Sine_Amplitude, Load_Sine_Frequency, + // Load_Sine_Dir); /*!\brief SINE_LOAD\n DESCRIPTION: option to apply the load as a sine*/ addBoolOption("SINE_LOAD", Sine_Load, false); - sineload_coeff[0] = 0.0; sineload_coeff[1] = 0.0; sineload_coeff[2] = 0.0; - /*!\brief SINE_LOAD_COEFF \n DESCRIPTION: the 1st coeff is the amplitude, the 2nd is the frequency, 3rd is the phase in radians */ + sineload_coeff[0] = 0.0; + sineload_coeff[1] = 0.0; + sineload_coeff[2] = 0.0; + /*!\brief SINE_LOAD_COEFF \n DESCRIPTION: the 1st coeff is the amplitude, the 2nd is the frequency, 3rd is the phase + * in radians */ addDoubleArrayOption("SINE_LOAD_COEFF", 3, sineload_coeff); /*!\brief RAMP_AND_RELEASE\n DESCRIPTION: release the load after applying the ramp*/ addBoolOption("RAMP_AND_RELEASE_LOAD", RampAndRelease, false); /* DESCRIPTION: Flow load boundary marker(s) */ - //addStringDoubleListOption("MARKER_FLOWLOAD", nMarker_FlowLoad, Marker_FlowLoad, FlowLoad_Value); + // addStringDoubleListOption("MARKER_FLOWLOAD", nMarker_FlowLoad, Marker_FlowLoad, FlowLoad_Value); /* DESCRIPTION: Damping factor for engine inlet condition */ addDoubleOption("DAMP_ENGINE_INFLOW", Damp_Engine_Inflow, 0.95); /* DESCRIPTION: Damping factor for engine exhaust condition */ addDoubleOption("DAMP_ENGINE_EXHAUST", Damp_Engine_Exhaust, 0.95); - /*!\brief ENGINE_INFLOW_TYPE \n DESCRIPTION: Inlet boundary type \n OPTIONS: see \link Engine_Inflow_Map \endlink \n Default: FAN_FACE_MACH \ingroup Config*/ + /*!\brief ENGINE_INFLOW_TYPE \n DESCRIPTION: Inlet boundary type \n OPTIONS: see \link Engine_Inflow_Map \endlink \n + * Default: FAN_FACE_MACH \ingroup Config*/ addEnumOption("ENGINE_INFLOW_TYPE", Kind_Engine_Inflow, Engine_Inflow_Map, FAN_FACE_MACH); /* DESCRIPTION: Evaluate a problem with engines */ addBoolOption("ENGINE", Engine, false); @@ -1709,7 +1941,8 @@ void CConfig::SetConfig_Options() { addBoolOption("NEWTON_KRYLOV", NewtonKrylov, false); /* DESCRIPTION: Integer parameters {startup iters, precond iters, initial tolerance relaxation}. */ addUShortArrayOption("NEWTON_KRYLOV_IPARAM", NK_IntParam.size(), NK_IntParam.data()); - /* DESCRIPTION: Double parameters {startup residual drop, precond tolerance, full tolerance residual drop, findiff step}. */ + /* DESCRIPTION: Double parameters {startup residual drop, precond tolerance, full tolerance residual drop, findiff + * step}. */ addDoubleArrayOption("NEWTON_KRYLOV_DPARAM", NK_DblParam.size(), NK_DblParam.data()); /* DESCRIPTION: Number of samples for quasi-Newton methods. */ @@ -1729,10 +1962,14 @@ void CConfig::SetConfig_Options() { /* DESCRIPTION: Activate The adaptive CFL number. */ addBoolOption("CFL_ADAPT", CFL_Adapt, false); /* !\brief CFL_ADAPT_PARAM - * DESCRIPTION: Parameters of the adaptive CFL number (factor down, factor up, CFL limit (min and max), acceptable linear residual ) - * Factor down generally <1.0, factor up generally > 1.0 to cause the CFL to increase when the under-relaxation parameter is 1.0 - * and to decrease when the under-relaxation parameter is less than 0.1. Factor is multiplicative. \ingroup Config*/ - default_cfl_adapt[0] = 1.0; default_cfl_adapt[1] = 1.0; default_cfl_adapt[2] = 10.0; default_cfl_adapt[3] = 100.0; + * DESCRIPTION: Parameters of the adaptive CFL number (factor down, factor up, CFL limit (min and max), acceptable + * linear residual ) Factor down generally <1.0, factor up generally > 1.0 to cause the CFL to increase when the + * under-relaxation parameter is 1.0 and to decrease when the under-relaxation parameter is less than 0.1. Factor is + * multiplicative. \ingroup Config*/ + default_cfl_adapt[0] = 1.0; + default_cfl_adapt[1] = 1.0; + default_cfl_adapt[2] = 10.0; + default_cfl_adapt[3] = 100.0; default_cfl_adapt[4] = 0.001; addDoubleListOption("CFL_ADAPT_PARAM", nCFL_AdaptParam, CFL_AdaptParam); /* DESCRIPTION: Reduction factor of the CFL coefficient in the adjoint problem */ @@ -1741,7 +1978,8 @@ void CConfig::SetConfig_Options() { addDoubleOption("CFL_REDUCTION_TURB", CFLRedCoeff_Turb, 1.0); /* DESCRIPTION: Reduction factor of the CFL coefficient in the turbulent adjoint problem */ addDoubleOption("CFL_REDUCTION_ADJTURB", CFLRedCoeff_AdjTurb, 1.0); - /*!\brief CFL_REDUCTION_SPECIES \n DESCRIPTION: Reduction factor of the CFL coefficient in the species problem \n DEFAULT: 1.0 */ + /*!\brief CFL_REDUCTION_SPECIES \n DESCRIPTION: Reduction factor of the CFL coefficient in the species problem \n + * DEFAULT: 1.0 */ addDoubleOption("CFL_REDUCTION_SPECIES", CFLRedCoeff_Species, 1.0); /* DESCRIPTION: External iteration offset due to restart */ addUnsignedLongOption("EXT_ITER_OFFSET", ExtIter_OffSet, 0); @@ -1763,7 +2001,7 @@ void CConfig::SetConfig_Options() { /* DESCRIPTION: Starting direct solver iteration for the unsteady adjoint */ addLongOption("UNST_ADJOINT_ITER", Unst_AdjointIter, 0); /* DESCRIPTION: Number of iterations to average the objective */ - addLongOption("ITER_AVERAGE_OBJ", Iter_Avg_Objective , 0); + addLongOption("ITER_AVERAGE_OBJ", Iter_Avg_Objective, 0); /* DESCRIPTION: Time discretization */ addEnumOption("TIME_DISCRE_FLOW", Kind_TimeIntScheme_Flow, Time_Int_Map, EULER_IMPLICIT); /* DESCRIPTION: Time discretization */ @@ -1791,10 +2029,12 @@ void CConfig::SetConfig_Options() { /*--- Options related to the linear solvers ---*/ /*!\brief LINEAR_SOLVER - * \n DESCRIPTION: Linear solver for the implicit, mesh deformation, or discrete adjoint systems \n OPTIONS: see \link Linear_Solver_Map \endlink \n DEFAULT: FGMRES \ingroup Config*/ + * \n DESCRIPTION: Linear solver for the implicit, mesh deformation, or discrete adjoint systems \n OPTIONS: see + * \link Linear_Solver_Map \endlink \n DEFAULT: FGMRES \ingroup Config*/ addEnumOption("LINEAR_SOLVER", Kind_Linear_Solver, Linear_Solver_Map, FGMRES); /*!\brief LINEAR_SOLVER_PREC - * \n DESCRIPTION: Preconditioner for the Krylov linear solvers \n OPTIONS: see \link Linear_Solver_Prec_Map \endlink \n DEFAULT: LU_SGS \ingroup Config*/ + * \n DESCRIPTION: Preconditioner for the Krylov linear solvers \n OPTIONS: see \link Linear_Solver_Prec_Map \endlink + * \n DEFAULT: LU_SGS \ingroup Config*/ addEnumOption("LINEAR_SOLVER_PREC", Kind_Linear_Solver_Prec, Linear_Solver_Prec_Map, ILU); /* DESCRIPTION: Minimum error threshold for the linear solver for the implicit formulation */ addDoubleOption("LINEAR_SOLVER_ERROR", Linear_Solver_Error, 1E-6); @@ -1835,31 +2075,39 @@ void CConfig::SetConfig_Options() { /*!\brief CONV_FIELD\n DESCRIPTION: Output field to monitor \n Default: depends on solver \ingroup Config*/ addStringListOption("CONV_FIELD", nConvField, ConvField); - /*!\brief CONV_RESIDUAL_MINVAL\n DESCRIPTION: Min value of the residual (log10 of the residual)\n DEFAULT: -14.0 \ingroup Config*/ + /*!\brief CONV_RESIDUAL_MINVAL\n DESCRIPTION: Min value of the residual (log10 of the residual)\n DEFAULT: -14.0 + * \ingroup Config*/ addDoubleOption("CONV_RESIDUAL_MINVAL", MinLogResidual, -14.0); - /*!\brief CONV_STARTITER\n DESCRIPTION: Iteration number to begin convergence monitoring\n DEFAULT: 5 \ingroup Config*/ + /*!\brief CONV_STARTITER\n DESCRIPTION: Iteration number to begin convergence monitoring\n DEFAULT: 5 \ingroup + * Config*/ addUnsignedLongOption("CONV_STARTITER", StartConv_Iter, 5); /*!\brief CONV_CAUCHY_ELEMS\n DESCRIPTION: Number of elements to apply the criteria. \n DEFAULT 100 \ingroup Config*/ addUnsignedShortOption("CONV_CAUCHY_ELEMS", Cauchy_Elems, 100); /*!\brief CONV_CAUCHY_EPS\n DESCRIPTION: Epsilon to control the series convergence \n DEFAULT: 1e-10 \ingroup Config*/ addDoubleOption("CONV_CAUCHY_EPS", Cauchy_Eps, 1E-10); - /*!\brief CONV_WINDOW_STARTITER\n DESCRIPTION: Iteration number after START_ITER_WND to begin convergence monitoring\n DEFAULT: 15 \ingroup Config*/ + /*!\brief CONV_WINDOW_STARTITER\n DESCRIPTION: Iteration number after START_ITER_WND to begin convergence + * monitoring\n DEFAULT: 15 \ingroup Config*/ addUnsignedLongOption("CONV_WINDOW_STARTITER", Wnd_StartConv_Iter, 15); - /*!\brief CONV_WINDOW_CAUCHY_EPS\n DESCRIPTION: Epsilon to control the series convergence \n DEFAULT: 1e-3 \ingroup Config*/ + /*!\brief CONV_WINDOW_CAUCHY_EPS\n DESCRIPTION: Epsilon to control the series convergence \n DEFAULT: 1e-3 \ingroup + * Config*/ addDoubleOption("CONV_WINDOW_CAUCHY_EPS", Wnd_Cauchy_Eps, 1E-3); - /*!\brief CONV_WINDOW_CAUCHY_ELEMS\n DESCRIPTION: Number of elements to apply the criteria. \n DEFAULT 100 \ingroup Config*/ + /*!\brief CONV_WINDOW_CAUCHY_ELEMS\n DESCRIPTION: Number of elements to apply the criteria. \n DEFAULT 100 \ingroup + * Config*/ addUnsignedShortOption("CONV_WINDOW_CAUCHY_ELEMS", Wnd_Cauchy_Elems, 100); - /*!\brief WINDOW_CAUCHY_CRIT \n DESCRIPTION: Determines, if the cauchy convergence criterion should be used for windowed time averaged objective functions*/ - addBoolOption("WINDOW_CAUCHY_CRIT",Wnd_Cauchy_Crit, false); + /*!\brief WINDOW_CAUCHY_CRIT \n DESCRIPTION: Determines, if the cauchy convergence criterion should be used for + * windowed time averaged objective functions*/ + addBoolOption("WINDOW_CAUCHY_CRIT", Wnd_Cauchy_Crit, false); /*!\brief CONV_WINDOW_FIELD - * \n DESCRIPTION: Output fields for the Cauchy criterium for the TIME iteration. The criterium is applied to the windowed time average of the chosen funcion. */ - addStringListOption("CONV_WINDOW_FIELD",nWndConvField, WndConvField); + * \n DESCRIPTION: Output fields for the Cauchy criterium for the TIME iteration. The criterium is applied to the + * windowed time average of the chosen funcion. */ + addStringListOption("CONV_WINDOW_FIELD", nWndConvField, WndConvField); /*!\par CONFIG_CATEGORY: Multi-grid \ingroup Config*/ /*!\brief MGLEVEL\n DESCRIPTION: Multi-grid Levels. DEFAULT: 0 \ingroup Config*/ addUnsignedShortOption("MGLEVEL", nMGLevels, 0); - /*!\brief MGCYCLE\n DESCRIPTION: Multi-grid cycle. OPTIONS: See \link MG_Cycle_Map \endlink. Defualt V_CYCLE \ingroup Config*/ + /*!\brief MGCYCLE\n DESCRIPTION: Multi-grid cycle. OPTIONS: See \link MG_Cycle_Map \endlink. Defualt V_CYCLE \ingroup + * Config*/ addEnumOption("MGCYCLE", MGCycle, MG_Cycle_Map, V_CYCLE); /*!\brief MG_PRE_SMOOTH\n DESCRIPTION: Multi-grid pre-smoothing level \ingroup Config*/ addUShortListOption("MG_PRE_SMOOTH", nMG_PreSmooth, MG_PreSmooth); @@ -1867,74 +2115,96 @@ void CConfig::SetConfig_Options() { addUShortListOption("MG_POST_SMOOTH", nMG_PostSmooth, MG_PostSmooth); /*!\brief MG_CORRECTION_SMOOTH\n DESCRIPTION: Jacobi implicit smoothing of the correction \ingroup Config*/ addUShortListOption("MG_CORRECTION_SMOOTH", nMG_CorrecSmooth, MG_CorrecSmooth); - /*!\brief MG_DAMP_RESTRICTION\n DESCRIPTION: Damping factor for the residual restriction. DEFAULT: 0.75 \ingroup Config*/ + /*!\brief MG_DAMP_RESTRICTION\n DESCRIPTION: Damping factor for the residual restriction. DEFAULT: 0.75 \ingroup + * Config*/ addDoubleOption("MG_DAMP_RESTRICTION", Damp_Res_Restric, 0.75); - /*!\brief MG_DAMP_PROLONGATION\n DESCRIPTION: Damping factor for the correction prolongation. DEFAULT 0.75 \ingroup Config*/ + /*!\brief MG_DAMP_PROLONGATION\n DESCRIPTION: Damping factor for the correction prolongation. DEFAULT 0.75 \ingroup + * Config*/ addDoubleOption("MG_DAMP_PROLONGATION", Damp_Correc_Prolong, 0.75); /*!\par CONFIG_CATEGORY: Spatial Discretization \ingroup Config*/ /*--- Options related to the spatial discretization ---*/ /*!\brief NUM_METHOD_GRAD - * \n DESCRIPTION: Numerical method for spatial gradients \n OPTIONS: See \link Gradient_Map \endlink. \n DEFAULT: WEIGHTED_LEAST_SQUARES. \ingroup Config*/ + * \n DESCRIPTION: Numerical method for spatial gradients \n OPTIONS: See \link Gradient_Map \endlink. \n DEFAULT: + * WEIGHTED_LEAST_SQUARES. \ingroup Config*/ addEnumOption("NUM_METHOD_GRAD", Kind_Gradient_Method, Gradient_Map, WEIGHTED_LEAST_SQUARES); /*!\brief NUM_METHOD_GRAD - * \n DESCRIPTION: Numerical method for spatial gradients used only for upwind reconstruction \n OPTIONS: See \link Gradient_Map \endlink. \n DEFAULT: NO_GRADIENT. \ingroup Config*/ + * \n DESCRIPTION: Numerical method for spatial gradients used only for upwind reconstruction \n OPTIONS: See \link + * Gradient_Map \endlink. \n DEFAULT: NO_GRADIENT. \ingroup Config*/ addEnumOption("NUM_METHOD_GRAD_RECON", Kind_Gradient_Method_Recon, Gradient_Map, NO_GRADIENT); /*!\brief VENKAT_LIMITER_COEFF - * \n DESCRIPTION: Coefficient for the limiter. DEFAULT value 0.5. Larger values decrease the extent of limiting, values approaching zero cause lower-order approximation to the solution. \ingroup Config */ + * \n DESCRIPTION: Coefficient for the limiter. DEFAULT value 0.5. Larger values decrease the extent of limiting, + * values approaching zero cause lower-order approximation to the solution. \ingroup Config */ addDoubleOption("VENKAT_LIMITER_COEFF", Venkat_LimiterCoeff, 0.05); /*!\brief ADJ_SHARP_LIMITER_COEFF - * \n DESCRIPTION: Coefficient for detecting the limit of the sharp edges. DEFAULT value 3.0. Use with sharp edges limiter. \ingroup Config*/ + * \n DESCRIPTION: Coefficient for detecting the limit of the sharp edges. DEFAULT value 3.0. Use with sharp edges + * limiter. \ingroup Config*/ addDoubleOption("ADJ_SHARP_LIMITER_COEFF", AdjSharp_LimiterCoeff, 3.0); /*!\brief LIMITER_ITER - * \n DESCRIPTION: Freeze the value of the limiter after a number of iterations. DEFAULT value 999999. \ingroup Config*/ + * \n DESCRIPTION: Freeze the value of the limiter after a number of iterations. DEFAULT value 999999. \ingroup + * Config*/ addUnsignedLongOption("LIMITER_ITER", LimiterIter, 999999); /*!\brief CONV_NUM_METHOD_FLOW - * \n DESCRIPTION: Convective numerical method \n OPTIONS: See \link Upwind_Map \endlink , \link Centered_Map \endlink. \ingroup Config*/ + * \n DESCRIPTION: Convective numerical method \n OPTIONS: See \link Upwind_Map \endlink , \link Centered_Map + * \endlink. \ingroup Config*/ addConvectOption("CONV_NUM_METHOD_FLOW", Kind_ConvNumScheme_Flow, Kind_Centered_Flow, Kind_Upwind_Flow); /*!\brief NUM_METHOD_FEM_FLOW - * \n DESCRIPTION: Numerical method \n OPTIONS: See \link FEM_Map \endlink , \link Centered_Map \endlink. \ingroup Config*/ + * \n DESCRIPTION: Numerical method \n OPTIONS: See \link FEM_Map \endlink , \link Centered_Map \endlink. \ingroup + * Config*/ addConvectFEMOption("NUM_METHOD_FEM_FLOW", Kind_ConvNumScheme_FEM_Flow, Kind_FEM_Flow); /*!\brief MUSCL_FLOW \n DESCRIPTION: Check if the MUSCL scheme should be used \ingroup Config*/ addBoolOption("MUSCL_FLOW", MUSCL_Flow, true); /*!\brief SLOPE_LIMITER_FLOW - * DESCRIPTION: Slope limiter for the direct solution. \n OPTIONS: See \link Limiter_Map \endlink \n DEFAULT VENKATAKRISHNAN \ingroup Config*/ + * DESCRIPTION: Slope limiter for the direct solution. \n OPTIONS: See \link Limiter_Map \endlink \n DEFAULT + * VENKATAKRISHNAN \ingroup Config*/ addEnumOption("SLOPE_LIMITER_FLOW", Kind_SlopeLimit_Flow, Limiter_Map, LIMITER::VENKATAKRISHNAN); - jst_coeff[0] = 0.5; jst_coeff[1] = 0.02; - /*!\brief JST_SENSOR_COEFF \n DESCRIPTION: 2nd and 4th order artificial dissipation coefficients for the JST method \ingroup Config*/ + jst_coeff[0] = 0.5; + jst_coeff[1] = 0.02; + /*!\brief JST_SENSOR_COEFF \n DESCRIPTION: 2nd and 4th order artificial dissipation coefficients for the JST method + * \ingroup Config*/ addDoubleArrayOption("JST_SENSOR_COEFF", 2, jst_coeff); - /*!\brief LAX_SENSOR_COEFF \n DESCRIPTION: 1st order artificial dissipation coefficients for the Lax-Friedrichs method. \ingroup Config*/ + /*!\brief LAX_SENSOR_COEFF \n DESCRIPTION: 1st order artificial dissipation coefficients for the Lax-Friedrichs + * method. \ingroup Config*/ addDoubleOption("LAX_SENSOR_COEFF", Kappa_1st_Flow, 0.15); - /*!\brief USE_ACCURATE_FLUX_JACOBIANS \n DESCRIPTION: Use numerically computed Jacobians for AUSM+up(2) and SLAU(2) \ingroup Config*/ + /*!\brief USE_ACCURATE_FLUX_JACOBIANS \n DESCRIPTION: Use numerically computed Jacobians for AUSM+up(2) and SLAU(2) + * \ingroup Config*/ addBoolOption("USE_ACCURATE_FLUX_JACOBIANS", Use_Accurate_Jacobians, false); - /*!\brief CENTRAL_JACOBIAN_FIX_FACTOR \n DESCRIPTION: Improve the numerical properties (diagonal dominance) of the global Jacobian matrix, 3 to 4 is "optimum" (central schemes) \ingroup Config*/ + /*!\brief CENTRAL_JACOBIAN_FIX_FACTOR \n DESCRIPTION: Improve the numerical properties (diagonal dominance) of the + * global Jacobian matrix, 3 to 4 is "optimum" (central schemes) \ingroup Config*/ addDoubleOption("CENTRAL_JACOBIAN_FIX_FACTOR", Cent_Jac_Fix_Factor, 4.0); - /*!\brief CENTRAL_JACOBIAN_FIX_FACTOR \n DESCRIPTION: Control numerical properties of the global Jacobian matrix using a multiplication factor for incompressible central schemes \ingroup Config*/ + /*!\brief CENTRAL_JACOBIAN_FIX_FACTOR \n DESCRIPTION: Control numerical properties of the global Jacobian matrix using + * a multiplication factor for incompressible central schemes \ingroup Config*/ addDoubleOption("CENTRAL_INC_JACOBIAN_FIX_FACTOR", Cent_Inc_Jac_Fix_Factor, 1.0); /*!\brief CONV_NUM_METHOD_ADJFLOW * \n DESCRIPTION: Convective numerical method for the adjoint solver. - * \n OPTIONS: See \link Upwind_Map \endlink , \link Centered_Map \endlink. Note: not all methods are guaranteed to be implemented for the adjoint solver. \ingroup Config */ + * \n OPTIONS: See \link Upwind_Map \endlink , \link Centered_Map \endlink. Note: not all methods are guaranteed to + * be implemented for the adjoint solver. \ingroup Config */ addConvectOption("CONV_NUM_METHOD_ADJFLOW", Kind_ConvNumScheme_AdjFlow, Kind_Centered_AdjFlow, Kind_Upwind_AdjFlow); /*!\brief MUSCL_ADJFLOW \n DESCRIPTION: Check if the MUSCL scheme should be used \ingroup Config*/ addBoolOption("MUSCL_ADJFLOW", MUSCL_AdjFlow, true); /*!\brief SLOPE_LIMITER_ADJFLOW - * DESCRIPTION: Slope limiter for the adjoint solution. \n OPTIONS: See \link Limiter_Map \endlink \n DEFAULT VENKATAKRISHNAN \ingroup Config*/ + * DESCRIPTION: Slope limiter for the adjoint solution. \n OPTIONS: See \link Limiter_Map \endlink \n DEFAULT + * VENKATAKRISHNAN \ingroup Config*/ addEnumOption("SLOPE_LIMITER_ADJFLOW", Kind_SlopeLimit_AdjFlow, Limiter_Map, LIMITER::VENKATAKRISHNAN); - jst_adj_coeff[0] = 0.5; jst_adj_coeff[1] = 0.02; - /*!\brief ADJ_JST_SENSOR_COEFF \n DESCRIPTION: 2nd and 4th order artificial dissipation coefficients for the adjoint JST method. \ingroup Config*/ + jst_adj_coeff[0] = 0.5; + jst_adj_coeff[1] = 0.02; + /*!\brief ADJ_JST_SENSOR_COEFF \n DESCRIPTION: 2nd and 4th order artificial dissipation coefficients for the adjoint + * JST method. \ingroup Config*/ addDoubleArrayOption("ADJ_JST_SENSOR_COEFF", 2, jst_adj_coeff); - /*!\brief LAX_SENSOR_COEFF \n DESCRIPTION: 1st order artificial dissipation coefficients for the adjoint Lax-Friedrichs method. \ingroup Config*/ + /*!\brief LAX_SENSOR_COEFF \n DESCRIPTION: 1st order artificial dissipation coefficients for the adjoint + * Lax-Friedrichs method. \ingroup Config*/ addDoubleOption("ADJ_LAX_SENSOR_COEFF", Kappa_1st_AdjFlow, 0.15); /*!\brief MUSCL_TURB \n DESCRIPTION: Check if the MUSCL scheme should be used \ingroup Config*/ addBoolOption("MUSCL_TURB", MUSCL_Turb, false); /*!\brief SLOPE_LIMITER_TURB - * \n DESCRIPTION: Slope limiter \n OPTIONS: See \link Limiter_Map \endlink \n DEFAULT VENKATAKRISHNAN \ingroup Config*/ + * \n DESCRIPTION: Slope limiter \n OPTIONS: See \link Limiter_Map \endlink \n DEFAULT VENKATAKRISHNAN \ingroup + * Config*/ addEnumOption("SLOPE_LIMITER_TURB", Kind_SlopeLimit_Turb, Limiter_Map, LIMITER::VENKATAKRISHNAN); /*!\brief CONV_NUM_METHOD_TURB * \n DESCRIPTION: Convective numerical method \ingroup Config*/ @@ -1943,21 +2213,25 @@ void CConfig::SetConfig_Options() { /*!\brief MUSCL_ADJTURB \n DESCRIPTION: Check if the MUSCL scheme should be used \ingroup Config*/ addBoolOption("MUSCL_ADJTURB", MUSCL_AdjTurb, false); /*!\brief SLOPE_LIMITER_ADJTURB - * \n DESCRIPTION: Slope limiter \n OPTIONS: See \link Limiter_Map \endlink \n DEFAULT VENKATAKRISHNAN \ingroup Config */ + * \n DESCRIPTION: Slope limiter \n OPTIONS: See \link Limiter_Map \endlink \n DEFAULT VENKATAKRISHNAN \ingroup + * Config */ addEnumOption("SLOPE_LIMITER_ADJTURB", Kind_SlopeLimit_AdjTurb, Limiter_Map, LIMITER::VENKATAKRISHNAN); - /*!\brief CONV_NUM_METHOD_ADJTURB\n DESCRIPTION: Convective numerical method for the adjoint/turbulent problem \ingroup Config*/ + /*!\brief CONV_NUM_METHOD_ADJTURB\n DESCRIPTION: Convective numerical method for the adjoint/turbulent problem + * \ingroup Config*/ addConvectOption("CONV_NUM_METHOD_ADJTURB", Kind_ConvNumScheme_AdjTurb, Kind_Centered_AdjTurb, Kind_Upwind_AdjTurb); /*!\brief MUSCL_SPECIES \n DESCRIPTION: Check if the MUSCL scheme should be used \n DEFAULT false \ingroup Config*/ addBoolOption("MUSCL_SPECIES", MUSCL_Species, false); - /*!\brief SLOPE_LIMITER_SPECIES \n DESCRIPTION: Slope limiter \n OPTIONS: See \link Limiter_Map \endlink \n DEFAULT NONE \ingroup Config*/ + /*!\brief SLOPE_LIMITER_SPECIES \n DESCRIPTION: Slope limiter \n OPTIONS: See \link Limiter_Map \endlink \n DEFAULT + * NONE \ingroup Config*/ addEnumOption("SLOPE_LIMITER_SPECIES", Kind_SlopeLimit_Species, Limiter_Map, LIMITER::NONE); /*!\brief CONV_NUM_METHOD_SPECIES \n DESCRIPTION: Convective numerical method for species transport \ingroup Config*/ addConvectOption("CONV_NUM_METHOD_SPECIES", Kind_ConvNumScheme_Species, Kind_Centered_Species, Kind_Upwind_Species); /*!\brief MUSCL_HEAT \n DESCRIPTION: Check if the MUSCL scheme should be used \ingroup Config*/ addBoolOption("MUSCL_HEAT", MUSCL_Heat, false); - /*!\brief SLOPE_LIMITER_HEAT \n DESCRIPTION: Slope limiter \n OPTIONS: See \link Limiter_Map \endlink \n DEFAULT NONE \ingroup Config*/ + /*!\brief SLOPE_LIMITER_HEAT \n DESCRIPTION: Slope limiter \n OPTIONS: See \link Limiter_Map \endlink \n DEFAULT NONE + * \ingroup Config*/ addEnumOption("SLOPE_LIMITER_HEAT", Kind_SlopeLimit_Heat, Limiter_Map, LIMITER::NONE); /*!\brief CONV_NUM_METHOD_HEAT \n DESCRIPTION: Convective numerical method */ addConvectOption("CONV_NUM_METHOD_HEAT", Kind_ConvNumScheme_Heat, Kind_Centered_Heat, Kind_Upwind_Heat); @@ -1970,9 +2244,11 @@ void CConfig::SetConfig_Options() { /*!\brief MG_ADJFLOW\n DESCRIPTION: Multigrid with the adjoint problem. \n Defualt: YES \ingroup Config*/ addBoolOption("MG_ADJFLOW", MG_AdjointFlow, true); - /*!\brief OBJECTIVE_WEIGHT \n DESCRIPTION: Adjoint problem boundary condition weights. Applies scaling factor to objective(s) \ingroup Config*/ + /*!\brief OBJECTIVE_WEIGHT \n DESCRIPTION: Adjoint problem boundary condition weights. Applies scaling factor to + * objective(s) \ingroup Config*/ addDoubleListOption("OBJECTIVE_WEIGHT", nObjW, Weight_ObjFunc); - /*!\brief OBJECTIVE_FUNCTION \n DESCRIPTION: Adjoint problem boundary condition \n OPTIONS: see \link Objective_Map \endlink \n DEFAULT: DRAG_COEFFICIENT \ingroup Config*/ + /*!\brief OBJECTIVE_FUNCTION \n DESCRIPTION: Adjoint problem boundary condition \n OPTIONS: see \link Objective_Map + * \endlink \n DEFAULT: DRAG_COEFFICIENT \ingroup Config*/ addEnumListOption("OBJECTIVE_FUNCTION", nObj, Kind_ObjFunc, Objective_Map); /*!\brief CUSTOM_OBJFUNC \n DESCRIPTION: User-provided definition of a custom objective function. \ingroup Config*/ @@ -1989,7 +2265,8 @@ void CConfig::SetConfig_Options() { /* DESCRIPTION: parameter for the definition of a complex objective function */ addDoubleOption("DCMZ_DCL_VALUE", dCMz_dCL, 0.0); - geo_loc[0] = 0.0; geo_loc[1] = 1.0; + geo_loc[0] = 0.0; + geo_loc[1] = 1.0; /* DESCRIPTION: Definition of the airfoil section */ addDoubleArrayOption("GEO_BOUNDS", 2, geo_loc); /* DESCRIPTION: Identify the body to slice */ @@ -2000,8 +2277,11 @@ void CConfig::SetConfig_Options() { addUnsignedShortOption("GEO_NUMBER_STATIONS", nWingStations, 25); /* DESCRIPTION: Definition of the airfoil sections */ addDoubleListOption("GEO_LOCATION_STATIONS", nLocationStations, LocationStations); - nacelle_location[0] = 0.0; nacelle_location[1] = 0.0; nacelle_location[2] = 0.0; - nacelle_location[3] = 0.0; nacelle_location[4] = 0.0; + nacelle_location[0] = 0.0; + nacelle_location[1] = 0.0; + nacelle_location[2] = 0.0; + nacelle_location[3] = 0.0; + nacelle_location[4] = 0.0; /* DESCRIPTION: Definition of the nacelle location (higlite coordinates, tilt angle, toe angle) */ addDoubleArrayOption("GEO_NACELLE_LOCATION", 5, nacelle_location); /* DESCRIPTION: Output sectional forces for specified markers. */ @@ -2021,28 +2301,29 @@ void CConfig::SetConfig_Options() { addBoolOption("FROZEN_LIMITER_DISC", Frozen_Limiter_Disc, false); /* DESCRIPTION: Use an inconsistent (primal/dual) discrete adjoint formulation */ addBoolOption("INCONSISTENT_DISC", Inconsistent_Disc, false); - /* DESCRIPTION: */ + /* DESCRIPTION: */ addDoubleOption("FIX_AZIMUTHAL_LINE", FixAzimuthalLine, 90.0); /*!\brief SENS_REMOVE_SHARP - * \n DESCRIPTION: Remove sharp edges from the sensitivity evaluation \n Format: SENS_REMOVE_SHARP = YES \n DEFAULT: NO \ingroup Config*/ + * \n DESCRIPTION: Remove sharp edges from the sensitivity evaluation \n Format: SENS_REMOVE_SHARP = YES \n DEFAULT: + * NO \ingroup Config*/ addBoolOption("SENS_REMOVE_SHARP", Sens_Remove_Sharp, false); /* DESCRIPTION: Automatically reorient elements that seem flipped */ - addBoolOption("REORIENT_ELEMENTS",ReorientElements, true); + addBoolOption("REORIENT_ELEMENTS", ReorientElements, true); /*!\par CONFIG_CATEGORY: Sobolev Gradient Solver Parameters \ingroup Config */ /*--- Options related to the Sobolev smoothing solver ---*/ /* DESCRIPTION: Switch to activate gradient smoothing */ - addBoolOption("SMOOTH_GRADIENT",SmoothGradient, false); + addBoolOption("SMOOTH_GRADIENT", SmoothGradient, false); /* DESCRIPTION: Epsilon of the identity term in the Laplace Beltrami Operator */ - addDoubleOption("SMOOTHING_EPSILON1",SmoothingEps1, 1.0); + addDoubleOption("SMOOTHING_EPSILON1", SmoothingEps1, 1.0); /* DESCRIPTION: Epsilon of the Laplace term in the Laplace Beltrami Operator */ - addDoubleOption("SMOOTHING_EPSILON2",SmoothingEps2, 1.0); + addDoubleOption("SMOOTHING_EPSILON2", SmoothingEps2, 1.0); /* DESCRIPTION: Switch to calculate for each dimension separately */ addBoolOption("SEPARATE_DIMENSIONS", SmoothSepDim, false); /* DESCRIPTION: Switch to activate working on the design surfaces only */ - addBoolOption("SMOOTH_ON_SURFACE",SmoothOnSurface, false); + addBoolOption("SMOOTH_ON_SURFACE", SmoothOnSurface, false); /* DESCRIPTION: Switch to activate zero Dirichlet boundary for surface mode */ addBoolOption("DIRICHLET_SURFACE_BOUNDARY", SmoothDirichletSurfaceBound, false); /* DESCRIPTION: Switch to activate the debbuging modus */ @@ -2051,9 +2332,11 @@ void CConfig::SetConfig_Options() { * \n DESCRIPTION: Output filename for the Sobolev Hessian approximation. \ingroup Config*/ addStringOption("HESS_OBJFUNC_FILENAME", ObjFunc_Hess_FileName, string("of_hess.dat")); - /* DESCRIPTION: Linear solver for the gradient smoothing\n OPTIONS: see \link Linear_Solver_Map \endlink \n DEFAULT: FGMRES \ingroup Config*/ + /* DESCRIPTION: Linear solver for the gradient smoothing\n OPTIONS: see \link Linear_Solver_Map \endlink \n DEFAULT: + * FGMRES \ingroup Config*/ addEnumOption("GRAD_LINEAR_SOLVER", Kind_Grad_Linear_Solver, Linear_Solver_Map, FGMRES); - /* \n DESCRIPTION: Preconditioner for the Krylov linear solvers \n OPTIONS: see \link Linear_Solver_Prec_Map \endlink \n DEFAULT: ILU \ingroup Config*/ + /* \n DESCRIPTION: Preconditioner for the Krylov linear solvers \n OPTIONS: see \link Linear_Solver_Prec_Map \endlink + * \n DEFAULT: ILU \ingroup Config*/ addEnumOption("GRAD_LINEAR_SOLVER_PREC", Kind_Grad_Linear_Solver_Prec, Linear_Solver_Prec_Map, ILU); /* DESCRIPTION: Minimum error threshold for the linear solver for the implicit formulation */ addDoubleOption("GRAD_LINEAR_SOLVER_ERROR", Grad_Linear_Solver_Error, 1E-14); @@ -2063,39 +2346,52 @@ void CConfig::SetConfig_Options() { /*!\par CONFIG_CATEGORY: Input/output files and formats \ingroup Config */ /*--- Options related to input/output files and formats ---*/ - /*!\brief OUTPUT_FORMAT \n DESCRIPTION: I/O format for output plots. \n OPTIONS: see \link TabOutput_Map \endlink \n DEFAULT: TECPLOT \ingroup Config */ + /*!\brief OUTPUT_FORMAT \n DESCRIPTION: I/O format for output plots. \n OPTIONS: see \link TabOutput_Map \endlink \n + * DEFAULT: TECPLOT \ingroup Config */ addEnumOption("TABULAR_FORMAT", Tab_FileFormat, TabOutput_Map, TAB_OUTPUT::TAB_CSV); - /*!\brief OUTPUT_PRECISION \n DESCRIPTION: Set .precision(value) to specified value for SU2_DOT and HISTORY output. Useful for exact gradient validation. \n DEFAULT: 6 \ingroup Config */ + /*!\brief OUTPUT_PRECISION \n DESCRIPTION: Set .precision(value) to specified value for SU2_DOT and HISTORY + * output. Useful for exact gradient validation. \n DEFAULT: 6 \ingroup Config */ addUnsignedShortOption("OUTPUT_PRECISION", output_precision, 10); /*!\brief ACTDISK_JUMP \n DESCRIPTION: The jump is given by the difference in values or a ratio */ addEnumOption("ACTDISK_JUMP", ActDisk_Jump, Jump_Map, DIFFERENCE); - /*!\brief MESH_FORMAT \n DESCRIPTION: Mesh input file format \n OPTIONS: see \link Input_Map \endlink \n DEFAULT: SU2 \ingroup Config*/ + /*!\brief MESH_FORMAT \n DESCRIPTION: Mesh input file format \n OPTIONS: see \link Input_Map \endlink \n DEFAULT: SU2 + * \ingroup Config*/ addEnumOption("MESH_FORMAT", Mesh_FileFormat, Input_Map, SU2); /* DESCRIPTION: Mesh input file */ addStringOption("MESH_FILENAME", Mesh_FileName, string("mesh.su2")); - /*!\brief MESH_OUT_FILENAME \n DESCRIPTION: Mesh output file name. Used when converting, scaling, or deforming a mesh. \n DEFAULT: mesh_out.su2 \ingroup Config*/ + /*!\brief MESH_OUT_FILENAME \n DESCRIPTION: Mesh output file name. Used when converting, scaling, or deforming a mesh. + * \n DEFAULT: mesh_out.su2 \ingroup Config*/ addStringOption("MESH_OUT_FILENAME", Mesh_Out_FileName, string("mesh_out.su2")); - /* DESCRIPTION: List of the number of grid points in the RECTANGLE or BOX grid in the x,y,z directions. (default: (33,33,33) ). */ + /* DESCRIPTION: List of the number of grid points in the RECTANGLE or BOX grid in the x,y,z directions. (default: + * (33,33,33) ). */ addShortListOption("MESH_BOX_SIZE", nMesh_Box_Size, Mesh_Box_Size); - /* DESCRIPTION: List of the length of the RECTANGLE or BOX grid in the x,y,z directions. (default: (1.0,1.0,1.0) ). */ - mesh_box_length[0] = 1.0; mesh_box_length[1] = 1.0; mesh_box_length[2] = 1.0; + /* DESCRIPTION: List of the length of the RECTANGLE or BOX grid in the x,y,z directions. (default: (1.0,1.0,1.0) ). */ + mesh_box_length[0] = 1.0; + mesh_box_length[1] = 1.0; + mesh_box_length[2] = 1.0; addDoubleArrayOption("MESH_BOX_LENGTH", 3, mesh_box_length); - /* DESCRIPTION: List of the offset from 0.0 of the RECTANGLE or BOX grid in the x,y,z directions. (default: (0.0,0.0,0.0) ). */ - mesh_box_offset[0] = 0.0; mesh_box_offset[1] = 0.0; mesh_box_offset[2] = 0.0; + /* DESCRIPTION: List of the offset from 0.0 of the RECTANGLE or BOX grid in the x,y,z directions. (default: + * (0.0,0.0,0.0) ). */ + mesh_box_offset[0] = 0.0; + mesh_box_offset[1] = 0.0; + mesh_box_offset[2] = 0.0; addDoubleArrayOption("MESH_BOX_OFFSET", 3, mesh_box_offset); /* DESCRIPTION: Determine if the mesh file supports multizone. \n DEFAULT: true (temporarily) */ addBoolOption("MULTIZONE_MESH", Multizone_Mesh, true); - /* DESCRIPTION: Determine if we need to allocate memory to store the multizone residual. \n DEFAULT: false (temporarily) */ + /* DESCRIPTION: Determine if we need to allocate memory to store the multizone residual. \n DEFAULT: false + * (temporarily) */ addBoolOption("MULTIZONE_RESIDUAL", Multizone_Residual, false); - /* !\brief CONTROLLING_VARIABLE_NAMES \n DESCRIPTION: Names of the variables used as inputs for the data regression method in flamelet or data-driven fluid models. */ + /* !\brief CONTROLLING_VARIABLE_NAMES \n DESCRIPTION: Names of the variables used as inputs for the data regression + * method in flamelet or data-driven fluid models. */ addStringListOption("CONTROLLING_VARIABLE_NAMES", n_control_vars, controlling_variable_names); - /* !\brief CONTROLLING_VARIABLE_SOURCE_NAMES \n DESCRIPTION: Names of the variables in the flamelet manifold corresponding to the source terms of the controlling variables. */ + /* !\brief CONTROLLING_VARIABLE_SOURCE_NAMES \n DESCRIPTION: Names of the variables in the flamelet manifold + * corresponding to the source terms of the controlling variables. */ addStringListOption("CONTROLLING_VARIABLE_SOURCE_NAMES", n_control_vars, cv_source_names); /* DESCRIPTION: Names of the passive lookup variables for flamelet LUT */ @@ -2107,17 +2403,21 @@ void CConfig::SetConfig_Options() { /* DESCRIPTION: Names of the user scalar source terms. */ addStringListOption("USER_SOURCE_NAMES", n_user_sources, user_source_names); - /*!\brief CONV_FILENAME \n DESCRIPTION: Output file convergence history (w/o extension) \n DEFAULT: history \ingroup Config*/ + /*!\brief CONV_FILENAME \n DESCRIPTION: Output file convergence history (w/o extension) \n DEFAULT: history \ingroup + * Config*/ addStringOption("CONV_FILENAME", Conv_FileName, string("history")); /*!\brief BREAKDOWN_FILENAME \n DESCRIPTION: Output file forces breakdown \ingroup Config*/ addStringOption("BREAKDOWN_FILENAME", Breakdown_FileName, string("forces_breakdown.dat")); - /*!\brief SOLUTION_FLOW_FILENAME \n DESCRIPTION: Restart flow input file (the file output under the filename set by RESTART_FLOW_FILENAME) \n DEFAULT: solution_flow.dat \ingroup Config */ + /*!\brief SOLUTION_FLOW_FILENAME \n DESCRIPTION: Restart flow input file (the file output under the filename set by + * RESTART_FLOW_FILENAME) \n DEFAULT: solution_flow.dat \ingroup Config */ addStringOption("SOLUTION_FILENAME", Solution_FileName, string("solution.dat")); - /*!\brief SOLUTION_ADJ_FILENAME\n DESCRIPTION: Restart adjoint input file. Objective function abbreviation is expected. \ingroup Config*/ + /*!\brief SOLUTION_ADJ_FILENAME\n DESCRIPTION: Restart adjoint input file. Objective function abbreviation is + * expected. \ingroup Config*/ addStringOption("SOLUTION_ADJ_FILENAME", Solution_AdjFileName, string("solution_adj.dat")); /*!\brief RESTART_FLOW_FILENAME \n DESCRIPTION: Output file restart flow \ingroup Config*/ addStringOption("RESTART_FILENAME", Restart_FileName, string("restart.dat")); - /*!\brief RESTART_ADJ_FILENAME \n DESCRIPTION: Output file restart adjoint. Objective function abbreviation will be appended. \ingroup Config*/ + /*!\brief RESTART_ADJ_FILENAME \n DESCRIPTION: Output file restart adjoint. Objective function abbreviation will be + * appended. \ingroup Config*/ addStringOption("RESTART_ADJ_FILENAME", Restart_AdjFileName, string("restart_adj.dat")); /*!\brief VOLUME_FLOW_FILENAME \n DESCRIPTION: Output file flow (w/o extension) variables \ingroup Config */ addStringOption("VOLUME_FILENAME", Volume_FileName, string("vol_solution")); @@ -2161,7 +2461,7 @@ void CConfig::SetConfig_Options() { /* DESCRIPTION: Type of mesh motion */ addEnumOption("GRID_MOVEMENT", Kind_GridMovement, GridMovement_Map, NO_MOVEMENT); /* DESCRIPTION: Type of surface motion */ - addEnumListOption("SURFACE_MOVEMENT",nKind_SurfaceMovement, Kind_SurfaceMovement, SurfaceMovement_Map); + addEnumListOption("SURFACE_MOVEMENT", nKind_SurfaceMovement, Kind_SurfaceMovement, SurfaceMovement_Map); /* DESCRIPTION: Marker(s) of moving surfaces (MOVING_WALL or DEFORMING grid motion). */ addStringListOption("MARKER_MOVING", nMarker_Moving, Marker_Moving); /* DESCRIPTION: Marker(s) of gradient problem boundaries. */ @@ -2218,7 +2518,8 @@ void CConfig::SetConfig_Options() { addDoubleOption("AIRFOIL_MASS_RATIO", AirfoilMassRatio, 60); /* DESCRIPTION: Distance in semichords by which the center of gravity lies behind the elastic axis. */ addDoubleOption("CG_LOCATION", CG_Location, 1.8); - /* DESCRIPTION: The radius of gyration squared (expressed in semichords) of the typical section about the elastic axis. */ + /* DESCRIPTION: The radius of gyration squared (expressed in semichords) of the typical section about the elastic + * axis. */ addDoubleOption("RADIUS_GYRATION_SQUARED", RadiusGyrationSquared, 3.48); /* DESCRIPTION: Solve the aeroelastic equations every given number of internal iterations. */ addUnsignedShortOption("AEROELASTIC_ITER", AeroelasticIter, 3); @@ -2266,7 +2567,9 @@ void CConfig::SetConfig_Options() { /* DESCRIPTION: Evaluate equivalent area on the Near-Field */ addBoolOption("EQUIV_AREA", EquivArea, false); - ea_lim[0] = 0.0; ea_lim[1] = 1.0; ea_lim[2] = 1.0; + ea_lim[0] = 0.0; + ea_lim[1] = 1.0; + ea_lim[2] = 1.0; /* DESCRIPTION: Integration limits of the equivalent area ( xmin, xmax, Dist_NearField ) */ addDoubleArrayOption("EA_INT_LIMIT", 3, ea_lim); /* DESCRIPTION: Equivalent area scaling factor */ @@ -2305,16 +2608,23 @@ void CConfig::SetConfig_Options() { addDVValueOption("DV_VALUE", nDV_Value, DV_Value, nDV, ParamDV, Design_Variable); /* DESCRIPTION: Provide a file of surface positions from an external parameterization. */ addStringOption("DV_FILENAME", DV_Filename, string("surface_positions.dat")); - /* DESCRIPTION: File of sensitivities as an unordered ASCII file with rows of x, y, z, dJ/dx, dJ/dy, dJ/dz for each volume grid point. */ + /* DESCRIPTION: File of sensitivities as an unordered ASCII file with rows of x, y, z, dJ/dx, dJ/dy, dJ/dz for each + * volume grid point. */ addStringOption("DV_UNORDERED_SENS_FILENAME", DV_Unordered_Sens_Filename, string("unordered_sensitivity.dat")); - /* DESCRIPTION: File of sensitivities as an ASCII file with rows of x, y, z, dJ/dx, dJ/dy, dJ/dz for each surface grid point. */ + /* DESCRIPTION: File of sensitivities as an ASCII file with rows of x, y, z, dJ/dx, dJ/dy, dJ/dz for each surface grid + * point. */ addStringOption("DV_SENS_FILENAME", DV_Sens_Filename, string("surface_sensitivity.dat")); - /*!\brief OUTPUT_FORMAT \n DESCRIPTION: I/O format for output plots. \n OPTIONS: see \link Output_Map \endlink \n DEFAULT: TECPLOT \ingroup Config */ + /*!\brief OUTPUT_FORMAT \n DESCRIPTION: I/O format for output plots. \n OPTIONS: see \link Output_Map \endlink \n + * DEFAULT: TECPLOT \ingroup Config */ addEnumOption("DV_SENSITIVITY_FORMAT", Sensitivity_FileFormat, Sensitivity_Map, SU2_NATIVE); /* DESCRIPTION: Hold the grid fixed in a region */ addBoolOption("HOLD_GRID_FIXED", Hold_GridFixed, false); - grid_fix[0] = -1E15; grid_fix[1] = -1E15; grid_fix[2] = -1E15; - grid_fix[3] = 1E15; grid_fix[4] = 1E15; grid_fix[5] = 1E15; + grid_fix[0] = -1E15; + grid_fix[1] = -1E15; + grid_fix[2] = -1E15; + grid_fix[3] = 1E15; + grid_fix[4] = 1E15; + grid_fix[5] = 1E15; /* DESCRIPTION: Coordinates of the box where the grid will be deformed (Xmin, Ymin, Zmin, Xmax, Ymax, Zmax) */ addDoubleArrayOption("HOLD_GRID_FIXED_COORD", 6, grid_fix); @@ -2330,7 +2640,8 @@ void CConfig::SetConfig_Options() { addDoubleOption("DEFORM_COEFF", Deform_Coeff, 1E6); /* DESCRIPTION: Deform limit in m or inches */ addDoubleOption("DEFORM_LIMIT", Deform_Limit, 1E6); - /* DESCRIPTION: Type of element stiffness imposed for FEA mesh deformation (INVERSE_VOLUME, WALL_DISTANCE, CONSTANT_STIFFNESS) */ + /* DESCRIPTION: Type of element stiffness imposed for FEA mesh deformation (INVERSE_VOLUME, WALL_DISTANCE, + * CONSTANT_STIFFNESS) */ addEnumOption("DEFORM_STIFFNESS_TYPE", Deform_StiffnessType, Deform_Stiffness_Map, SOLID_WALL_DISTANCE); /* DESCRIPTION: Young's modulus for constant stiffness FEA method of grid deformation */ addDoubleOption("DEFORM_ELASTICITY_MODULUS", Deform_ElasticityMod, 2E11); @@ -2338,9 +2649,11 @@ void CConfig::SetConfig_Options() { addDoubleOption("DEFORM_POISSONS_RATIO", Deform_PoissonRatio, 0.3); /* DESCRIPTION: Size of the layer of highest stiffness for wall distance-based mesh stiffness */ addDoubleOption("DEFORM_STIFF_LAYER_SIZE", Deform_StiffLayerSize, 0.0); - /* DESCRIPTION: Linear solver for the mesh deformation\n OPTIONS: see \link Linear_Solver_Map \endlink \n DEFAULT: FGMRES \ingroup Config*/ + /* DESCRIPTION: Linear solver for the mesh deformation\n OPTIONS: see \link Linear_Solver_Map \endlink \n DEFAULT: + * FGMRES \ingroup Config*/ addEnumOption("DEFORM_LINEAR_SOLVER", Kind_Deform_Linear_Solver, Linear_Solver_Map, FGMRES); - /* \n DESCRIPTION: Preconditioner for the Krylov linear solvers \n OPTIONS: see \link Linear_Solver_Prec_Map \endlink \n DEFAULT: LU_SGS \ingroup Config*/ + /* \n DESCRIPTION: Preconditioner for the Krylov linear solvers \n OPTIONS: see \link Linear_Solver_Prec_Map \endlink + * \n DEFAULT: LU_SGS \ingroup Config*/ addEnumOption("DEFORM_LINEAR_SOLVER_PREC", Kind_Deform_Linear_Solver_Prec, Linear_Solver_Prec_Map, ILU); /* DESCRIPTION: Minimum error threshold for the linear solver for the implicit formulation */ addDoubleOption("DEFORM_LINEAR_SOLVER_ERROR", Deform_Linear_Solver_Error, 1E-14); @@ -2381,9 +2694,11 @@ void CConfig::SetConfig_Options() { /*!\par CONFIG_CATEGORY: FEA solver \ingroup Config*/ /*--- Options related to the FEA solver ---*/ - /*!\brief FEA_FILENAME \n DESCRIPTION: Filename to input for element-based properties \n Default: default_element_properties.dat \ingroup Config */ + /*!\brief FEA_FILENAME \n DESCRIPTION: Filename to input for element-based properties \n Default: + * default_element_properties.dat \ingroup Config */ addStringOption("FEA_FILENAME", FEA_FileName, string("default_element_properties.dat")); - /* DESCRIPTION: Determine if advanced features are used from the element-based FEA analysis (NO, YES = experimental) */ + /* DESCRIPTION: Determine if advanced features are used from the element-based FEA analysis (NO, YES = experimental) + */ addBoolOption("FEA_ADVANCED_MODE", FEAAdvancedMode, false); /* DESCRIPTION: Modulus of elasticity */ @@ -2398,7 +2713,7 @@ void CConfig::SetConfig_Options() { addDoubleOption("KNOWLES_N", Knowles_N, 1.0); /* DESCRIPTION: Include DE effects - * Options: NO, YES \ingroup Config */ + * Options: NO, YES \ingroup Config */ addBoolOption("DE_EFFECTS", DE_Effects, false); /*!\brief ELECTRIC_FIELD_CONST \n DESCRIPTION: Value of the Dielectric Elastomer constant */ addDoubleListOption("ELECTRIC_FIELD_CONST", nElectric_Constant, Electric_Constant); @@ -2408,18 +2723,22 @@ void CConfig::SetConfig_Options() { addDoubleListOption("ELECTRIC_FIELD_DIR", nDim_Electric_Field, Electric_Field_Dir); /*!\brief DESIGN_VARIABLE_FEA - * \n DESCRIPTION: Design variable for FEA problems \n OPTIONS: See \link DVFEA_Map \endlink \n DEFAULT VENKATAKRISHNAN \ingroup Config */ + * \n DESCRIPTION: Design variable for FEA problems \n OPTIONS: See \link DVFEA_Map \endlink \n DEFAULT + * VENKATAKRISHNAN \ingroup Config */ addEnumOption("DESIGN_VARIABLE_FEA", Kind_DV_FEA, DVFEA_Map, NODV_FEA); /* DESCRIPTION: Consider a reference solution for the structure (optimization applications) - * Options: NO, YES \ingroup Config */ + * Options: NO, YES \ingroup Config */ addBoolOption("REFERENCE_GEOMETRY", RefGeom, false); /*!\brief REFERENCE_GEOMETRY_PENALTY\n DESCRIPTION: Penalty weight value for the objective function \ingroup Config*/ addDoubleOption("REFERENCE_GEOMETRY_PENALTY", RefGeom_Penalty, 1E6); - /*!\brief REFERENCE_GEOMETRY_FILENAME \n DESCRIPTION: Reference geometry filename \n Default: reference_geometry.dat \ingroup Config */ + /*!\brief REFERENCE_GEOMETRY_FILENAME \n DESCRIPTION: Reference geometry filename \n Default: reference_geometry.dat + * \ingroup Config */ addStringOption("REFERENCE_GEOMETRY_FILENAME", RefGeom_FEMFileName, string("reference_geometry.dat")); - /*!\brief REFERENCE_GEOMETRY_FORMAT \n DESCRIPTION: Format of the reference geometry file \n OPTIONS: see \link Input_Ref_Map \endlink \n DEFAULT: SU2 \ingroup Config*/ + /*!\brief REFERENCE_GEOMETRY_FORMAT \n DESCRIPTION: Format of the reference geometry file \n OPTIONS: see \link + * Input_Ref_Map \endlink \n DEFAULT: SU2 \ingroup Config*/ addEnumOption("REFERENCE_GEOMETRY_FORMAT", RefGeom_FileFormat, Input_Ref_Map, SU2_REF); - /*!\brief REFERENCE_GEOMETRY_SURFACE\n DESCRIPTION: If true consider only the surfaces where loads are applied. \ingroup Config*/ + /*!\brief REFERENCE_GEOMETRY_SURFACE\n DESCRIPTION: If true consider only the surfaces where loads are applied. + * \ingroup Config*/ addBoolOption("REFERENCE_GEOMETRY_SURFACE", RefGeomSurf, false); /*!\brief REFERENCE_NODE\n DESCRIPTION: Reference node for the structure (optimization applications) */ @@ -2429,23 +2748,27 @@ void CConfig::SetConfig_Options() { /*!\brief REFERENCE_NODE_PENALTY\n DESCRIPTION: Penalty weight value for the objective function \ingroup Config*/ addDoubleOption("REFERENCE_NODE_PENALTY", RefNode_Penalty, 1E3); - /*!\brief TOTAL_DV_PENALTY\n DESCRIPTION: Penalty weight value to maintain the total sum of DV constant \ingroup Config*/ + /*!\brief TOTAL_DV_PENALTY\n DESCRIPTION: Penalty weight value to maintain the total sum of DV constant \ingroup + * Config*/ addDoubleOption("TOTAL_DV_PENALTY", DV_Penalty, 0); - /*!\brief STRESS_PENALTY_PARAM\n DESCRIPTION: Maximum allowed stress and KS exponent for structural optimization \ingroup Config*/ + /*!\brief STRESS_PENALTY_PARAM\n DESCRIPTION: Maximum allowed stress and KS exponent for structural optimization + * \ingroup Config*/ addDoubleArrayOption("STRESS_PENALTY_PARAM", 2, StressPenaltyParam.data()); /*!\brief REGIME_TYPE \n DESCRIPTION: Geometric condition \n OPTIONS: see \link Struct_Map \endlink \ingroup Config*/ addEnumOption("GEOMETRIC_CONDITIONS", Kind_Struct_Solver, Struct_Map, STRUCT_DEFORMATION::SMALL); /*!\brief REGIME_TYPE \n DESCRIPTION: Material model \n OPTIONS: see \link Material_Map \endlink \ingroup Config*/ addEnumOption("MATERIAL_MODEL", Kind_Material, Material_Map, STRUCT_MODEL::LINEAR_ELASTIC); - /*!\brief REGIME_TYPE \n DESCRIPTION: Compressibility of the material \n OPTIONS: see \link MatComp_Map \endlink \ingroup Config*/ + /*!\brief REGIME_TYPE \n DESCRIPTION: Compressibility of the material \n OPTIONS: see \link MatComp_Map \endlink + * \ingroup Config*/ addEnumOption("MATERIAL_COMPRESSIBILITY", Kind_Material_Compress, MatComp_Map, STRUCT_COMPRESS::COMPRESSIBLE); /* DESCRIPTION: Consider a prestretch in the structural domain - * Options: NO, YES \ingroup Config */ + * Options: NO, YES \ingroup Config */ addBoolOption("PRESTRETCH", Prestretch, false); - /*!\brief PRESTRETCH_FILENAME \n DESCRIPTION: Filename to input for prestretching membranes \n Default: prestretch_file.dat \ingroup Config */ + /*!\brief PRESTRETCH_FILENAME \n DESCRIPTION: Filename to input for prestretching membranes \n Default: + * prestretch_file.dat \ingroup Config */ addStringOption("PRESTRETCH_FILENAME", Prestretch_FEMFileName, string("prestretch_file.dat")); /* DESCRIPTION: Iterative method for non-linear structural analysis */ @@ -2453,10 +2776,10 @@ void CConfig::SetConfig_Options() { /* DESCRIPTION: Formulation for bidimensional elasticity solver */ addEnumOption("FORMULATION_ELASTICITY_2D", Kind_2DElasForm, ElasForm_2D, STRUCT_2DFORM::PLANE_STRAIN); /* DESCRIPTION: Apply dead loads - * Options: NO, YES \ingroup Config */ + * Options: NO, YES \ingroup Config */ addBoolOption("DEAD_LOAD", DeadLoad, false); /* DESCRIPTION: Temporary: pseudo static analysis (no density in dynamic analysis) - * Options: NO, YES \ingroup Config */ + * Options: NO, YES \ingroup Config */ addBoolOption("PSEUDO_STATIC", PseudoStatic, false); /* DESCRIPTION: Parameter alpha for Newmark scheme (s) */ addDoubleOption("NEWMARK_BETA", Newmark_beta, 0.25); @@ -2477,7 +2800,9 @@ void CConfig::SetConfig_Options() { /* DESCRIPTION: Maximum number of increments of the */ addUnsignedLongOption("NUMBER_INCREMENTS", IncLoad_Nincrements, 10); - inc_crit[0] = 0.0; inc_crit[1] = 0.0; inc_crit[2] = 0.0; + inc_crit[0] = 0.0; + inc_crit[1] = 0.0; + inc_crit[2] = 0.0; /* DESCRIPTION: Definition of the UTOL RTOL ETOL*/ addDoubleArrayOption("INCREMENTAL_CRITERIA", 3, inc_crit); @@ -2495,7 +2820,8 @@ void CConfig::SetConfig_Options() { addDoubleListOption("TOPOL_OPTIM_FILTER_RADIUS", top_optim_nRadius, top_optim_filter_radius); addDoubleListOption("TOPOL_OPTIM_KERNEL_PARAM", top_optim_nKernelParams, top_optim_kernel_params); addUnsignedShortOption("TOPOL_OPTIM_SEARCH_LIMIT", top_optim_search_lim, 0); - addEnumOption("TOPOL_OPTIM_PROJECTION_TYPE", top_optim_proj_type, Projection_Function_Map, ENUM_PROJECTION_FUNCTION::NONE); + addEnumOption("TOPOL_OPTIM_PROJECTION_TYPE", top_optim_proj_type, Projection_Function_Map, + ENUM_PROJECTION_FUNCTION::NONE); addDoubleOption("TOPOL_OPTIM_PROJECTION_PARAM", top_optim_proj_param, 0.0); /* CONFIG_CATEGORY: FSI solver */ @@ -2541,7 +2867,6 @@ void CConfig::SetConfig_Options() { /* DESCRIPTION: Determines if the forces breakdown is written out */ addBoolOption("WRT_FORCES_BREAKDOWN", Wrt_ForcesBreakdown, false); - /*!\par KIND_INTERPOLATION \n * DESCRIPTION: Type of interpolation to use for multi-zone problems. \n OPTIONS: see \link Interpolator_Map \endlink * Sets Kind_Interpolation \ingroup Config @@ -2554,13 +2879,14 @@ void CConfig::SetConfig_Options() { addUnsignedShortOption("NUM_NEAREST_NEIGHBORS", NumNearestNeighbors, 1); /*!\par KIND_INTERPOLATION \n - * DESCRIPTION: Type of radial basis function to use for radial basis function interpolation. \n OPTIONS: see \link RadialBasis_Map \endlink - * Sets Kind_RadialBasis \ingroup Config + * DESCRIPTION: Type of radial basis function to use for radial basis function interpolation. \n OPTIONS: see \link + * RadialBasis_Map \endlink Sets Kind_RadialBasis \ingroup Config */ - addEnumOption("KIND_RADIAL_BASIS_FUNCTION", Kind_RadialBasisFunction, RadialBasisFunction_Map, RADIAL_BASIS::WENDLAND_C2); + addEnumOption("KIND_RADIAL_BASIS_FUNCTION", Kind_RadialBasisFunction, RadialBasisFunction_Map, + RADIAL_BASIS::WENDLAND_C2); /* DESCRIPTION: Use polynomial term in radial basis function interpolation. - * Options: NO, YES \ingroup Config */ + * Options: NO, YES \ingroup Config */ addBoolOption("RADIAL_BASIS_FUNCTION_POLYNOMIAL_TERM", RadialBasisFunction_PolynomialOption, true); /* DESCRIPTION: Radius for radial basis function. */ @@ -2569,17 +2895,19 @@ void CConfig::SetConfig_Options() { /* DESCRIPTION: Tolerance to prune small coefficients from the RBF interpolation matrix. */ addDoubleOption("RADIAL_BASIS_FUNCTION_PRUNE_TOLERANCE", RadialBasisFunction_PruneTol, 1e-6); - /*!\par INLETINTERPOLATION \n - * DESCRIPTION: Type of spanwise interpolation to use for the inlet face. \n OPTIONS: see \link Inlet_SpanwiseInterpolation_Map \endlink - * Sets Kind_InletInterpolation \ingroup Config + /*!\par INLETINTERPOLATION \n + * DESCRIPTION: Type of spanwise interpolation to use for the inlet face. \n OPTIONS: see \link + * Inlet_SpanwiseInterpolation_Map \endlink Sets Kind_InletInterpolation \ingroup Config */ - addEnumOption("INLET_INTERPOLATION_FUNCTION",Kind_InletInterpolationFunction, Inlet_SpanwiseInterpolation_Map, INLET_SPANWISE_INTERP::NONE); + addEnumOption("INLET_INTERPOLATION_FUNCTION", Kind_InletInterpolationFunction, Inlet_SpanwiseInterpolation_Map, + INLET_SPANWISE_INTERP::NONE); - /*!\par INLETINTERPOLATION \n - * DESCRIPTION: Type of spanwise interpolation to use for the inlet face. \n OPTIONS: see \link Inlet_SpanwiseInterpolation_Map \endlink - * Sets Kind_InletInterpolation \ingroup Config + /*!\par INLETINTERPOLATION \n + * DESCRIPTION: Type of spanwise interpolation to use for the inlet face. \n OPTIONS: see \link + * Inlet_SpanwiseInterpolation_Map \endlink Sets Kind_InletInterpolation \ingroup Config */ - addEnumOption("INLET_INTERPOLATION_DATA_TYPE", Kind_Inlet_InterpolationType, Inlet_SpanwiseInterpolationType_Map, INLET_INTERP_TYPE::VR_VTHETA); + addEnumOption("INLET_INTERPOLATION_DATA_TYPE", Kind_Inlet_InterpolationType, Inlet_SpanwiseInterpolationType_Map, + INLET_INTERP_TYPE::VR_VTHETA); addBoolOption("PRINT_INLET_INTERPOLATED_DATA", PrintInlet_InterpolatedData, false); @@ -2617,10 +2945,14 @@ void CConfig::SetConfig_Options() { /* DESCRIPTION: Rotation of the volumetric heat source respect to Z axis */ addDoubleOption("HEAT_SOURCE_ROTATION_Z", Heat_Source_Rot_Z, 0.0); /* DESCRIPTION: Position of heat source center (Heat_Source_Center_X, Heat_Source_Center_Y, Heat_Source_Center_Z) */ - hs_center[0] = 0.0; hs_center[1] = 0.0; hs_center[2] = 0.0; + hs_center[0] = 0.0; + hs_center[1] = 0.0; + hs_center[2] = 0.0; addDoubleArrayOption("HEAT_SOURCE_CENTER", 3, hs_center); /* DESCRIPTION: Vector of heat source radii (Heat_Source_Axes_A, Heat_Source_Axes_B, Heat_Source_Axes_C) */ - hs_axes[0] = 1.0; hs_axes[1] = 1.0; hs_axes[2] = 1.0; + hs_axes[0] = 1.0; + hs_axes[1] = 1.0; + hs_axes[2] = 1.0; addDoubleArrayOption("HEAT_SOURCE_AXES", 3, hs_axes); /*!\brief MARKER_EMISSIVITY DESCRIPTION: Wall emissivity of the marker for radiation purposes \n @@ -2635,7 +2967,8 @@ void CConfig::SetConfig_Options() { /* DESCRIPTION: CHT interface coupling methods */ /* Options: NO, YES \ingroup Config */ - addEnumOption("CHT_COUPLING_METHOD", Kind_CHT_Coupling, CHT_Coupling_Map, CHT_COUPLING::DIRECT_TEMPERATURE_ROBIN_HEATFLUX); + addEnumOption("CHT_COUPLING_METHOD", Kind_CHT_Coupling, CHT_Coupling_Map, + CHT_COUPLING::DIRECT_TEMPERATURE_ROBIN_HEATFLUX); /*!\par CONFIG_CATEGORY: Visualize Control Volumes \ingroup Config*/ /*--- options related to visualizing control volumes ---*/ @@ -2680,7 +3013,9 @@ void CConfig::SetConfig_Options() { addEnumOption("FFD_COORD_SYSTEM", FFD_CoordSystem, CoordSystem_Map, CARTESIAN); /* DESCRIPTION: Axis information for the spherical and cylindrical coord system */ - ffd_axis[0] = 0.0; ffd_axis[1] = 0.0; ffd_axis[2] =0.0; + ffd_axis[0] = 0.0; + ffd_axis[1] = 0.0; + ffd_axis[2] = 0.0; addDoubleArrayOption("FFD_AXIS", 3, ffd_axis); /* DESCRIPTION: Number of total iterations in the FFD point inversion */ @@ -2717,10 +3052,12 @@ void CConfig::SetConfig_Options() { addEnumOption("FFD_CONTINUITY", FFD_Continuity, Continuity_Map, DERIVATIVE_2ND); /* DESCRIPTION: Kind of blending for the FFD definition */ - addEnumOption("FFD_BLENDING", FFD_Blending, Blending_Map, BEZIER ); + addEnumOption("FFD_BLENDING", FFD_Blending, Blending_Map, BEZIER); /* DESCRIPTION: Order of the BSplines for BSpline Blending function */ - ffd_coeff[0] = 2; ffd_coeff[1] = 2; ffd_coeff[2] = 2; + ffd_coeff[0] = 2; + ffd_coeff[1] = 2; + ffd_coeff[2] = 2; addDoubleArrayOption("FFD_BSPLINE_ORDER", 3, ffd_coeff); /*--- Options for the automatic differentiation methods ---*/ @@ -2925,11 +3262,9 @@ void CConfig::SetConfig_Options() { addUnsignedShortOption("ROM_SAVE_FREQ", rom_save_freq, 1); /* END_CONFIG_OPTIONS */ - } void CConfig::SetConfig_Parsing(char case_filename[MAX_STRING_SIZE]) { - ifstream case_file; /*--- Read the configuration file ---*/ @@ -2943,32 +3278,29 @@ void CConfig::SetConfig_Parsing(char case_filename[MAX_STRING_SIZE]) { SetConfig_Parsing(case_file); case_file.close(); - } -void CConfig::SetConfig_Parsing(istream& config_buffer){ - +void CConfig::SetConfig_Parsing(istream& config_buffer) { string text_line, option_name; vector option_value; string errorString; - const int max_err_count = 30; // Maximum number of errors to print before stopping - int err_count = 0; // How many errors have we found in the config file + const int max_err_count = 30; // Maximum number of errors to print before stopping + int err_count = 0; // How many errors have we found in the config file int line_count = 1; map included_options; /*--- Parse the configuration file and set the options ---*/ - while (getline (config_buffer, text_line)) { - + while (getline(config_buffer, text_line)) { if (err_count >= max_err_count) { errorString.append("Too many errors, stopping parse."); break; } - PrintingToolbox::trim(text_line); + PrintingToolbox::trim(text_line); /*--- Check if there is a line continuation character at the * end of the current line or somewhere in between (the rest is ignored then). @@ -2976,74 +3308,78 @@ void CConfig::SetConfig_Parsing(istream& config_buffer){ * If there is a statement after a cont. char * throw an error. ---*/ - if (!text_line.empty() && (text_line.front() != '%')){ - while (text_line.back() == '\\' || - (PrintingToolbox::split(text_line, '\\').size() > 1)){ - string tmp; - getline (config_buffer, tmp); - line_count++; - if (tmp.find_first_of('=') != string::npos){ - errorString.append("Line " + to_string(line_count) + ": Statement found after continuation character.\n"); - } - PrintingToolbox::trim(tmp); - if (tmp.front() != '%'){ - text_line = PrintingToolbox::split(text_line, '\\')[0]; - text_line += " " + tmp; - } - } - } + if (!text_line.empty() && (text_line.front() != '%')) { + while (text_line.back() == '\\' || (PrintingToolbox::split(text_line, '\\').size() > 1)) { + string tmp; + getline(config_buffer, tmp); + line_count++; + if (tmp.find_first_of('=') != string::npos) { + errorString.append("Line " + to_string(line_count) + ": Statement found after continuation character.\n"); + } + PrintingToolbox::trim(tmp); + if (tmp.front() != '%') { + text_line = PrintingToolbox::split(text_line, '\\')[0]; + text_line += " " + tmp; + } + } + } if (TokenizeString(text_line, option_name, option_value)) { /*--- See if it's a python option ---*/ if (option_map.find(option_name) == option_map.end()) { - string newString; - newString.append("Line " + to_string(line_count) + " " + option_name); - newString.append(": invalid option name"); - newString.append(". Check current SU2 options in config_template.cfg."); - newString.append("\n"); - if (!option_name.compare("SINGLEZONE_DRIVER")) - newString.append("Option SINGLEZONE_DRIVER is deprecated, it does not have a replacement.\n\n"); - else if (!option_name.compare("DYN_TIMESTEP")) - newString.append("DYN_TIMESTEP is deprecated. Use TIME_STEP instead.\n\n"); - else if (!option_name.compare("DYN_TIME")) - newString.append("DYN_TIME is deprecated. Use MAX_TIME instead.\n\n"); - else if (!option_name.compare("DYNAMIC_ANALYSIS")) - newString.append("DYNAMIC_ANALYSIS is deprecated. Use TIME_DOMAIN instead.\n\n"); - else if (!option_name.compare("SPECIES_USE_STRONG_BC")) - newString.append("SPECIES_USE_STRONG_BC is deprecated. Use MARKER_SPECIES_STRONG_BC= (marker1, ...) instead.\n\n"); - else { - /*--- Find the most likely candidate for the unrecognized option, based on the length - of start and end character sequences shared by candidates and the option. ---*/ - auto countMatchChars = [&option_name](const string& candidate) { - const size_t sz1 = option_name.size(), sz2 = candidate.size(); - size_t nMatch = 0; - for (size_t i=0; i maxScore) { - maxScore = score; - match = candidate.first; - } + string newString; + newString.append("Line " + to_string(line_count) + " " + option_name); + newString.append(": invalid option name"); + newString.append(". Check current SU2 options in config_template.cfg."); + newString.append("\n"); + if (!option_name.compare("SINGLEZONE_DRIVER")) + newString.append("Option SINGLEZONE_DRIVER is deprecated, it does not have a replacement.\n\n"); + else if (!option_name.compare("DYN_TIMESTEP")) + newString.append("DYN_TIMESTEP is deprecated. Use TIME_STEP instead.\n\n"); + else if (!option_name.compare("DYN_TIME")) + newString.append("DYN_TIME is deprecated. Use MAX_TIME instead.\n\n"); + else if (!option_name.compare("DYNAMIC_ANALYSIS")) + newString.append("DYNAMIC_ANALYSIS is deprecated. Use TIME_DOMAIN instead.\n\n"); + else if (!option_name.compare("SPECIES_USE_STRONG_BC")) + newString.append( + "SPECIES_USE_STRONG_BC is deprecated. Use MARKER_SPECIES_STRONG_BC= (marker1, ...) instead.\n\n"); + else { + /*--- Find the most likely candidate for the unrecognized option, based on the length + of start and end character sequences shared by candidates and the option. ---*/ + auto countMatchChars = [&option_name](const string& candidate) { + const size_t sz1 = option_name.size(), sz2 = candidate.size(); + size_t nMatch = 0; + for (size_t i = 0; i < min(sz1, sz2); ++i) { + if (option_name[i] == candidate[i]) + nMatch++; + else + break; + } + for (size_t i = 0; i < min(sz1, sz2); ++i) { + if (option_name[sz1 - 1 - i] == candidate[sz2 - 1 - i]) + nMatch++; + else + break; + } + return nMatch; + }; + string match; + size_t maxScore = 0; + for (auto& candidate : option_map) { + auto score = countMatchChars(candidate.first); + if (score > maxScore) { + maxScore = score; + match = candidate.first; } - newString.append("Did you mean "); - newString.append(match); - newString.append("?\n"); } - errorString.append(newString); - err_count++; - line_count++; + newString.append("Did you mean "); + newString.append(match); + newString.append("?\n"); + } + errorString.append(newString); + err_count++; + line_count++; continue; } @@ -3051,7 +3387,7 @@ void CConfig::SetConfig_Parsing(istream& config_buffer){ if (included_options.find(option_name) != included_options.end()) { string newString; - newString.append("Line " + to_string(line_count) + " " + option_name); + newString.append("Line " + to_string(line_count) + " " + option_name); newString.append(": option appears twice"); newString.append("\n"); errorString.append(newString); @@ -3072,18 +3408,27 @@ void CConfig::SetConfig_Parsing(istream& config_buffer){ /*--- valid option, but deprecated value ---*/ if (!option_name.compare("KIND_TURB_MODEL")) { if (option_value[0] == "SST_SUST") - errorString.append("Option KIND_TURB_MODEL=SST_SUST is deprecated. Use KIND_TURB_MODEL=SST, SST_OPTIONS=SUSTAINING instead.\n"); + errorString.append( + "Option KIND_TURB_MODEL=SST_SUST is deprecated. Use KIND_TURB_MODEL=SST, SST_OPTIONS=SUSTAINING " + "instead.\n"); else if (option_value[0] == "SA_NEG") - errorString.append("Option KIND_TURB_MODEL=SA_NEG is deprecated. Use KIND_TURB_MODEL=SA, SA_OPTIONS=NEGATIVE instead.\n"); + errorString.append( + "Option KIND_TURB_MODEL=SA_NEG is deprecated. Use KIND_TURB_MODEL=SA, SA_OPTIONS=NEGATIVE instead.\n"); else if (option_value[0] == "SA_E") - errorString.append("Option KIND_TURB_MODEL=SA_E is deprecated. Use KIND_TURB_MODEL=SA, SA_OPTIONS=EDWARDS instead.\n"); + errorString.append( + "Option KIND_TURB_MODEL=SA_E is deprecated. Use KIND_TURB_MODEL=SA, SA_OPTIONS=EDWARDS instead.\n"); else if (option_value[0] == "SA_COMP") - errorString.append("Option KIND_TURB_MODEL=SA_COMP is deprecated. Use KIND_TURB_MODEL=SA, SA_OPTIONS=COMPRESSIBILITY instead.\n"); + errorString.append( + "Option KIND_TURB_MODEL=SA_COMP is deprecated. Use KIND_TURB_MODEL=SA, SA_OPTIONS=COMPRESSIBILITY " + "instead.\n"); else if (option_value[0] == "SA_E_COMP") - errorString.append("Option KIND_TURB_MODEL=SA_E_COMP is deprecated. Use KIND_TURB_MODEL=SA, SA_OPTIONS=EDWARDS,COMPRESSIBILITY instead.\n"); + errorString.append( + "Option KIND_TURB_MODEL=SA_E_COMP is deprecated. Use KIND_TURB_MODEL=SA, " + "SA_OPTIONS=EDWARDS,COMPRESSIBILITY instead.\n"); } else if (!option_name.compare("KIND_TRANS_MODEL")) { if (option_value[0] == "BC") - errorString.append("Option KIND_TRANS_MODEL=BC is deprecated. Use KIND_TURB_MODEL=SA, SA_OPTIONS=BCM instead.\n"); + errorString.append( + "Option KIND_TRANS_MODEL=BC is deprecated. Use KIND_TURB_MODEL=SA, SA_OPTIONS=BCM instead.\n"); } errorString.append(out); errorString.append("\n"); @@ -3100,28 +3445,25 @@ void CConfig::SetConfig_Parsing(istream& config_buffer){ } } -void CConfig::SetDefaultFromConfig(CConfig *config){ - - map noInheritance = {{"SCREEN_OUTPUT", true},{"HISTORY_OUTPUT", true}}; +void CConfig::SetDefaultFromConfig(CConfig* config) { + map noInheritance = {{"SCREEN_OUTPUT", true}, {"HISTORY_OUTPUT", true}}; map::iterator iter = all_options.begin(), curr_iter; - while (iter != all_options.end()){ + while (iter != all_options.end()) { curr_iter = iter++; - if (!config->option_map[curr_iter->first]->GetValue().empty() && !noInheritance[curr_iter->first]){ + if (!config->option_map[curr_iter->first]->GetValue().empty() && !noInheritance[curr_iter->first]) { option_map[curr_iter->first]->SetValue(config->option_map[curr_iter->first]->GetValue()); all_options.erase(curr_iter); } } } -void CConfig::SetDefault(){ - +void CConfig::SetDefault() { /*--- Set the default values for all of the options that weren't set ---*/ for (auto iter = all_options.begin(); iter != all_options.end(); ++iter) { - if (option_map[iter->first]->GetValue().empty()) - option_map[iter->first]->SetDefault(); + if (option_map[iter->first]->GetValue().empty()) option_map[iter->first]->SetDefault(); } } @@ -3134,28 +3476,27 @@ bool CConfig::SetRunTime_Parsing(char case_filename[MAX_STRING_SIZE]) { case_file.open(case_filename, ios::in); - if (case_file.fail()) { return false; } + if (case_file.fail()) { + return false; + } string errorString; - int err_count = 0; // How many errors have we found in the config file - const int max_err_count = 30; // Maximum number of errors to print before stopping + int err_count = 0; // How many errors have we found in the config file + const int max_err_count = 30; // Maximum number of errors to print before stopping map included_options; /*--- Parse the configuration file and set the options ---*/ - while (getline (case_file, text_line)) { - + while (getline(case_file, text_line)) { if (err_count >= max_err_count) { errorString.append("Too many errors, stopping parse."); break; } if (TokenizeString(text_line, option_name, option_value)) { - if (option_map.find(option_name) == option_map.end()) { - /*--- See if it's a python option ---*/ string newString; @@ -3192,7 +3533,6 @@ bool CConfig::SetRunTime_Parsing(char case_filename[MAX_STRING_SIZE]) { errorString.append("\n"); err_count++; } - } } @@ -3211,11 +3551,9 @@ bool CConfig::SetRunTime_Parsing(char case_filename[MAX_STRING_SIZE]) { case_file.close(); return true; - } -void CConfig::SetHeader(SU2_COMPONENT val_software) const{ - +void CConfig::SetHeader(SU2_COMPONENT val_software) const { if ((iZone == 0) && (rank == MASTER_NODE)) { cout << "\n"; cout << "-------------------------------------------------------------------------\n"; @@ -3223,11 +3561,21 @@ void CConfig::SetHeader(SU2_COMPONENT val_software) const{ cout << "| / __| | | |_ ) Release 7.5.1 \"Blackbird\" |\n"; cout << "| \\__ \\ |_| |/ / |\n"; switch (val_software) { - case SU2_COMPONENT::SU2_CFD: cout << "| |___/\\___//___| Suite (Computational Fluid Dynamics Code) |\n"; break; - case SU2_COMPONENT::SU2_DEF: cout << "| |___/\\___//___| Suite (Mesh Deformation Code) |\n"; break; - case SU2_COMPONENT::SU2_DOT: cout << "| |___/\\___//___| Suite (Gradient Projection Code) |\n"; break; - case SU2_COMPONENT::SU2_GEO: cout << "| |___/\\___//___| Suite (Geometry Definition Code) |\n"; break; - case SU2_COMPONENT::SU2_SOL: cout << "| |___/\\___//___| Suite (Solution Exporting Code) |\n"; break; + case SU2_COMPONENT::SU2_CFD: + cout << "| |___/\\___//___| Suite (Computational Fluid Dynamics Code) |\n"; + break; + case SU2_COMPONENT::SU2_DEF: + cout << "| |___/\\___//___| Suite (Mesh Deformation Code) |\n"; + break; + case SU2_COMPONENT::SU2_DOT: + cout << "| |___/\\___//___| Suite (Gradient Projection Code) |\n"; + break; + case SU2_COMPONENT::SU2_GEO: + cout << "| |___/\\___//___| Suite (Geometry Definition Code) |\n"; + break; + case SU2_COMPONENT::SU2_SOL: + cout << "| |___/\\___//___| Suite (Solution Exporting Code) |\n"; + break; } cout << "| |\n"; cout << "-------------------------------------------------------------------------\n"; @@ -3252,90 +3600,80 @@ void CConfig::SetHeader(SU2_COMPONENT val_software) const{ cout << "| License along with SU2. If not, see . |\n"; cout << "-------------------------------------------------------------------------" << endl; } - } -void CConfig::SetnZone(){ - +void CConfig::SetnZone() { /*--- Just as a clarification --- */ - if (Multizone_Problem == NO && Kind_Solver != MAIN_SOLVER::MULTIPHYSICS){ + if (Multizone_Problem == NO && Kind_Solver != MAIN_SOLVER::MULTIPHYSICS) { nZone = 1; } - if (Kind_Solver == MAIN_SOLVER::MULTIPHYSICS){ + if (Kind_Solver == MAIN_SOLVER::MULTIPHYSICS) { Multizone_Problem = YES; - if (nConfig_Files == 0){ + if (nConfig_Files == 0) { SU2_MPI::Error("CONFIG_LIST must be provided if PHYSICAL_PROBLEM=MULTIPHYSICS", CURRENT_FUNCTION); } } - if (Multizone_Problem == YES){ - + if (Multizone_Problem == YES) { /*--- Some basic multizone checks ---*/ - if (nMarker_ZoneInterface % 2 != 0){ + if (nMarker_ZoneInterface % 2 != 0) { SU2_MPI::Error("Number of markers in MARKER_ZONE_INTERFACE must be a multiple of 2", CURRENT_FUNCTION); } - if (Multizone_Mesh){ - + if (Multizone_Mesh) { /*--- Get the number of zones from the mesh file --- */ nZone = GetnZone(Mesh_FileName, Mesh_FileFormat); /*--- If config list is set, make sure number matches number of zones in mesh file --- */ - if (nConfig_Files != 0 && (nZone != nConfig_Files)){ + if (nConfig_Files != 0 && (nZone != nConfig_Files)) { SU2_MPI::Error("Number of CONFIG_LIST must match number of zones in mesh file.", CURRENT_FUNCTION); } } else { - /*--- Number of zones is determined from the number of config files provided --- */ - if (nConfig_Files == 0){ - SU2_MPI::Error("If MULTIZONE_MESH is set to YES, you must provide a list of config files using CONFIG_LIST option", CURRENT_FUNCTION); + if (nConfig_Files == 0) { + SU2_MPI::Error( + "If MULTIZONE_MESH is set to YES, you must provide a list of config files using CONFIG_LIST option", + CURRENT_FUNCTION); } nZone = nConfig_Files; - } /*--- Check if subconfig files exist --- */ - if (nConfig_Files != 0){ - for (unsigned short iConfig = 0; iConfig < nConfig_Files; iConfig++){ + if (nConfig_Files != 0) { + for (unsigned short iConfig = 0; iConfig < nConfig_Files; iConfig++) { ifstream f(Config_Filenames[iConfig].c_str()); - if (!f.good()){ - SU2_MPI::Error("Config file " + Config_Filenames[iConfig] + " defined in CONFIG_FILES does not exist", CURRENT_FUNCTION); + if (!f.good()) { + SU2_MPI::Error("Config file " + Config_Filenames[iConfig] + " defined in CONFIG_FILES does not exist", + CURRENT_FUNCTION); } } } - } - } void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_izone, unsigned short val_nDim) { - unsigned short iCFL, iMarker; - bool ideal_gas = ((Kind_FluidModel == STANDARD_AIR) || - (Kind_FluidModel == IDEAL_GAS) || - (Kind_FluidModel == INC_IDEAL_GAS) || - (Kind_FluidModel == FLUID_MIXTURE) || - (Kind_FluidModel == FLUID_FLAMELET) || - (Kind_FluidModel == INC_IDEAL_GAS_POLY) || - (Kind_FluidModel == CONSTANT_DENSITY)); - bool noneq_gas = ((Kind_FluidModel == MUTATIONPP) || - (Kind_FluidModel == SU2_NONEQ)); + bool ideal_gas = + ((Kind_FluidModel == STANDARD_AIR) || (Kind_FluidModel == IDEAL_GAS) || (Kind_FluidModel == INC_IDEAL_GAS) || + (Kind_FluidModel == FLUID_MIXTURE) || (Kind_FluidModel == FLUID_FLAMELET) || + (Kind_FluidModel == INC_IDEAL_GAS_POLY) || (Kind_FluidModel == CONSTANT_DENSITY)); + bool noneq_gas = ((Kind_FluidModel == MUTATIONPP) || (Kind_FluidModel == SU2_NONEQ)); bool standard_air = ((Kind_FluidModel == STANDARD_AIR)); bool nemo = GetNEMOProblem(); - if (nZone > 1){ + if (nZone > 1) { Multizone_Problem = YES; } /*--- Set the default output files ---*/ - if (!OptionIsSet("OUTPUT_FILES")){ + if (!OptionIsSet("OUTPUT_FILES")) { nVolumeOutputFiles = 3; VolumeOutputFiles = new OUTPUT_TYPE[nVolumeOutputFiles]; VolumeOutputFiles[0] = OUTPUT_TYPE::RESTART_BINARY; @@ -3344,35 +3682,38 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i } /*--- Set the default output frequencies ---*/ - if (!OptionIsSet("OUTPUT_WRT_FREQ")){ + if (!OptionIsSet("OUTPUT_WRT_FREQ")) { nVolumeOutputFrequencies = nVolumeOutputFiles; - VolumeOutputFrequencies = new unsigned long [nVolumeOutputFrequencies]; + VolumeOutputFrequencies = new unsigned long[nVolumeOutputFrequencies]; /*--- Using default frequency of 250 for all files when steady, and 1 for unsteady. ---*/ - for (auto iVolumeFreq = 0; iVolumeFreq < nVolumeOutputFrequencies; iVolumeFreq++){ + for (auto iVolumeFreq = 0; iVolumeFreq < nVolumeOutputFrequencies; iVolumeFreq++) { VolumeOutputFrequencies[iVolumeFreq] = Time_Domain ? 1 : 250; } } else if (nVolumeOutputFrequencies < nVolumeOutputFiles) { /*--- If there are fewer frequencies than files, repeat the last frequency. - * This is useful to define 1 frequency for the restart file and 1 frequency for all the visualization files. ---*/ + * This is useful to define 1 frequency for the restart file and 1 frequency for all the visualization files. + * ---*/ auto* newFrequencies = new unsigned long[nVolumeOutputFiles]; for (unsigned short i = 0; i < nVolumeOutputFrequencies; ++i) { newFrequencies[i] = VolumeOutputFrequencies[i]; } for (auto i = nVolumeOutputFrequencies; i < nVolumeOutputFiles; ++i) { - newFrequencies[i] = newFrequencies[i-1]; + newFrequencies[i] = newFrequencies[i - 1]; } - delete [] VolumeOutputFrequencies; + delete[] VolumeOutputFrequencies; VolumeOutputFrequencies = newFrequencies; nVolumeOutputFrequencies = nVolumeOutputFiles; } /*--- Check if SU2 was build with TecIO support, as that is required for Tecplot Binary output. ---*/ #ifndef HAVE_TECIO - for (unsigned short iVolumeFile = 0; iVolumeFile < nVolumeOutputFiles; iVolumeFile++){ + for (unsigned short iVolumeFile = 0; iVolumeFile < nVolumeOutputFiles; iVolumeFile++) { if (VolumeOutputFiles[iVolumeFile] == OUTPUT_TYPE::TECPLOT_BINARY || VolumeOutputFiles[iVolumeFile] == OUTPUT_TYPE::SURFACE_TECPLOT_BINARY) { - SU2_MPI::Error(string("Tecplot binary file requested in option OUTPUT_FILES but SU2 was built without TecIO support.\n"), CURRENT_FUNCTION); + SU2_MPI::Error( + string("Tecplot binary file requested in option OUTPUT_FILES but SU2 was built without TecIO support.\n"), + CURRENT_FUNCTION); } } #endif @@ -3382,7 +3723,8 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i for (unsigned short iVolumeFile = 0; iVolumeFile < nVolumeOutputFiles; iVolumeFile++) { if (VolumeOutputFiles[iVolumeFile] == OUTPUT_TYPE::CGNS || VolumeOutputFiles[iVolumeFile] == OUTPUT_TYPE::SURFACE_CGNS) { - SU2_MPI::Error(string("CGNS file requested in option OUTPUT_FILES but SU2 was built without CGNS support.\n"),CURRENT_FUNCTION); + SU2_MPI::Error(string("CGNS file requested in option OUTPUT_FILES but SU2 was built without CGNS support.\n"), + CURRENT_FUNCTION); } } #endif @@ -3394,10 +3736,12 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i /*--- STL_BINARY output not implemented yet, but already a value in option_structure.hpp---*/ for (unsigned short iVolumeFile = 0; iVolumeFile < nVolumeOutputFiles; iVolumeFile++) { - if (VolumeOutputFiles[iVolumeFile] == OUTPUT_TYPE::STL_BINARY){ - SU2_MPI::Error(string("OUTPUT_FILES: 'STL_BINARY' output not implemented. Use 'STL' for ASCII output.\n"), CURRENT_FUNCTION); + if (VolumeOutputFiles[iVolumeFile] == OUTPUT_TYPE::STL_BINARY) { + SU2_MPI::Error(string("OUTPUT_FILES: 'STL_BINARY' output not implemented. Use 'STL' for ASCII output.\n"), + CURRENT_FUNCTION); } - if (val_nDim == 2 && (VolumeOutputFiles[iVolumeFile] == OUTPUT_TYPE::STL_ASCII || VolumeOutputFiles[iVolumeFile] == OUTPUT_TYPE::STL_BINARY)) { + if (val_nDim == 2 && (VolumeOutputFiles[iVolumeFile] == OUTPUT_TYPE::STL_ASCII || + VolumeOutputFiles[iVolumeFile] == OUTPUT_TYPE::STL_BINARY)) { SU2_MPI::Error(string("OUTPUT_FILES: 'STL(_BINARY)' output only reasonable for 3D cases.\n"), CURRENT_FUNCTION); } } @@ -3405,7 +3749,7 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i /*--- Check if MESH_QUALITY is requested in VOLUME_OUTPUT and set the config boolean accordingly. ---*/ Wrt_MeshQuality = false; for (unsigned short iField = 0; iField < nVolumeOutput; iField++) { - if(VolumeOutput[iField].find("MESH_QUALITY") != string::npos) { + if (VolumeOutput[iField].find("MESH_QUALITY") != string::npos) { Wrt_MeshQuality = true; } } @@ -3413,21 +3757,21 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i /*--- Check if MULTIGRID is requested in VOLUME_OUTPUT and set the config boolean accordingly. ---*/ Wrt_MultiGrid = false; for (unsigned short iField = 0; iField < nVolumeOutput; iField++) { - if(VolumeOutput[iField].find("MULTIGRID") != string::npos) { + if (VolumeOutput[iField].find("MULTIGRID") != string::npos) { Wrt_MultiGrid = true; } } - if (Kind_Solver == MAIN_SOLVER::NAVIER_STOKES && Kind_Turb_Model != TURB_MODEL::NONE){ + if (Kind_Solver == MAIN_SOLVER::NAVIER_STOKES && Kind_Turb_Model != TURB_MODEL::NONE) { SU2_MPI::Error("KIND_TURB_MODEL must be NONE if SOLVER= NAVIER_STOKES", CURRENT_FUNCTION); } - if (Kind_Solver == MAIN_SOLVER::INC_NAVIER_STOKES && Kind_Turb_Model != TURB_MODEL::NONE){ + if (Kind_Solver == MAIN_SOLVER::INC_NAVIER_STOKES && Kind_Turb_Model != TURB_MODEL::NONE) { SU2_MPI::Error("KIND_TURB_MODEL must be NONE if SOLVER= INC_NAVIER_STOKES", CURRENT_FUNCTION); } - if (Kind_Solver == MAIN_SOLVER::RANS && Kind_Turb_Model == TURB_MODEL::NONE){ + if (Kind_Solver == MAIN_SOLVER::RANS && Kind_Turb_Model == TURB_MODEL::NONE) { SU2_MPI::Error("A turbulence model must be specified with KIND_TURB_MODEL if SOLVER= RANS", CURRENT_FUNCTION); } - if (Kind_Solver == MAIN_SOLVER::INC_RANS && Kind_Turb_Model == TURB_MODEL::NONE){ + if (Kind_Solver == MAIN_SOLVER::INC_RANS && Kind_Turb_Model == TURB_MODEL::NONE) { SU2_MPI::Error("A turbulence model must be specified with KIND_TURB_MODEL if SOLVER= INC_RANS", CURRENT_FUNCTION); } @@ -3439,7 +3783,7 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i } /*--- Check if turbulence model can be used for AXISYMMETRIC case---*/ - if (Axisymmetric && Kind_Turb_Model != TURB_MODEL::NONE && Kind_Turb_Model != TURB_MODEL::SST){ + if (Axisymmetric && Kind_Turb_Model != TURB_MODEL::NONE && Kind_Turb_Model != TURB_MODEL::SST) { SU2_MPI::Error("Axisymmetry is currently only supported for KIND_TURB_MODEL chosen as SST", CURRENT_FUNCTION); } @@ -3459,21 +3803,23 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i Wall_Functions = false; if (nMarker_WallFunctions > 0) { for (iMarker = 0; iMarker < nMarker_WallFunctions; iMarker++) { - if (Kind_WallFunctions[iMarker] != WALL_FUNCTIONS::NONE) - Wall_Functions = true; + if (Kind_WallFunctions[iMarker] != WALL_FUNCTIONS::NONE) Wall_Functions = true; if ((Kind_WallFunctions[iMarker] == WALL_FUNCTIONS::ADAPTIVE_FUNCTION) || (Kind_WallFunctions[iMarker] == WALL_FUNCTIONS::SCALABLE_FUNCTION) || (Kind_WallFunctions[iMarker] == WALL_FUNCTIONS::NONEQUILIBRIUM_MODEL)) - SU2_MPI::Error(string("For RANS problems, use NONE, STANDARD_WALL_FUNCTION or EQUILIBRIUM_WALL_MODEL.\n"), CURRENT_FUNCTION); + SU2_MPI::Error(string("For RANS problems, use NONE, STANDARD_WALL_FUNCTION or EQUILIBRIUM_WALL_MODEL.\n"), + CURRENT_FUNCTION); if (Kind_WallFunctions[iMarker] == WALL_FUNCTIONS::STANDARD_FUNCTION) { if ((Kind_Solver != MAIN_SOLVER::RANS) && (Kind_Solver != MAIN_SOLVER::INC_RANS)) - SU2_MPI::Error(string("Wall model STANDARD_FUNCTION only available for RANS or INC_RANS.\n"), CURRENT_FUNCTION); + SU2_MPI::Error(string("Wall model STANDARD_FUNCTION only available for RANS or INC_RANS.\n"), + CURRENT_FUNCTION); if (nRough_Wall != 0) - SU2_MPI::Error(string("Wall model STANDARD_FUNCTION and WALL_ROUGHNESS migh not be compatible. Checking required!\n"), CURRENT_FUNCTION); + SU2_MPI::Error( + string("Wall model STANDARD_FUNCTION and WALL_ROUGHNESS migh not be compatible. Checking required!\n"), + CURRENT_FUNCTION); } - } } @@ -3481,10 +3827,8 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i solver. This is typically unused (often internal flows). Also fixed CL mode for incompressible flows is not implemented ---*/ - if (Kind_Solver == MAIN_SOLVER::INC_EULER || - Kind_Solver == MAIN_SOLVER::INC_NAVIER_STOKES || + if (Kind_Solver == MAIN_SOLVER::INC_EULER || Kind_Solver == MAIN_SOLVER::INC_NAVIER_STOKES || Kind_Solver == MAIN_SOLVER::INC_RANS) { - /*--- Compute x-velocity with a safegaurd for 0.0. ---*/ su2double Vx = 1e-10; @@ -3496,10 +3840,10 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i su2double alpha = 0.0, beta = 0.0; if (val_nDim == 2) { - alpha = atan(vel_init[1]/Vx)*180.0/PI_NUMBER; + alpha = atan(vel_init[1] / Vx) * 180.0 / PI_NUMBER; } else { - alpha = atan(vel_init[2]/Vx)*180.0/PI_NUMBER; - beta = atan(vel_init[1]/Vx)*180.0/PI_NUMBER; + alpha = atan(vel_init[2] / Vx) * 180.0 / PI_NUMBER; + beta = atan(vel_init[1] / Vx) * 180.0 / PI_NUMBER; } /*--- Set alpha and beta in the config class. ---*/ @@ -3513,7 +3857,8 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i /*--- Inc CHT simulation, but energy equation of fluid is inactive. ---*/ if (Multizone_Problem && (nMarker_CHTInterface > 0) && !Energy_Equation) - SU2_MPI::Error(string("You probably want to set INC_ENERGY_EQUATION= YES for the fluid solver. \n"), CURRENT_FUNCTION); + SU2_MPI::Error(string("You probably want to set INC_ENERGY_EQUATION= YES for the fluid solver. \n"), + CURRENT_FUNCTION); } /*--- By default, in 2D we should use TWOD_AIRFOIL (independenly from the input file) ---*/ @@ -3560,9 +3905,8 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i /*--- Set the default for thrust in ActDisk ---*/ - if ((Kind_ActDisk == NET_THRUST) || (Kind_ActDisk == BC_THRUST) - || (Kind_ActDisk == DRAG_MINUS_THRUST) || (Kind_ActDisk == MASSFLOW) - || (Kind_ActDisk == POWER)) + if ((Kind_ActDisk == NET_THRUST) || (Kind_ActDisk == BC_THRUST) || (Kind_ActDisk == DRAG_MINUS_THRUST) || + (Kind_ActDisk == MASSFLOW) || (Kind_ActDisk == POWER)) ActDisk_Jump = RATIO; /*--- Error-catching and automatic array adjustments for objective, marker, and weights arrays --- */ @@ -3574,60 +3918,60 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i Kind_ObjFunc[0] = DRAG_COEFFICIENT; Weight_ObjFunc = new su2double[1]; Weight_ObjFunc[0] = 1.0; - nObj=1; - nObjW=1; + nObj = 1; + nObjW = 1; } /*--- Maker sure that arrays are the same length ---*/ - if (nObj>0) { - if (nMarker_Monitoring!=nObj && Marker_Monitoring!= nullptr) { - if (nMarker_Monitoring==1) { - /*-- If only one marker was listed with multiple objectives, set that marker as the marker for each objective ---*/ + if (nObj > 0) { + if (nMarker_Monitoring != nObj && Marker_Monitoring != nullptr) { + if (nMarker_Monitoring == 1) { + /*-- If only one marker was listed with multiple objectives, set that marker as the marker for each objective + * ---*/ nMarker_Monitoring = nObj; string marker = Marker_Monitoring[0]; delete[] Marker_Monitoring; Marker_Monitoring = new string[nMarker_Monitoring]; - for (iMarker=0; iMarker1) { - SU2_MPI::Error("When using more than one OBJECTIVE_FUNCTION, MARKER_MONITORING must be the same length or length 1.\n" - "For multiple surfaces per objective, either use one objective or list the objective multiple times.\n" - "For multiple objectives per marker either use one marker or list the marker multiple times.\n" - "Similar rules apply for multi-objective optimization using OPT_OBJECTIVE rather than OBJECTIVE_FUNCTION.", - CURRENT_FUNCTION); + } else if (nObj > 1) { + SU2_MPI::Error( + "When using more than one OBJECTIVE_FUNCTION, MARKER_MONITORING must be the same length or length 1.\n" + "For multiple surfaces per objective, either use one objective or list the objective multiple times.\n" + "For multiple objectives per marker either use one marker or list the marker multiple times.\n" + "Similar rules apply for multi-objective optimization using OPT_OBJECTIVE rather than OBJECTIVE_FUNCTION.", + CURRENT_FUNCTION); } } } /*-- Correct for case where Weight_ObjFunc has not been provided or has length < kind_objfunc---*/ - if (nObjW1) { - SU2_MPI::Error("The option OBJECTIVE_WEIGHT must either have the same length as OBJECTIVE_FUNCTION,\n" - "be lenght 1, or be deleted from the config file (equal weights will be applied).", CURRENT_FUNCTION); + if (nObjW < nObj) { + if (Weight_ObjFunc != nullptr && nObjW > 1) { + SU2_MPI::Error( + "The option OBJECTIVE_WEIGHT must either have the same length as OBJECTIVE_FUNCTION,\n" + "be lenght 1, or be deleted from the config file (equal weights will be applied).", + CURRENT_FUNCTION); } Weight_ObjFunc = new su2double[nObj]; - for (unsigned short iObj=0; iObj 1) { unsigned short Obj_0 = Kind_ObjFunc[0]; - for (unsigned short iObj=1; iObj 0){ + if (nObj > 0) { if (Kind_ObjFunc[0] == CUSTOM_OBJFUNC && CustomObjFunc.empty() && !Multizone_Problem) { - SU2_MPI::Error("The expression for the custom objective function was not set.\n" - "For example, CUSTOM_OBJFUNC= LIFT/DRAG", CURRENT_FUNCTION); + SU2_MPI::Error( + "The expression for the custom objective function was not set.\n" + "For example, CUSTOM_OBJFUNC= LIFT/DRAG", + CURRENT_FUNCTION); } } /*--- Check for unsteady problem ---*/ - if ((TimeMarching == TIME_MARCHING::TIME_STEPPING || - TimeMarching == TIME_MARCHING::DT_STEPPING_1ST || - TimeMarching == TIME_MARCHING::DT_STEPPING_2ND) && !Time_Domain){ - SU2_MPI::Error("TIME_DOMAIN must be set to YES if TIME_MARCHING is " - "TIME_STEPPING, DUAL_TIME_STEPPING-1ST_ORDER or DUAL_TIME_STEPPING-2ND_ORDER", CURRENT_FUNCTION); + if ((TimeMarching == TIME_MARCHING::TIME_STEPPING || TimeMarching == TIME_MARCHING::DT_STEPPING_1ST || + TimeMarching == TIME_MARCHING::DT_STEPPING_2ND) && + !Time_Domain) { + SU2_MPI::Error( + "TIME_DOMAIN must be set to YES if TIME_MARCHING is " + "TIME_STEPPING, DUAL_TIME_STEPPING-1ST_ORDER or DUAL_TIME_STEPPING-2ND_ORDER", + CURRENT_FUNCTION); } - if (Time_Domain){ + if (Time_Domain) { Delta_UnstTime = Time_Step; - if (TimeMarching == TIME_MARCHING::TIME_STEPPING){ InnerIter = 1; } + if (TimeMarching == TIME_MARCHING::TIME_STEPPING) { + InnerIter = 1; + } /*--- Set History write freq for inner and outer iteration to zero by default, so only time iterations write. ---*/ - if (!OptionIsSet("HISTORY_WRT_FREQ_INNER")) { HistoryWrtFreq[2] = 0; } - if (!OptionIsSet("HISTORY_WRT_FREQ_OUTER")) { HistoryWrtFreq[1] = 0; } + if (!OptionIsSet("HISTORY_WRT_FREQ_INNER")) { + HistoryWrtFreq[2] = 0; + } + if (!OptionIsSet("HISTORY_WRT_FREQ_OUTER")) { + HistoryWrtFreq[1] = 0; + } if (Restart == NO) { Restart_Iter = 0; } else { - if(nTimeIter <= Restart_Iter) SU2_MPI::Error("TIME_ITER must be larger than RESTART_ITER.", CURRENT_FUNCTION); + if (nTimeIter <= Restart_Iter) SU2_MPI::Error("TIME_ITER must be larger than RESTART_ITER.", CURRENT_FUNCTION); } - /*--- WINDOW_START_ITER must be larger than or equal to: RESTART_ITER. Otherwise, the running average is wrong. ---*/ + /*--- WINDOW_START_ITER must be larger than or equal to: RESTART_ITER. Otherwise, the running average is wrong. + * ---*/ if (OptionIsSet("WINDOW_START_ITER")) { if (StartWindowIteration < Restart_Iter) { SU2_MPI::Error("WINDOW_START_ITER must be larger than or equal to: RESTART_ITER!", CURRENT_FUNCTION); } } else { /*--- Enforced default behavior: start of the window is the first new iteration. ---*/ - if (rank == MASTER_NODE) cout << "WARNING: Setting WINDOW_START_ITER = RESTART_ITER for meaningful running average.\n"; + if (rank == MASTER_NODE) + cout << "WARNING: Setting WINDOW_START_ITER = RESTART_ITER for meaningful running average.\n"; StartWindowIteration = Restart_Iter; } - if (Time_Step <= 0.0 && Unst_CFL == 0.0){ SU2_MPI::Error("Invalid value for TIME_STEP.", CURRENT_FUNCTION); } + if (Time_Step <= 0.0 && Unst_CFL == 0.0) { + SU2_MPI::Error("Invalid value for TIME_STEP.", CURRENT_FUNCTION); + } } else { nTimeIter = 1; Time_Step = 0; /*--- Entry 0 corresponds to unsteady simulation so for steady simulation are just set to 1. ---*/ - ScreenWrtFreq[0] = 1; + ScreenWrtFreq[0] = 1; HistoryWrtFreq[0] = 1; - if (TimeMarching != TIME_MARCHING::HARMONIC_BALANCE) { TimeMarching = TIME_MARCHING::STEADY; } + if (TimeMarching != TIME_MARCHING::HARMONIC_BALANCE) { + TimeMarching = TIME_MARCHING::STEADY; + } } - if (Time_Domain && !GetWrt_Restart_Overwrite()){ - SU2_MPI::Error("Appending iterations to the filename (WRT_RESTART_OVERWRITE=NO) is incompatible with transient problems.", CURRENT_FUNCTION); + if (Time_Domain && !GetWrt_Restart_Overwrite()) { + SU2_MPI::Error( + "Appending iterations to the filename (WRT_RESTART_OVERWRITE=NO) is incompatible with transient problems.", + CURRENT_FUNCTION); } - if (Time_Domain && !GetWrt_Surface_Overwrite()){ - SU2_MPI::Error("Appending iterations to the filename (WRT_SURFACE_OVERWRITE=NO) is incompatible with transient problems.", CURRENT_FUNCTION); + if (Time_Domain && !GetWrt_Surface_Overwrite()) { + SU2_MPI::Error( + "Appending iterations to the filename (WRT_SURFACE_OVERWRITE=NO) is incompatible with transient problems.", + CURRENT_FUNCTION); } - if (Time_Domain && !GetWrt_Volume_Overwrite()){ - SU2_MPI::Error("Appending iterations to the filename (WRT_VOLUME_OVERWRITE=NO) is incompatible with transient problems.", CURRENT_FUNCTION); + if (Time_Domain && !GetWrt_Volume_Overwrite()) { + SU2_MPI::Error( + "Appending iterations to the filename (WRT_VOLUME_OVERWRITE=NO) is incompatible with transient problems.", + CURRENT_FUNCTION); } - /*--- Ensure that Discard_InFiles is false, owerwise the gradient could be wrong ---*/ - if ((ContinuousAdjoint || DiscreteAdjoint) && Fixed_CL_Mode && !Eval_dOF_dCX) - Discard_InFiles = false; + if ((ContinuousAdjoint || DiscreteAdjoint) && Fixed_CL_Mode && !Eval_dOF_dCX) Discard_InFiles = false; /*--- Deactivate the multigrid in the adjoint problem ---*/ - if ((ContinuousAdjoint && !MG_AdjointFlow) || - (TimeMarching == TIME_MARCHING::TIME_STEPPING)) { nMGLevels = 0; } - - if (Kind_Solver == MAIN_SOLVER::EULER || - Kind_Solver == MAIN_SOLVER::NAVIER_STOKES || - Kind_Solver == MAIN_SOLVER::RANS || - Kind_Solver == MAIN_SOLVER::NEMO_EULER || - Kind_Solver == MAIN_SOLVER::NEMO_NAVIER_STOKES || - Kind_Solver == MAIN_SOLVER::FEM_EULER || - Kind_Solver == MAIN_SOLVER::FEM_NAVIER_STOKES || - Kind_Solver == MAIN_SOLVER::FEM_RANS || - Kind_Solver == MAIN_SOLVER::FEM_LES){ + if ((ContinuousAdjoint && !MG_AdjointFlow) || (TimeMarching == TIME_MARCHING::TIME_STEPPING)) { + nMGLevels = 0; + } + + if (Kind_Solver == MAIN_SOLVER::EULER || Kind_Solver == MAIN_SOLVER::NAVIER_STOKES || + Kind_Solver == MAIN_SOLVER::RANS || Kind_Solver == MAIN_SOLVER::NEMO_EULER || + Kind_Solver == MAIN_SOLVER::NEMO_NAVIER_STOKES || Kind_Solver == MAIN_SOLVER::FEM_EULER || + Kind_Solver == MAIN_SOLVER::FEM_NAVIER_STOKES || Kind_Solver == MAIN_SOLVER::FEM_RANS || + Kind_Solver == MAIN_SOLVER::FEM_LES) { Kind_Regime = ENUM_REGIME::COMPRESSIBLE; - } else if (Kind_Solver == MAIN_SOLVER::INC_EULER || - Kind_Solver == MAIN_SOLVER::INC_NAVIER_STOKES || - Kind_Solver == MAIN_SOLVER::INC_RANS){ + } else if (Kind_Solver == MAIN_SOLVER::INC_EULER || Kind_Solver == MAIN_SOLVER::INC_NAVIER_STOKES || + Kind_Solver == MAIN_SOLVER::INC_RANS) { Kind_Regime = ENUM_REGIME::INCOMPRESSIBLE; - } else { + } else { Kind_Regime = ENUM_REGIME::NO_FLOW; } - if ((rank == MASTER_NODE) && ContinuousAdjoint && (Ref_NonDim == DIMENSIONAL) && (Kind_SU2 == SU2_COMPONENT::SU2_CFD)) { + if ((rank == MASTER_NODE) && ContinuousAdjoint && (Ref_NonDim == DIMENSIONAL) && + (Kind_SU2 == SU2_COMPONENT::SU2_CFD)) { cout << "WARNING: The adjoint solver should use a non-dimensional flow solution." << endl; } /*--- Initialize non-physical points/reconstructions to zero ---*/ - Nonphys_Points = 0; + Nonphys_Points = 0; Nonphys_Reconstr = 0; /*--- Set the number of external iterations to 1 for the steady state problem ---*/ if (Kind_Solver == MAIN_SOLVER::FEM_ELASTICITY) { nMGLevels = 0; - if (Kind_Struct_Solver == STRUCT_DEFORMATION::SMALL){ + if (Kind_Struct_Solver == STRUCT_DEFORMATION::SMALL) { MinLogResidual = log10(Linear_Solver_Error); } } @@ -3785,7 +4148,9 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i /*--- Check for unsupported features. ---*/ - if ((Kind_Solver != MAIN_SOLVER::EULER && Kind_Solver != MAIN_SOLVER::NAVIER_STOKES && Kind_Solver != MAIN_SOLVER::RANS) && (TimeMarching == TIME_MARCHING::HARMONIC_BALANCE)){ + if ((Kind_Solver != MAIN_SOLVER::EULER && Kind_Solver != MAIN_SOLVER::NAVIER_STOKES && + Kind_Solver != MAIN_SOLVER::RANS) && + (TimeMarching == TIME_MARCHING::HARMONIC_BALANCE)) { SU2_MPI::Error("Harmonic Balance not yet implemented for the incompressible solver.", CURRENT_FUNCTION); } @@ -3798,7 +4163,7 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i } } -/*--- Set default values for various fluid properties. ---*/ + /*--- Set default values for various fluid properties. ---*/ const su2double Molecular_Weight_Default = 28.96; const su2double Mu_Constant_Default = (SystemMeasurements == SI) ? 1.716E-5 : (1.716E-5 / 47.88025898); @@ -3806,7 +4171,8 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i const su2double Mu_Temperature_Ref_Default = (SystemMeasurements == SI) ? 273.15 : (273.15 * 1.8); const su2double Mu_S_Default = (SystemMeasurements == SI) ? 110.4 : (110.4 * 1.8); const su2double Specific_Heat_Cp_Default = 1004.703; - const su2double Thermal_Conductivity_Constant_Default = (SystemMeasurements == SI) ? 2.57E-2 : (2.57E-2 * 0.577789317); + const su2double Thermal_Conductivity_Constant_Default = + (SystemMeasurements == SI) ? 2.57E-2 : (2.57E-2 * 0.577789317); const su2double Prandtl_Lam_Default = 0.72; const su2double Prandtl_Turb_Default = 0.9; const su2double Lewis_Number_Default = 1.0; @@ -3833,210 +4199,218 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i SetDefaultIfEmpty(Prandtl_Turb, nPrandtl_Turb, Prandtl_Turb_Default); SetDefaultIfEmpty(Constant_Lewis_Number, nConstant_Lewis_Number, Lewis_Number_Default); - Variable_Density = ((Kind_DensityModel == INC_DENSITYMODEL::VARIABLE) || (Kind_DensityModel == INC_DENSITYMODEL::FLAMELET)); + Variable_Density = + ((Kind_DensityModel == INC_DENSITYMODEL::VARIABLE) || (Kind_DensityModel == INC_DENSITYMODEL::FLAMELET)); /*--- Check whether inputs for FLUID_MIXTURE are correctly specified. ---*/ - if (Kind_FluidModel == FLUID_MIXTURE) { - /*--- Check whether the number of entries of each specified fluid property equals the number of transported scalar - equations solved + 1. nMolecular_Weight and nSpecific_Heat_Cp are used because it is required for the fluid mixing models. - * Cp is required in case of MIXTURE_FLUID_MODEL because the energy equation needs to be active.--- */ - if (nMolecular_Weight != nSpecies_Init + 1 || nSpecific_Heat_Cp != nSpecies_Init + 1) { - SU2_MPI::Error( - "The use of FLUID_MIXTURE requires the number of entries for MOLECULAR_WEIGHT and SPECIFIC_HEAT_CP,\n" - "to be equal to the number of entries of SPECIES_INIT + 1", - CURRENT_FUNCTION); - } - /*--- Check whether the density model used is correct, in the case of FLUID_MIXTURE the density model must be - VARIABLE. Otherwise, if the density model is CONSTANT, the scalars will not have influence the mixture density - and it will remain constant through the complete domain. --- */ - if (Kind_DensityModel != INC_DENSITYMODEL::VARIABLE) { - SU2_MPI::Error("The use of FLUID_MIXTURE requires the INC_DENSITY_MODEL option to be VARIABLE", - CURRENT_FUNCTION); - } + if (Kind_FluidModel == FLUID_MIXTURE) { + /*--- Check whether the number of entries of each specified fluid property equals the number of transported scalar + equations solved + 1. nMolecular_Weight and nSpecific_Heat_Cp are used because it is required for the fluid mixing + models. + * Cp is required in case of MIXTURE_FLUID_MODEL because the energy equation needs to be active.--- */ + if (nMolecular_Weight != nSpecies_Init + 1 || nSpecific_Heat_Cp != nSpecies_Init + 1) { + SU2_MPI::Error( + "The use of FLUID_MIXTURE requires the number of entries for MOLECULAR_WEIGHT and SPECIFIC_HEAT_CP,\n" + "to be equal to the number of entries of SPECIES_INIT + 1", + CURRENT_FUNCTION); + } + /*--- Check whether the density model used is correct, in the case of FLUID_MIXTURE the density model must be + VARIABLE. Otherwise, if the density model is CONSTANT, the scalars will not have influence the mixture density + and it will remain constant through the complete domain. --- */ + if (Kind_DensityModel != INC_DENSITYMODEL::VARIABLE) { + SU2_MPI::Error("The use of FLUID_MIXTURE requires the INC_DENSITY_MODEL option to be VARIABLE", CURRENT_FUNCTION); + } + + switch (Kind_ViscosityModel) { + case VISCOSITYMODEL::CONSTANT: + if (nMu_Constant != nSpecies_Init + 1) { + SU2_MPI::Error( + "The use of FLUID_MIXTURE requires the number of entries for MU_CONSTANT,\n" + "to be equal to the number of entries of SPECIES_INIT + 1", + CURRENT_FUNCTION); + } + break; + case VISCOSITYMODEL::SUTHERLAND: + if ((nMu_Ref != nSpecies_Init + 1) || (nMu_Temperature_Ref != nSpecies_Init + 1) || + (nMu_S != nSpecies_Init + 1)) { + SU2_MPI::Error( + "The use of FLUID_MIXTURE requires the number of entries for MU_REF, MU_T_REF and " + "SUTHERLAND_CONSTANT,\n" + "to be equal to the number of entries of SPECIES_INIT + 1", + CURRENT_FUNCTION); + } + break; + default: + if (nSpecies_Init + 1 != 1) SU2_MPI::Error("Fluid mixture: viscosity model not available.", CURRENT_FUNCTION); + break; + } - switch (Kind_ViscosityModel) { - case VISCOSITYMODEL::CONSTANT: - if (nMu_Constant != nSpecies_Init + 1) { + switch (Kind_ConductivityModel) { + case CONDUCTIVITYMODEL::CONSTANT: + if ((Kind_ConductivityModel_Turb == CONDUCTIVITYMODEL_TURB::CONSTANT_PRANDTL) && + (Kind_Turb_Model != TURB_MODEL::NONE)) { + if ((nThermal_Conductivity_Constant != nSpecies_Init + 1) || (nPrandtl_Turb != nSpecies_Init + 1)) { SU2_MPI::Error( - "The use of FLUID_MIXTURE requires the number of entries for MU_CONSTANT,\n" + "The use of FLUID_MIXTURE requires the number of entries for THERMAL_CONDUCTIVITY_CONSTANT and " + "PRANDTL_TURB,\n" "to be equal to the number of entries of SPECIES_INIT + 1", CURRENT_FUNCTION); } - break; - case VISCOSITYMODEL::SUTHERLAND: - if ((nMu_Ref != nSpecies_Init + 1) || (nMu_Temperature_Ref != nSpecies_Init + 1) || - (nMu_S != nSpecies_Init + 1)) { + } else { + if (nThermal_Conductivity_Constant != nSpecies_Init + 1) { SU2_MPI::Error( - "The use of FLUID_MIXTURE requires the number of entries for MU_REF, MU_T_REF and " - "SUTHERLAND_CONSTANT,\n" + "The use of FLUID_MIXTURE requires the number of entries for THERMAL_CONDUCTIVITY_CONSTANT,\n" "to be equal to the number of entries of SPECIES_INIT + 1", CURRENT_FUNCTION); } - break; - default: - if (nSpecies_Init + 1 != 1) SU2_MPI::Error("Fluid mixture: viscosity model not available.", CURRENT_FUNCTION); - break; - } - - switch (Kind_ConductivityModel) { - case CONDUCTIVITYMODEL::CONSTANT: - if ((Kind_ConductivityModel_Turb == CONDUCTIVITYMODEL_TURB::CONSTANT_PRANDTL) && - (Kind_Turb_Model != TURB_MODEL::NONE)) { - if ((nThermal_Conductivity_Constant != nSpecies_Init + 1) || (nPrandtl_Turb != nSpecies_Init + 1)) { - SU2_MPI::Error( - "The use of FLUID_MIXTURE requires the number of entries for THERMAL_CONDUCTIVITY_CONSTANT and " - "PRANDTL_TURB,\n" - "to be equal to the number of entries of SPECIES_INIT + 1", - CURRENT_FUNCTION); - } - } else { - if (nThermal_Conductivity_Constant != nSpecies_Init + 1) { - SU2_MPI::Error( - "The use of FLUID_MIXTURE requires the number of entries for THERMAL_CONDUCTIVITY_CONSTANT,\n" - "to be equal to the number of entries of SPECIES_INIT + 1", - CURRENT_FUNCTION); - } + } + break; + case CONDUCTIVITYMODEL::CONSTANT_PRANDTL: + if (Kind_ConductivityModel_Turb == CONDUCTIVITYMODEL_TURB::CONSTANT_PRANDTL) { + if ((nPrandtl_Lam != nSpecies_Init + 1) || (nPrandtl_Turb != nSpecies_Init + 1)) { + SU2_MPI::Error( + "The use of FLUID_MIXTURE requires the number of entries for PRANDTL_LAM and PRANDTL_TURB,\n" + "to be equal to the number of entries of SPECIES_INIT + 1", + CURRENT_FUNCTION); } - break; - case CONDUCTIVITYMODEL::CONSTANT_PRANDTL: - if (Kind_ConductivityModel_Turb == CONDUCTIVITYMODEL_TURB::CONSTANT_PRANDTL) { - if ((nPrandtl_Lam != nSpecies_Init + 1) || (nPrandtl_Turb != nSpecies_Init + 1)) { - SU2_MPI::Error( - "The use of FLUID_MIXTURE requires the number of entries for PRANDTL_LAM and PRANDTL_TURB,\n" - "to be equal to the number of entries of SPECIES_INIT + 1", - CURRENT_FUNCTION); - } - } else { - if (nPrandtl_Lam != nSpecies_Init + 1) { - SU2_MPI::Error( - "The use of FLUID_MIXTURE requires the number of entries for PRANDTL_LAM,\n" - "to be equal to the number of entries of SPECIES_INIT + 1", - CURRENT_FUNCTION); - } + } else { + if (nPrandtl_Lam != nSpecies_Init + 1) { + SU2_MPI::Error( + "The use of FLUID_MIXTURE requires the number of entries for PRANDTL_LAM,\n" + "to be equal to the number of entries of SPECIES_INIT + 1", + CURRENT_FUNCTION); } - break; - default: - if (nSpecies_Init + 1 != 1) SU2_MPI::Error("Conductivity model not available.", CURRENT_FUNCTION); - break; - } + } + break; + default: + if (nSpecies_Init + 1 != 1) SU2_MPI::Error("Conductivity model not available.", CURRENT_FUNCTION); + break; } + } + if (Kind_Species_Model == SPECIES_MODEL::FLAMELET) { + if (Kind_FluidModel != FLUID_FLAMELET) { + SU2_MPI::Error("The use of SCALAR_MODEL= FLAMELET requires the FLUID_MODEL option to be FLUID_FLAMELET", + CURRENT_FUNCTION); + } - if (Kind_Species_Model == SPECIES_MODEL::FLAMELET) { - - if (Kind_FluidModel != FLUID_FLAMELET) { - SU2_MPI::Error("The use of SCALAR_MODEL= FLAMELET requires the FLUID_MODEL option to be FLUID_FLAMELET", - CURRENT_FUNCTION); - } + if (!Variable_Density) { + SU2_MPI::Error("The use of FLUID_FLAMELET requires the INC_DENSITY_MODEL option to be VARIABLE or FLAMELET", + CURRENT_FUNCTION); + } - if (!Variable_Density) { - SU2_MPI::Error("The use of FLUID_FLAMELET requires the INC_DENSITY_MODEL option to be VARIABLE or FLAMELET", - CURRENT_FUNCTION); - } + if (Kind_ConductivityModel != CONDUCTIVITYMODEL::FLAMELET) { + SU2_MPI::Error("The use of FLUID_FLAMELET requires the CONDUCTIVITY_MODEL option to be FLAMELET", + CURRENT_FUNCTION); + } - if (Kind_ConductivityModel != CONDUCTIVITYMODEL::FLAMELET) { - SU2_MPI::Error("The use of FLUID_FLAMELET requires the CONDUCTIVITY_MODEL option to be FLAMELET", - CURRENT_FUNCTION); - } + if (Kind_Diffusivity_Model != DIFFUSIVITYMODEL::FLAMELET) { + SU2_MPI::Error("The use of FLUID_FLAMELET requires the DIFFUSIVITY_MODEL option to be FLAMELET", + CURRENT_FUNCTION); + } - if (Kind_Diffusivity_Model != DIFFUSIVITYMODEL::FLAMELET) { - SU2_MPI::Error("The use of FLUID_FLAMELET requires the DIFFUSIVITY_MODEL option to be FLAMELET", - CURRENT_FUNCTION); - } + if (Kind_ViscosityModel != VISCOSITYMODEL::FLAMELET) { + SU2_MPI::Error("The use of FLUID_FLAMELET requires the VISCOSITY_MODEL option to be FLAMELET", CURRENT_FUNCTION); + } - if (Kind_ViscosityModel != VISCOSITYMODEL::FLAMELET) { - SU2_MPI::Error("The use of FLUID_FLAMELET requires the VISCOSITY_MODEL option to be FLAMELET", - CURRENT_FUNCTION); - } - - if (Weakly_Coupled_Heat) { - SU2_MPI::Error("The use of FLUID_FLAMELET is incompatible with WEAKLY_COUPLED_HEAT in the same zone.", - CURRENT_FUNCTION); - } + if (Weakly_Coupled_Heat) { + SU2_MPI::Error("The use of FLUID_FLAMELET is incompatible with WEAKLY_COUPLED_HEAT in the same zone.", + CURRENT_FUNCTION); } + } - /*--- Check for Measurement System ---*/ + /*--- Check for Measurement System ---*/ - if (SystemMeasurements == US && !standard_air) { - SU2_MPI::Error("Only STANDARD_AIR fluid model can be used with US Measurement System", CURRENT_FUNCTION); - } + if (SystemMeasurements == US && !standard_air) { + SU2_MPI::Error("Only STANDARD_AIR fluid model can be used with US Measurement System", CURRENT_FUNCTION); + } - /* --- Check for NEMO compatibility issues ---*/ - if (Kind_FluidModel == SU2_NONEQ && (Kind_TransCoeffModel != TRANSCOEFFMODEL::WILKE && Kind_TransCoeffModel != TRANSCOEFFMODEL::SUTHERLAND && Kind_TransCoeffModel != TRANSCOEFFMODEL::GUPTAYOS) ) { - SU2_MPI::Error("Transport model not available for NEMO solver using SU2TCLIB. Please use the WILKE, SUTHERLAND or GUPTAYOS transport model instead.", CURRENT_FUNCTION); - } + /* --- Check for NEMO compatibility issues ---*/ + if (Kind_FluidModel == SU2_NONEQ && + (Kind_TransCoeffModel != TRANSCOEFFMODEL::WILKE && Kind_TransCoeffModel != TRANSCOEFFMODEL::SUTHERLAND && + Kind_TransCoeffModel != TRANSCOEFFMODEL::GUPTAYOS)) { + SU2_MPI::Error( + "Transport model not available for NEMO solver using SU2TCLIB. Please use the WILKE, SUTHERLAND or GUPTAYOS " + "transport model instead.", + CURRENT_FUNCTION); + } - if (Kind_Solver == MAIN_SOLVER::NEMO_NAVIER_STOKES) { - if (Kind_FluidModel == SU2_NONEQ && GasModel == "AIR-7" && Kind_TransCoeffModel != TRANSCOEFFMODEL::GUPTAYOS) { - SU2_MPI::Error("Only Gupta-Yos transport model available for ionized flows using SU2TCLIB.", CURRENT_FUNCTION); - } + if (Kind_Solver == MAIN_SOLVER::NEMO_NAVIER_STOKES) { + if (Kind_FluidModel == SU2_NONEQ && GasModel == "AIR-7" && Kind_TransCoeffModel != TRANSCOEFFMODEL::GUPTAYOS) { + SU2_MPI::Error("Only Gupta-Yos transport model available for ionized flows using SU2TCLIB.", CURRENT_FUNCTION); } + } - if (Kind_FluidModel == MUTATIONPP && - (Kind_TransCoeffModel != TRANSCOEFFMODEL::WILKE && Kind_TransCoeffModel != TRANSCOEFFMODEL::CHAPMANN_ENSKOG)) { - SU2_MPI::Error("Transport model not available for NEMO solver using MUTATIONPP. Please use the WILKE or CHAPMANN_ENSKOG transport model instead..", - CURRENT_FUNCTION); - } + if (Kind_FluidModel == MUTATIONPP && + (Kind_TransCoeffModel != TRANSCOEFFMODEL::WILKE && Kind_TransCoeffModel != TRANSCOEFFMODEL::CHAPMANN_ENSKOG)) { + SU2_MPI::Error( + "Transport model not available for NEMO solver using MUTATIONPP. Please use the WILKE or CHAPMANN_ENSKOG " + "transport model instead..", + CURRENT_FUNCTION); + } - if (Kind_FluidModel == SU2_NONEQ && GasModel == "AIR-7" && nWall_Catalytic != 0) { - SU2_MPI::Error("Catalytic wall recombination is not yet available for ionized flows in SU2_NEMO.", CURRENT_FUNCTION); - } + if (Kind_FluidModel == SU2_NONEQ && GasModel == "AIR-7" && nWall_Catalytic != 0) { + SU2_MPI::Error("Catalytic wall recombination is not yet available for ionized flows in SU2_NEMO.", + CURRENT_FUNCTION); + } - if (!ideal_gas && !nemo) { - if (Kind_Upwind_Flow != UPWIND::ROE && Kind_Upwind_Flow != UPWIND::HLLC && Kind_Centered_Flow != CENTERED::JST) { - SU2_MPI::Error("Only ROE Upwind, HLLC Upwind scheme, and JST scheme can be used for Non-Ideal Compressible Fluids", CURRENT_FUNCTION); - } + if (!ideal_gas && !nemo) { + if (Kind_Upwind_Flow != UPWIND::ROE && Kind_Upwind_Flow != UPWIND::HLLC && Kind_Centered_Flow != CENTERED::JST) { + SU2_MPI::Error( + "Only ROE Upwind, HLLC Upwind scheme, and JST scheme can be used for Non-Ideal Compressible Fluids", + CURRENT_FUNCTION); } + } - if (GetBoolTurbomachinery()) { - nBlades = new su2double[nZone]; - FreeStreamTurboNormal = new su2double[3]; - } + if (GetBoolTurbomachinery()) { + nBlades = new su2double[nZone]; + FreeStreamTurboNormal = new su2double[3]; + } - /*--- Check if Giles are used with turbo markers ---*/ + /*--- Check if Giles are used with turbo markers ---*/ - if (nMarker_Giles > 0 && !GetBoolTurbomachinery()) { - SU2_MPI::Error("Giles Boundary conditions can only be used with turbomachinery markers", CURRENT_FUNCTION); - } + if (nMarker_Giles > 0 && !GetBoolTurbomachinery()) { + SU2_MPI::Error("Giles Boundary conditions can only be used with turbomachinery markers", CURRENT_FUNCTION); + } - /*--- Check for Boundary condition available for NICFD ---*/ + /*--- Check for Boundary condition available for NICFD ---*/ - if ((!ideal_gas) && (!noneq_gas)) { - if (nMarker_Inlet != 0) { - SU2_MPI::Error( - "Riemann Boundary conditions or Giles must be used for inlet and outlet with Not Ideal Compressible " - "Fluids ", - CURRENT_FUNCTION); - } - if (nMarker_Outlet != 0) { - SU2_MPI::Error("Riemann Boundary conditions or Giles must be used outlet with Not Ideal Compressible Fluids ", - CURRENT_FUNCTION); - } + if ((!ideal_gas) && (!noneq_gas)) { + if (nMarker_Inlet != 0) { + SU2_MPI::Error( + "Riemann Boundary conditions or Giles must be used for inlet and outlet with Not Ideal Compressible " + "Fluids ", + CURRENT_FUNCTION); + } + if (nMarker_Outlet != 0) { + SU2_MPI::Error("Riemann Boundary conditions or Giles must be used outlet with Not Ideal Compressible Fluids ", + CURRENT_FUNCTION); + } - if (nMarker_FarField != 0) { - SU2_MPI::Error("Riemann Boundary conditions or Giles must be used outlet with Not Ideal Compressible Fluids ", - CURRENT_FUNCTION); - } + if (nMarker_FarField != 0) { + SU2_MPI::Error("Riemann Boundary conditions or Giles must be used outlet with Not Ideal Compressible Fluids ", + CURRENT_FUNCTION); } + } - /*--- Check for Boundary condition available for NICF ---*/ + /*--- Check for Boundary condition available for NICF ---*/ - if (ideal_gas && (Kind_Solver != MAIN_SOLVER::INC_EULER && Kind_Solver != MAIN_SOLVER::INC_NAVIER_STOKES && - Kind_Solver != MAIN_SOLVER::INC_RANS)) { - if (SystemMeasurements == US && standard_air) { - if (Kind_ViscosityModel != VISCOSITYMODEL::SUTHERLAND) { - SU2_MPI::Error("Only SUTHERLAND viscosity model can be used with US Measurement", CURRENT_FUNCTION); - } - } - if (Kind_ConductivityModel != CONDUCTIVITYMODEL::CONSTANT_PRANDTL) { - SU2_MPI::Error("Only CONSTANT_PRANDTL thermal conductivity model can be used with STANDARD_AIR and IDEAL_GAS", - CURRENT_FUNCTION); + if (ideal_gas && (Kind_Solver != MAIN_SOLVER::INC_EULER && Kind_Solver != MAIN_SOLVER::INC_NAVIER_STOKES && + Kind_Solver != MAIN_SOLVER::INC_RANS)) { + if (SystemMeasurements == US && standard_air) { + if (Kind_ViscosityModel != VISCOSITYMODEL::SUTHERLAND) { + SU2_MPI::Error("Only SUTHERLAND viscosity model can be used with US Measurement", CURRENT_FUNCTION); } } - /*--- Check for Boundary condition option agreement ---*/ - if (Kind_InitOption == REYNOLDS){ - if ((Kind_Solver == MAIN_SOLVER::NAVIER_STOKES || Kind_Solver == MAIN_SOLVER::RANS) && Reynolds <=0){ + if (Kind_ConductivityModel != CONDUCTIVITYMODEL::CONSTANT_PRANDTL) { + SU2_MPI::Error("Only CONSTANT_PRANDTL thermal conductivity model can be used with STANDARD_AIR and IDEAL_GAS", + CURRENT_FUNCTION); + } + } + /*--- Check for Boundary condition option agreement ---*/ + if (Kind_InitOption == REYNOLDS) { + if ((Kind_Solver == MAIN_SOLVER::NAVIER_STOKES || Kind_Solver == MAIN_SOLVER::RANS) && Reynolds <= 0) { SU2_MPI::Error("Reynolds number required for NAVIER_STOKES and RANS !!", CURRENT_FUNCTION); } } @@ -4045,45 +4419,44 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i SU2_MPI::Error("Number of SURFACE_MOVEMENT must match number of MARKER_MOVING", CURRENT_FUNCTION); } - if (TimeMarching == TIME_MARCHING::TIME_STEPPING){ - nIter = 1; - nInnerIter = 1; + if (TimeMarching == TIME_MARCHING::TIME_STEPPING) { + nIter = 1; + nInnerIter = 1; } - if (!Multizone_Problem){ - ScreenWrtFreq[1] = 0; + if (!Multizone_Problem) { + ScreenWrtFreq[1] = 0; HistoryWrtFreq[1] = 0; - if (!Time_Domain){ + if (!Time_Domain) { /*--- If not running multizone or unsteady, INNER_ITER and ITER are interchangeable, * but precedence will be given to INNER_ITER if both options are present. ---*/ - if (!OptionIsSet("INNER_ITER")){ + if (!OptionIsSet("INNER_ITER")) { nInnerIter = nIter; } } } - - if ((Multizone_Problem || Time_Domain) && OptionIsSet("ITER")){ - SU2_MPI::Error("ITER must not be used when running multizone and/or unsteady problems.\n" - "Use TIME_ITER, OUTER_ITER or INNER_ITER to specify number of time iterations,\n" - "outer iterations or inner iterations, respectively.", CURRENT_FUNCTION); + if ((Multizone_Problem || Time_Domain) && OptionIsSet("ITER")) { + SU2_MPI::Error( + "ITER must not be used when running multizone and/or unsteady problems.\n" + "Use TIME_ITER, OUTER_ITER or INNER_ITER to specify number of time iterations,\n" + "outer iterations or inner iterations, respectively.", + CURRENT_FUNCTION); } /*--- If we're solving a purely steady problem with no prescribed grid movement (both rotating frame and moving walls can be steady), make sure that there is no grid motion ---*/ - if (GetGrid_Movement()){ + if (GetGrid_Movement()) { if ((Kind_SU2 == SU2_COMPONENT::SU2_CFD || Kind_SU2 == SU2_COMPONENT::SU2_SOL) && - (TimeMarching == TIME_MARCHING::STEADY && !Time_Domain)){ - - if((Kind_GridMovement != ROTATING_FRAME) && - (Kind_GridMovement != STEADY_TRANSLATION) && - (Kind_GridMovement != NONE)){ + (TimeMarching == TIME_MARCHING::STEADY && !Time_Domain)) { + if ((Kind_GridMovement != ROTATING_FRAME) && (Kind_GridMovement != STEADY_TRANSLATION) && + (Kind_GridMovement != NONE)) { SU2_MPI::Error("Unsupported kind of grid movement for steady state problems.", CURRENT_FUNCTION); } - for (iMarker = 0; iMarker < nMarker_Moving; iMarker++){ - if (Kind_SurfaceMovement[iMarker] != MOVING_WALL){ + for (iMarker = 0; iMarker < nMarker_Moving; iMarker++) { + if (Kind_SurfaceMovement[iMarker] != MOVING_WALL) { SU2_MPI::Error("Unsupported kind of surface movement for steady state problems.", CURRENT_FUNCTION); } } @@ -4099,8 +4472,7 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i /*--- If it is not specified, set the mesh motion mach number equal to the freestream value. ---*/ - if (GetDynamic_Grid() && Mach_Motion == 0.0) - Mach_Motion = Mach; + if (GetDynamic_Grid() && Mach_Motion == 0.0) Mach_Motion = Mach; /*--- Set the boolean flag if we are in a rotating frame (source term). ---*/ @@ -4110,72 +4482,88 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i config file, set them equal to zero for safety. Also check to make sure that for each option, a value has been declared for each moving marker. ---*/ - if (nMarker_Moving > 0){ - if (nMarkerMotion_Origin == 0){ - nMarkerMotion_Origin = 3*nMarker_Moving; - MarkerMotion_Origin = new su2double[nMarkerMotion_Origin] (); + if (nMarker_Moving > 0) { + if (nMarkerMotion_Origin == 0) { + nMarkerMotion_Origin = 3 * nMarker_Moving; + MarkerMotion_Origin = new su2double[nMarkerMotion_Origin](); } - if (nMarkerMotion_Origin/3 != nMarker_Moving){ - SU2_MPI::Error("Number of SURFACE_MOTION_ORIGIN must be three times the number of MARKER_MOVING, (x,y,z) per marker.", CURRENT_FUNCTION); + if (nMarkerMotion_Origin / 3 != nMarker_Moving) { + SU2_MPI::Error( + "Number of SURFACE_MOTION_ORIGIN must be three times the number of MARKER_MOVING, (x,y,z) per marker.", + CURRENT_FUNCTION); } - if (nMarkerTranslation == 0){ - nMarkerTranslation = 3*nMarker_Moving; - MarkerTranslation_Rate = new su2double[nMarkerTranslation] (); + if (nMarkerTranslation == 0) { + nMarkerTranslation = 3 * nMarker_Moving; + MarkerTranslation_Rate = new su2double[nMarkerTranslation](); } - if (nMarkerTranslation/3 != nMarker_Moving){ - SU2_MPI::Error("Number of SURFACE_TRANSLATION_RATE must be three times the number of MARKER_MOVING, (x,y,z) per marker.", CURRENT_FUNCTION); + if (nMarkerTranslation / 3 != nMarker_Moving) { + SU2_MPI::Error( + "Number of SURFACE_TRANSLATION_RATE must be three times the number of MARKER_MOVING, (x,y,z) per marker.", + CURRENT_FUNCTION); } - if (nMarkerRotation_Rate == 0){ - nMarkerRotation_Rate = 3*nMarker_Moving; - MarkerRotation_Rate = new su2double[nMarkerRotation_Rate] (); + if (nMarkerRotation_Rate == 0) { + nMarkerRotation_Rate = 3 * nMarker_Moving; + MarkerRotation_Rate = new su2double[nMarkerRotation_Rate](); } - if (nMarkerRotation_Rate/3 != nMarker_Moving){ - SU2_MPI::Error("Number of SURFACE_ROTATION_RATE must be three times the number of MARKER_MOVING, (x,y,z) per marker.", CURRENT_FUNCTION); + if (nMarkerRotation_Rate / 3 != nMarker_Moving) { + SU2_MPI::Error( + "Number of SURFACE_ROTATION_RATE must be three times the number of MARKER_MOVING, (x,y,z) per marker.", + CURRENT_FUNCTION); } - if (nMarkerPlunging_Ampl == 0){ - nMarkerPlunging_Ampl = 3*nMarker_Moving; - MarkerPlunging_Ampl = new su2double[nMarkerPlunging_Ampl] (); + if (nMarkerPlunging_Ampl == 0) { + nMarkerPlunging_Ampl = 3 * nMarker_Moving; + MarkerPlunging_Ampl = new su2double[nMarkerPlunging_Ampl](); } - if (nMarkerPlunging_Ampl/3 != nMarker_Moving){ - SU2_MPI::Error("Number of SURFACE_PLUNGING_AMPL must be three times the number of MARKER_MOVING, (x,y,z) per marker.", CURRENT_FUNCTION); + if (nMarkerPlunging_Ampl / 3 != nMarker_Moving) { + SU2_MPI::Error( + "Number of SURFACE_PLUNGING_AMPL must be three times the number of MARKER_MOVING, (x,y,z) per marker.", + CURRENT_FUNCTION); } - if (nMarkerPlunging_Omega == 0){ - nMarkerPlunging_Omega = 3*nMarker_Moving; - MarkerPlunging_Omega = new su2double[nMarkerPlunging_Omega] (); + if (nMarkerPlunging_Omega == 0) { + nMarkerPlunging_Omega = 3 * nMarker_Moving; + MarkerPlunging_Omega = new su2double[nMarkerPlunging_Omega](); } - if (nMarkerPlunging_Omega/3 != nMarker_Moving){ - SU2_MPI::Error("Number of SURFACE_PLUNGING_OMEGA must be three times the number of MARKER_MOVING, (x,y,z) per marker.", CURRENT_FUNCTION); + if (nMarkerPlunging_Omega / 3 != nMarker_Moving) { + SU2_MPI::Error( + "Number of SURFACE_PLUNGING_OMEGA must be three times the number of MARKER_MOVING, (x,y,z) per marker.", + CURRENT_FUNCTION); } - if (nMarkerPitching_Ampl == 0){ - nMarkerPitching_Ampl = 3*nMarker_Moving; - MarkerPitching_Ampl = new su2double[nMarkerPitching_Ampl] (); + if (nMarkerPitching_Ampl == 0) { + nMarkerPitching_Ampl = 3 * nMarker_Moving; + MarkerPitching_Ampl = new su2double[nMarkerPitching_Ampl](); } - if (nMarkerPitching_Ampl/3 != nMarker_Moving){ - SU2_MPI::Error("Number of SURFACE_PITCHING_AMPL must be three times the number of MARKER_MOVING, (x,y,z) per marker.", CURRENT_FUNCTION); + if (nMarkerPitching_Ampl / 3 != nMarker_Moving) { + SU2_MPI::Error( + "Number of SURFACE_PITCHING_AMPL must be three times the number of MARKER_MOVING, (x,y,z) per marker.", + CURRENT_FUNCTION); } - if (nMarkerPitching_Omega == 0){ - nMarkerPitching_Omega = 3*nMarker_Moving; - MarkerPitching_Omega = new su2double[nMarkerPitching_Omega] (); + if (nMarkerPitching_Omega == 0) { + nMarkerPitching_Omega = 3 * nMarker_Moving; + MarkerPitching_Omega = new su2double[nMarkerPitching_Omega](); } - if (nMarkerPitching_Omega/3 != nMarker_Moving){ - SU2_MPI::Error("Number of SURFACE_PITCHING_OMEGA must be three times the number of MARKER_MOVING, (x,y,z) per marker.", CURRENT_FUNCTION); + if (nMarkerPitching_Omega / 3 != nMarker_Moving) { + SU2_MPI::Error( + "Number of SURFACE_PITCHING_OMEGA must be three times the number of MARKER_MOVING, (x,y,z) per marker.", + CURRENT_FUNCTION); } - if (nMarkerPitching_Phase == 0){ - nMarkerPitching_Phase = 3*nMarker_Moving; - MarkerPitching_Phase = new su2double[nMarkerPitching_Phase] (); + if (nMarkerPitching_Phase == 0) { + nMarkerPitching_Phase = 3 * nMarker_Moving; + MarkerPitching_Phase = new su2double[nMarkerPitching_Phase](); } - if (nMarkerPitching_Phase/3 != nMarker_Moving){ - SU2_MPI::Error("Number of SURFACE_PITCHING_PHASE must be three times the number of MARKER_MOVING, (x,y,z) per marker.", CURRENT_FUNCTION); + if (nMarkerPitching_Phase / 3 != nMarker_Moving) { + SU2_MPI::Error( + "Number of SURFACE_PITCHING_PHASE must be three times the number of MARKER_MOVING, (x,y,z) per marker.", + CURRENT_FUNCTION); } - if (nMoveMotion_Origin == 0){ + if (nMoveMotion_Origin == 0) { nMoveMotion_Origin = nMarker_Moving; MoveMotion_Origin = new unsigned short[nMoveMotion_Origin]; - for (iMarker = 0; iMarker < nMarker_Moving; iMarker++){ + for (iMarker = 0; iMarker < nMarker_Moving; iMarker++) { MoveMotion_Origin[iMarker] = NO; } } - if (nMoveMotion_Origin != nMarker_Moving){ + if (nMoveMotion_Origin != nMarker_Moving) { SU2_MPI::Error("Number of MOVE_MOTION_ORIGIN must match number of MARKER_MOVING.", CURRENT_FUNCTION); } } @@ -4184,61 +4572,61 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i if (TimeMarching == TIME_MARCHING::HARMONIC_BALANCE) { HarmonicBalance_Period = GetHarmonicBalance_Period(); - if (HarmonicBalance_Period < 0) { + if (HarmonicBalance_Period < 0) { SU2_MPI::Error("Not a valid value for time period!!", CURRENT_FUNCTION); } /* Initialize the Harmonic balance Frequency pointer */ if (Omega_HB == nullptr) { Omega_HB = new su2double[nOmega_HB]; - for (unsigned short iZone = 0; iZone < nOmega_HB; iZone++ ) - Omega_HB[iZone] = 0.0; - } else { + for (unsigned short iZone = 0; iZone < nOmega_HB; iZone++) Omega_HB[iZone] = 0.0; + } else { if (nOmega_HB != nTimeInstances) { - SU2_MPI::Error("Length of omega_HB must match the number TIME_INSTANCES!!" , CURRENT_FUNCTION); + SU2_MPI::Error("Length of omega_HB must match the number TIME_INSTANCES!!", CURRENT_FUNCTION); } } } /*--- Force number of span-wise section to 1 if 2D case ---*/ - if(val_nDim ==2){ - nSpanWiseSections_User=1; - Kind_SpanWise= EQUISPACED; + if (val_nDim == 2) { + nSpanWiseSections_User = 1; + Kind_SpanWise = EQUISPACED; } /*--- Set number of TurboPerformance markers ---*/ - if(nMarker_Turbomachinery > 0){ - if(nMarker_Turbomachinery > 1){ - nMarker_TurboPerformance = nMarker_Turbomachinery + SU2_TYPE::Int(nMarker_Turbomachinery/2) + 1; - }else{ + if (nMarker_Turbomachinery > 0) { + if (nMarker_Turbomachinery > 1) { + nMarker_TurboPerformance = nMarker_Turbomachinery + SU2_TYPE::Int(nMarker_Turbomachinery / 2) + 1; + } else { nMarker_TurboPerformance = nMarker_Turbomachinery; } } else { nMarker_TurboPerformance = 0; - nSpanWiseSections =1; + nSpanWiseSections = 1; } /*--- Set number of TurboPerformance markers ---*/ - if(nMarker_Turbomachinery != 0){ + if (nMarker_Turbomachinery != 0) { nSpan_iZones = new unsigned short[nZone]; } /*--- Set number of TurboPerformance markers ---*/ - if(GetGrid_Movement() && RampRotatingFrame && !DiscreteAdjoint){ + if (GetGrid_Movement() && RampRotatingFrame && !DiscreteAdjoint) { FinalRotation_Rate_Z = Rotation_Rate[2]; - if(abs(FinalRotation_Rate_Z) > 0.0){ + if (abs(FinalRotation_Rate_Z) > 0.0) { Rotation_Rate[2] = rampRotFrame_coeff[0]; } } - if(RampOutletPressure && !DiscreteAdjoint){ - for (iMarker = 0; iMarker < nMarker_Giles; iMarker++){ - if (Kind_Data_Giles[iMarker] == STATIC_PRESSURE || Kind_Data_Giles[iMarker] == STATIC_PRESSURE_1D || Kind_Data_Giles[iMarker] == RADIAL_EQUILIBRIUM ){ + if (RampOutletPressure && !DiscreteAdjoint) { + for (iMarker = 0; iMarker < nMarker_Giles; iMarker++) { + if (Kind_Data_Giles[iMarker] == STATIC_PRESSURE || Kind_Data_Giles[iMarker] == STATIC_PRESSURE_1D || + Kind_Data_Giles[iMarker] == RADIAL_EQUILIBRIUM) { FinalOutletPressure = Giles_Var1[iMarker]; Giles_Var1[iMarker] = rampOutPres_coeff[0]; } } - for (iMarker = 0; iMarker < nMarker_Riemann; iMarker++){ - if (Kind_Data_Riemann[iMarker] == STATIC_PRESSURE || Kind_Data_Riemann[iMarker] == RADIAL_EQUILIBRIUM){ + for (iMarker = 0; iMarker < nMarker_Riemann; iMarker++) { + if (Kind_Data_Riemann[iMarker] == STATIC_PRESSURE || Kind_Data_Riemann[iMarker] == RADIAL_EQUILIBRIUM) { FinalOutletPressure = Riemann_Var1[iMarker]; Riemann_Var1[iMarker] = rampOutPres_coeff[0]; } @@ -4246,12 +4634,12 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i } /*--- Check on extra Relaxation factor for Giles---*/ - if(extrarelfac[1] > 0.5){ + if (extrarelfac[1] > 0.5) { extrarelfac[1] = 0.5; } - /*--- Use the various rigid-motion input frequencies to determine the period to be used with harmonic balance cases. - There are THREE types of motion to consider, namely: rotation, pitching, and plunging. - The largest period of motion is the one to be used for harmonic balance calculations. ---*/ + /*--- Use the various rigid-motion input frequencies to determine the period to be used with harmonic balance cases. + There are THREE types of motion to consider, namely: rotation, pitching, and plunging. + The largest period of motion is the one to be used for harmonic balance calculations. ---*/ /*if (Unsteady_Simulation == HARMONIC_BALANCE) { if (!(GetGrid_Movement())) { @@ -4266,27 +4654,21 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i //--- rotation: ---// - su2double Omega_mag_rot = sqrt(pow(Rotation_Rate_X[ZONE_0],2)+pow(Rotation_Rate_Y[ZONE_0],2)+pow(Rotation_Rate_Z[ZONE_0],2)); - if (Omega_mag_rot > 0) - periods[0] = 2*PI_NUMBER/Omega_mag_rot; - else - periods[0] = 0.0; + su2double Omega_mag_rot = + sqrt(pow(Rotation_Rate_X[ZONE_0],2)+pow(Rotation_Rate_Y[ZONE_0],2)+pow(Rotation_Rate_Z[ZONE_0],2)); if (Omega_mag_rot + > 0) periods[0] = 2*PI_NUMBER/Omega_mag_rot; else periods[0] = 0.0; //--- pitching: ---// - su2double Omega_mag_pitch = sqrt(pow(Pitching_Omega_X[ZONE_0],2)+pow(Pitching_Omega_Y[ZONE_0],2)+pow(Pitching_Omega_Z[ZONE_0],2)); - if (Omega_mag_pitch > 0) - periods[1] = 2*PI_NUMBER/Omega_mag_pitch; - else - periods[1] = 0.0; + su2double Omega_mag_pitch = + sqrt(pow(Pitching_Omega_X[ZONE_0],2)+pow(Pitching_Omega_Y[ZONE_0],2)+pow(Pitching_Omega_Z[ZONE_0],2)); if + (Omega_mag_pitch > 0) periods[1] = 2*PI_NUMBER/Omega_mag_pitch; else periods[1] = 0.0; //--- plunging: ---// - su2double Omega_mag_plunge = sqrt(pow(Plunging_Omega_X[ZONE_0],2)+pow(Plunging_Omega_Y[ZONE_0],2)+pow(Plunging_Omega_Z[ZONE_0],2)); - if (Omega_mag_plunge > 0) - periods[2] = 2*PI_NUMBER/Omega_mag_plunge; - else - periods[2] = 0.0; + su2double Omega_mag_plunge = + sqrt(pow(Plunging_Omega_X[ZONE_0],2)+pow(Plunging_Omega_Y[ZONE_0],2)+pow(Plunging_Omega_Z[ZONE_0],2)); if + (Omega_mag_plunge > 0) periods[2] = 2*PI_NUMBER/Omega_mag_plunge; else periods[2] = 0.0; //--- determine which period is largest ---// @@ -4302,85 +4684,76 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i }*/ - /*--- In case the moment origin coordinates have not been declared in the config file, set them equal to zero for safety. Also check to make sure that for each marker, a value has been declared for the moment origin. Unless only one value was specified, then set this value for all the markers being monitored. ---*/ - - if ((nRefOriginMoment_X != nRefOriginMoment_Y) || (nRefOriginMoment_X != nRefOriginMoment_Z) ) { - SU2_MPI::Error("ERROR: Length of REF_ORIGIN_MOMENT_X, REF_ORIGIN_MOMENT_Y and REF_ORIGIN_MOMENT_Z must be the same!!", CURRENT_FUNCTION); + if ((nRefOriginMoment_X != nRefOriginMoment_Y) || (nRefOriginMoment_X != nRefOriginMoment_Z)) { + SU2_MPI::Error( + "ERROR: Length of REF_ORIGIN_MOMENT_X, REF_ORIGIN_MOMENT_Y and REF_ORIGIN_MOMENT_Z must be the same!!", + CURRENT_FUNCTION); } if (RefOriginMoment_X == nullptr) { RefOriginMoment_X = new su2double[nMarker_Monitoring]; - for (iMarker = 0; iMarker < nMarker_Monitoring; iMarker++ ) - RefOriginMoment_X[iMarker] = 0.0; + for (iMarker = 0; iMarker < nMarker_Monitoring; iMarker++) RefOriginMoment_X[iMarker] = 0.0; } else { if (nRefOriginMoment_X == 1) { - su2double aux_RefOriginMoment_X = RefOriginMoment_X[0]; - delete [] RefOriginMoment_X; + delete[] RefOriginMoment_X; RefOriginMoment_X = new su2double[nMarker_Monitoring]; nRefOriginMoment_X = nMarker_Monitoring; - for (iMarker = 0; iMarker < nMarker_Monitoring; iMarker++ ) - RefOriginMoment_X[iMarker] = aux_RefOriginMoment_X; - } - else if (nRefOriginMoment_X != nMarker_Monitoring) { - SU2_MPI::Error("ERROR: Length of REF_ORIGIN_MOMENT_X must match number of Monitoring Markers!!", CURRENT_FUNCTION); + for (iMarker = 0; iMarker < nMarker_Monitoring; iMarker++) RefOriginMoment_X[iMarker] = aux_RefOriginMoment_X; + } else if (nRefOriginMoment_X != nMarker_Monitoring) { + SU2_MPI::Error("ERROR: Length of REF_ORIGIN_MOMENT_X must match number of Monitoring Markers!!", + CURRENT_FUNCTION); } } if (RefOriginMoment_Y == nullptr) { RefOriginMoment_Y = new su2double[nMarker_Monitoring]; - for (iMarker = 0; iMarker < nMarker_Monitoring; iMarker++ ) - RefOriginMoment_Y[iMarker] = 0.0; + for (iMarker = 0; iMarker < nMarker_Monitoring; iMarker++) RefOriginMoment_Y[iMarker] = 0.0; } else { if (nRefOriginMoment_Y == 1) { - su2double aux_RefOriginMoment_Y = RefOriginMoment_Y[0]; - delete [] RefOriginMoment_Y; + delete[] RefOriginMoment_Y; RefOriginMoment_Y = new su2double[nMarker_Monitoring]; nRefOriginMoment_Y = nMarker_Monitoring; - for (iMarker = 0; iMarker < nMarker_Monitoring; iMarker++ ) - RefOriginMoment_Y[iMarker] = aux_RefOriginMoment_Y; - } - else if (nRefOriginMoment_Y != nMarker_Monitoring) { - SU2_MPI::Error("ERROR: Length of REF_ORIGIN_MOMENT_Y must match number of Monitoring Markers!!", CURRENT_FUNCTION); + for (iMarker = 0; iMarker < nMarker_Monitoring; iMarker++) RefOriginMoment_Y[iMarker] = aux_RefOriginMoment_Y; + } else if (nRefOriginMoment_Y != nMarker_Monitoring) { + SU2_MPI::Error("ERROR: Length of REF_ORIGIN_MOMENT_Y must match number of Monitoring Markers!!", + CURRENT_FUNCTION); } } if (RefOriginMoment_Z == nullptr) { RefOriginMoment_Z = new su2double[nMarker_Monitoring]; - for (iMarker = 0; iMarker < nMarker_Monitoring; iMarker++ ) - RefOriginMoment_Z[iMarker] = 0.0; + for (iMarker = 0; iMarker < nMarker_Monitoring; iMarker++) RefOriginMoment_Z[iMarker] = 0.0; } else { if (nRefOriginMoment_Z == 1) { - su2double aux_RefOriginMoment_Z = RefOriginMoment_Z[0]; - delete [] RefOriginMoment_Z; + delete[] RefOriginMoment_Z; RefOriginMoment_Z = new su2double[nMarker_Monitoring]; nRefOriginMoment_Z = nMarker_Monitoring; - for (iMarker = 0; iMarker < nMarker_Monitoring; iMarker++ ) - RefOriginMoment_Z[iMarker] = aux_RefOriginMoment_Z; - } - else if (nRefOriginMoment_Z != nMarker_Monitoring) { - SU2_MPI::Error("ERROR: Length of REF_ORIGIN_MOMENT_Z must match number of Monitoring Markers!!", CURRENT_FUNCTION); + for (iMarker = 0; iMarker < nMarker_Monitoring; iMarker++) RefOriginMoment_Z[iMarker] = aux_RefOriginMoment_Z; + } else if (nRefOriginMoment_Z != nMarker_Monitoring) { + SU2_MPI::Error("ERROR: Length of REF_ORIGIN_MOMENT_Z must match number of Monitoring Markers!!", + CURRENT_FUNCTION); } } /*--- Set the boolean flag if we are carrying out an aeroelastic simulation. ---*/ - Aeroelastic_Simulation = GetGrid_Movement() && (GetSurface_Movement(AEROELASTIC) || GetSurface_Movement(AEROELASTIC_RIGID_MOTION)); + Aeroelastic_Simulation = + GetGrid_Movement() && (GetSurface_Movement(AEROELASTIC) || GetSurface_Movement(AEROELASTIC_RIGID_MOTION)); /*--- Initializing the size for the solutions of the Aeroelastic problem. ---*/ - if (GetGrid_Movement() && Aeroelastic_Simulation) { Aeroelastic_np1.resize(nMarker_Monitoring); Aeroelastic_n.resize(nMarker_Monitoring); @@ -4389,11 +4762,11 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i Aeroelastic_np1[iMarker].resize(2); Aeroelastic_n[iMarker].resize(2); Aeroelastic_n1[iMarker].resize(2); - for (int i =0; i<2; i++) { + for (int i = 0; i < 2; i++) { Aeroelastic_np1[iMarker][i].resize(2); Aeroelastic_n[iMarker][i].resize(2); Aeroelastic_n1[iMarker][i].resize(2); - for (int j=0; j<2; j++) { + for (int j = 0; j < 2; j++) { Aeroelastic_np1[iMarker][i][j] = 0.0; Aeroelastic_n[iMarker][i][j] = 0.0; Aeroelastic_n1[iMarker][i][j] = 0.0; @@ -4407,7 +4780,7 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i if (GetGrid_Movement() && Aeroelastic_Simulation) { Aeroelastic_pitch = new su2double[nMarker_Monitoring]; Aeroelastic_plunge = new su2double[nMarker_Monitoring]; - for (iMarker = 0; iMarker < nMarker_Monitoring; iMarker++ ) { + for (iMarker = 0; iMarker < nMarker_Monitoring; iMarker++) { Aeroelastic_pitch[iMarker] = 0.0; Aeroelastic_plunge[iMarker] = 0.0; } @@ -4416,18 +4789,14 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i FinestMesh = MESH_0; if (MGCycle == FULLMG_CYCLE) FinestMesh = nMGLevels; - if ((Kind_Solver == MAIN_SOLVER::NAVIER_STOKES) && - (Kind_Turb_Model != TURB_MODEL::NONE)) + if ((Kind_Solver == MAIN_SOLVER::NAVIER_STOKES) && (Kind_Turb_Model != TURB_MODEL::NONE)) Kind_Solver = MAIN_SOLVER::RANS; - if ((Kind_Solver == MAIN_SOLVER::INC_NAVIER_STOKES) && - (Kind_Turb_Model != TURB_MODEL::NONE)) + if ((Kind_Solver == MAIN_SOLVER::INC_NAVIER_STOKES) && (Kind_Turb_Model != TURB_MODEL::NONE)) Kind_Solver = MAIN_SOLVER::INC_RANS; - if (Kind_Solver == MAIN_SOLVER::EULER || - Kind_Solver == MAIN_SOLVER::INC_EULER || - Kind_Solver == MAIN_SOLVER::NEMO_EULER || - Kind_Solver == MAIN_SOLVER::FEM_EULER) + if (Kind_Solver == MAIN_SOLVER::EULER || Kind_Solver == MAIN_SOLVER::INC_EULER || + Kind_Solver == MAIN_SOLVER::NEMO_EULER || Kind_Solver == MAIN_SOLVER::FEM_EULER) Kind_Turb_Model = TURB_MODEL::NONE; Kappa_2nd_Flow = jst_coeff[0]; @@ -4438,113 +4807,89 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i /*--- Make the MG_PreSmooth, MG_PostSmooth, and MG_CorrecSmooth arrays consistent with nMGLevels ---*/ - auto * tmp_smooth = new unsigned short[nMGLevels+1]; - - if ((nMG_PreSmooth != nMGLevels+1) && (nMG_PreSmooth != 0)) { - if (nMG_PreSmooth > nMGLevels+1) { + auto* tmp_smooth = new unsigned short[nMGLevels + 1]; + if ((nMG_PreSmooth != nMGLevels + 1) && (nMG_PreSmooth != 0)) { + if (nMG_PreSmooth > nMGLevels + 1) { /*--- Truncate by removing unnecessary elements at the end ---*/ - for (unsigned int i = 0; i <= nMGLevels; i++) - tmp_smooth[i] = MG_PreSmooth[i]; - delete [] MG_PreSmooth; - MG_PreSmooth=nullptr; - } - else { - + for (unsigned int i = 0; i <= nMGLevels; i++) tmp_smooth[i] = MG_PreSmooth[i]; + delete[] MG_PreSmooth; + MG_PreSmooth = nullptr; + } else { /*--- Add additional elements equal to last element ---*/ - for (unsigned int i = 0; i < nMG_PreSmooth; i++) - tmp_smooth[i] = MG_PreSmooth[i]; - for (unsigned int i = nMG_PreSmooth; i <= nMGLevels; i++) - tmp_smooth[i] = MG_PreSmooth[nMG_PreSmooth-1]; - delete [] MG_PreSmooth; - MG_PreSmooth=nullptr; + for (unsigned int i = 0; i < nMG_PreSmooth; i++) tmp_smooth[i] = MG_PreSmooth[i]; + for (unsigned int i = nMG_PreSmooth; i <= nMGLevels; i++) tmp_smooth[i] = MG_PreSmooth[nMG_PreSmooth - 1]; + delete[] MG_PreSmooth; + MG_PreSmooth = nullptr; } - nMG_PreSmooth = nMGLevels+1; + nMG_PreSmooth = nMGLevels + 1; MG_PreSmooth = new unsigned short[nMG_PreSmooth]; - for (unsigned int i = 0; i < nMG_PreSmooth; i++) - MG_PreSmooth[i] = tmp_smooth[i]; + for (unsigned int i = 0; i < nMG_PreSmooth; i++) MG_PreSmooth[i] = tmp_smooth[i]; } if ((nMGLevels != 0) && (nMG_PreSmooth == 0)) { - delete [] MG_PreSmooth; - nMG_PreSmooth = nMGLevels+1; + delete[] MG_PreSmooth; + nMG_PreSmooth = nMGLevels + 1; MG_PreSmooth = new unsigned short[nMG_PreSmooth]; - for (unsigned int i = 0; i < nMG_PreSmooth; i++) - MG_PreSmooth[i] = i+1; + for (unsigned int i = 0; i < nMG_PreSmooth; i++) MG_PreSmooth[i] = i + 1; } - if ((nMG_PostSmooth != nMGLevels+1) && (nMG_PostSmooth != 0)) { - if (nMG_PostSmooth > nMGLevels+1) { - + if ((nMG_PostSmooth != nMGLevels + 1) && (nMG_PostSmooth != 0)) { + if (nMG_PostSmooth > nMGLevels + 1) { /*--- Truncate by removing unnecessary elements at the end ---*/ - for (unsigned int i = 0; i <= nMGLevels; i++) - tmp_smooth[i] = MG_PostSmooth[i]; - delete [] MG_PostSmooth; - MG_PostSmooth=nullptr; - } - else { - + for (unsigned int i = 0; i <= nMGLevels; i++) tmp_smooth[i] = MG_PostSmooth[i]; + delete[] MG_PostSmooth; + MG_PostSmooth = nullptr; + } else { /*--- Add additional elements equal to last element ---*/ - for (unsigned int i = 0; i < nMG_PostSmooth; i++) - tmp_smooth[i] = MG_PostSmooth[i]; - for (unsigned int i = nMG_PostSmooth; i <= nMGLevels; i++) - tmp_smooth[i] = MG_PostSmooth[nMG_PostSmooth-1]; - delete [] MG_PostSmooth; - MG_PostSmooth=nullptr; + for (unsigned int i = 0; i < nMG_PostSmooth; i++) tmp_smooth[i] = MG_PostSmooth[i]; + for (unsigned int i = nMG_PostSmooth; i <= nMGLevels; i++) tmp_smooth[i] = MG_PostSmooth[nMG_PostSmooth - 1]; + delete[] MG_PostSmooth; + MG_PostSmooth = nullptr; } - nMG_PostSmooth = nMGLevels+1; + nMG_PostSmooth = nMGLevels + 1; MG_PostSmooth = new unsigned short[nMG_PostSmooth]; - for (unsigned int i = 0; i < nMG_PostSmooth; i++) - MG_PostSmooth[i] = tmp_smooth[i]; - + for (unsigned int i = 0; i < nMG_PostSmooth; i++) MG_PostSmooth[i] = tmp_smooth[i]; } if ((nMGLevels != 0) && (nMG_PostSmooth == 0)) { - delete [] MG_PostSmooth; - nMG_PostSmooth = nMGLevels+1; + delete[] MG_PostSmooth; + nMG_PostSmooth = nMGLevels + 1; MG_PostSmooth = new unsigned short[nMG_PostSmooth]; - for (unsigned int i = 0; i < nMG_PostSmooth; i++) - MG_PostSmooth[i] = 0; + for (unsigned int i = 0; i < nMG_PostSmooth; i++) MG_PostSmooth[i] = 0; } - if ((nMG_CorrecSmooth != nMGLevels+1) && (nMG_CorrecSmooth != 0)) { - if (nMG_CorrecSmooth > nMGLevels+1) { - + if ((nMG_CorrecSmooth != nMGLevels + 1) && (nMG_CorrecSmooth != 0)) { + if (nMG_CorrecSmooth > nMGLevels + 1) { /*--- Truncate by removing unnecessary elements at the end ---*/ - for (unsigned int i = 0; i <= nMGLevels; i++) - tmp_smooth[i] = MG_CorrecSmooth[i]; - delete [] MG_CorrecSmooth; + for (unsigned int i = 0; i <= nMGLevels; i++) tmp_smooth[i] = MG_CorrecSmooth[i]; + delete[] MG_CorrecSmooth; MG_CorrecSmooth = nullptr; - } - else { - + } else { /*--- Add additional elements equal to last element ---*/ - for (unsigned int i = 0; i < nMG_CorrecSmooth; i++) - tmp_smooth[i] = MG_CorrecSmooth[i]; + for (unsigned int i = 0; i < nMG_CorrecSmooth; i++) tmp_smooth[i] = MG_CorrecSmooth[i]; for (unsigned int i = nMG_CorrecSmooth; i <= nMGLevels; i++) - tmp_smooth[i] = MG_CorrecSmooth[nMG_CorrecSmooth-1]; - delete [] MG_CorrecSmooth; + tmp_smooth[i] = MG_CorrecSmooth[nMG_CorrecSmooth - 1]; + delete[] MG_CorrecSmooth; MG_CorrecSmooth = nullptr; } - nMG_CorrecSmooth = nMGLevels+1; + nMG_CorrecSmooth = nMGLevels + 1; MG_CorrecSmooth = new unsigned short[nMG_CorrecSmooth]; - for (unsigned int i = 0; i < nMG_CorrecSmooth; i++) - MG_CorrecSmooth[i] = tmp_smooth[i]; + for (unsigned int i = 0; i < nMG_CorrecSmooth; i++) MG_CorrecSmooth[i] = tmp_smooth[i]; } if ((nMGLevels != 0) && (nMG_CorrecSmooth == 0)) { - delete [] MG_CorrecSmooth; - nMG_CorrecSmooth = nMGLevels+1; + delete[] MG_CorrecSmooth; + nMG_CorrecSmooth = nMGLevels + 1; MG_CorrecSmooth = new unsigned short[nMG_CorrecSmooth]; - for (unsigned int i = 0; i < nMG_CorrecSmooth; i++) - MG_CorrecSmooth[i] = 0; + for (unsigned int i = 0; i < nMG_CorrecSmooth; i++) MG_CorrecSmooth[i] = 0; } /*--- Override MG Smooth parameters ---*/ @@ -4564,27 +4909,29 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i if (Kind_Solver == MAIN_SOLVER::RANS) Kind_Solver = MAIN_SOLVER::ADJ_RANS; } - nCFL = nMGLevels+1; + nCFL = nMGLevels + 1; CFL = new su2double[nCFL]; CFL[0] = CFLFineGrid; /*--- Handle optional CFL adapt parameter values ---*/ if (nCFL_AdaptParam < default_cfl_adapt.size()) { - auto newParam = new su2double [default_cfl_adapt.size()]; + auto newParam = new su2double[default_cfl_adapt.size()]; for (iCFL = 0; iCFL < default_cfl_adapt.size(); ++iCFL) { - if (iCFL < nCFL_AdaptParam) newParam[iCFL] = CFL_AdaptParam[iCFL]; - else newParam[iCFL] = default_cfl_adapt[iCFL]; + if (iCFL < nCFL_AdaptParam) + newParam[iCFL] = CFL_AdaptParam[iCFL]; + else + newParam[iCFL] = default_cfl_adapt[iCFL]; } swap(newParam, CFL_AdaptParam); - delete [] newParam; + delete[] newParam; nCFL_AdaptParam = default_cfl_adapt.size(); } /*--- Evaluate when the Cl should be evaluated ---*/ - Iter_Fixed_CM = SU2_TYPE::Int(nInnerIter / (su2double(Update_iH)+1)); - Iter_Fixed_NetThrust = SU2_TYPE::Int(nInnerIter / (su2double(Update_BCThrust)+1)); + Iter_Fixed_CM = SU2_TYPE::Int(nInnerIter / (su2double(Update_iH) + 1)); + Iter_Fixed_NetThrust = SU2_TYPE::Int(nInnerIter / (su2double(Update_BCThrust) + 1)); /*--- Setting relaxation factor and CFL for the adjoint runs ---*/ @@ -4592,8 +4939,8 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i CFL[0] = CFL[0] * CFLRedCoeff_AdjFlow; CFL_AdaptParam[2] *= CFLRedCoeff_AdjFlow; CFL_AdaptParam[3] *= CFLRedCoeff_AdjFlow; - Iter_Fixed_CM = SU2_TYPE::Int(su2double (Iter_Fixed_CM) / CFLRedCoeff_AdjFlow); - Iter_Fixed_NetThrust = SU2_TYPE::Int(su2double (Iter_Fixed_NetThrust) / CFLRedCoeff_AdjFlow); + Iter_Fixed_CM = SU2_TYPE::Int(su2double(Iter_Fixed_CM) / CFLRedCoeff_AdjFlow); + Iter_Fixed_NetThrust = SU2_TYPE::Int(su2double(Iter_Fixed_NetThrust) / CFLRedCoeff_AdjFlow); } if ((DiscreteAdjoint) && (Inconsistent_Disc)) { @@ -4607,40 +4954,46 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i if (Update_AoA_Iter_Limit == 0 && Fixed_CL_Mode) { SU2_MPI::Error("ERROR: Please specify non-zero UPDATE_AOA_ITER_LIMIT.", CURRENT_FUNCTION); } - if (Iter_Fixed_CM == 0) { Iter_Fixed_CM = nInnerIter+1; Update_iH = 0; } - if (Iter_Fixed_NetThrust == 0) { Iter_Fixed_NetThrust = nInnerIter+1; Update_BCThrust = 0; } + if (Iter_Fixed_CM == 0) { + Iter_Fixed_CM = nInnerIter + 1; + Update_iH = 0; + } + if (Iter_Fixed_NetThrust == 0) { + Iter_Fixed_NetThrust = nInnerIter + 1; + Update_BCThrust = 0; + } - for (iCFL = 1; iCFL < nCFL; iCFL++) - CFL[iCFL] = CFL[iCFL-1]; + for (iCFL = 1; iCFL < nCFL; iCFL++) CFL[iCFL] = CFL[iCFL - 1]; if (nRKStep == 0) { nRKStep = 1; - RK_Alpha_Step = new su2double[1]; RK_Alpha_Step[0] = 1.0; + RK_Alpha_Step = new su2double[1]; + RK_Alpha_Step[0] = 1.0; } /* Check if the byte alignment of the matrix multiplications is a multiple of 64. */ - if( byteAlignmentMatMul%64 ) { + if (byteAlignmentMatMul % 64) { SU2_MPI::Error("ALIGNED_BYTES_MATMUL must be a multiple of 64.", CURRENT_FUNCTION); } /* Determine the value of sizeMatMulPadding, which is the matrix size in the vectorization direction when padding is applied to have optimal performance in the matrix multiplications. */ - sizeMatMulPadding = byteAlignmentMatMul/sizeof(passivedouble); + sizeMatMulPadding = byteAlignmentMatMul / sizeof(passivedouble); /* Correct the number of time levels for time accurate local time stepping, if needed. */ - if (nLevels_TimeAccurateLTS == 0) nLevels_TimeAccurateLTS = 1; - if (nLevels_TimeAccurateLTS > 15) nLevels_TimeAccurateLTS = 15; + if (nLevels_TimeAccurateLTS == 0) nLevels_TimeAccurateLTS = 1; + if (nLevels_TimeAccurateLTS > 15) nLevels_TimeAccurateLTS = 15; /* Check that no time accurate local time stepping is specified for time integration schemes other than ADER. */ if (Kind_TimeIntScheme_FEM_Flow != ADER_DG && nLevels_TimeAccurateLTS != 1) { - - if (rank==MASTER_NODE) { - cout << endl << "WARNING: " - << nLevels_TimeAccurateLTS << " levels specified for time accurate local time stepping." << endl + if (rank == MASTER_NODE) { + cout << endl + << "WARNING: " << nLevels_TimeAccurateLTS << " levels specified for time accurate local time stepping." + << endl << "Time accurate local time stepping is only possible for ADER, hence this option is not used." << endl << endl; } @@ -4649,15 +5002,13 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i } if (Kind_TimeIntScheme_FEM_Flow == ADER_DG) { - TimeMarching = TIME_MARCHING::TIME_STEPPING; // Only time stepping for ADER. /* If time accurate local time stepping is used, make sure that an unsteady CFL is specified. If not, terminate. */ if (nLevels_TimeAccurateLTS != 1) { - if(Unst_CFL == 0.0) - SU2_MPI::Error("ERROR: Unsteady CFL not specified for time accurate local time stepping.", - CURRENT_FUNCTION); + if (Unst_CFL == 0.0) + SU2_MPI::Error("ERROR: Unsteady CFL not specified for time accurate local time stepping.", CURRENT_FUNCTION); } /* Determine the location of the ADER time DOFs, which are the Gauss-Legendre @@ -4667,75 +5018,86 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i GaussJacobi.GetQuadraturePoints(0.0, 0.0, -1.0, 1.0, GLPoints, GLWeights); TimeDOFsADER_DG = new su2double[nTimeDOFsADER_DG]; - for(unsigned short i=0; i1) { + else if (top_optim_nKernelParams == 1 && top_optim_nKernel > 1) { su2double tmp = top_optim_kernel_params[0]; - delete [] top_optim_kernel_params; + delete[] top_optim_kernel_params; top_optim_nKernelParams = top_optim_nKernel; - top_optim_kernel_params = new su2double [top_optim_nKernel]; - for (unsigned short i=0; i1) { + else if (top_optim_nRadius == 1 && top_optim_nKernel > 1) { su2double tmp = top_optim_filter_radius[0]; - delete [] top_optim_filter_radius; + delete[] top_optim_filter_radius; top_optim_nRadius = top_optim_nKernel; - top_optim_filter_radius = new su2double [top_optim_nKernel]; - for (unsigned short i=0; i 1) { - SU2_MPI::Error("SURFACE_SPECIES_0 and SURFACE_SPECIES_VARIANCE currently can only handle one entry to MARKER_ANALYZE.", CURRENT_FUNCTION); + SU2_MPI::Error( + "SURFACE_SPECIES_0 and SURFACE_SPECIES_VARIANCE currently can only handle one entry to MARKER_ANALYZE.", + CURRENT_FUNCTION); } } - if(Kind_TimeIntScheme_Species != EULER_IMPLICIT && - Kind_TimeIntScheme_Species != EULER_EXPLICIT){ - SU2_MPI::Error("Only TIME_DISCRE_TURB = EULER_IMPLICIT, EULER_EXPLICIT have been implemented in the scalar solver.", CURRENT_FUNCTION); + if (Kind_TimeIntScheme_Species != EULER_IMPLICIT && Kind_TimeIntScheme_Species != EULER_EXPLICIT) { + SU2_MPI::Error( + "Only TIME_DISCRE_TURB = EULER_IMPLICIT, EULER_EXPLICIT have been implemented in the scalar solver.", + CURRENT_FUNCTION); } /*--- If Species clipping is on, make sure bounds are given by the user. ---*/ if (Species_Clipping) if (!(OptionIsSet("SPECIES_CLIPPING_MIN") && OptionIsSet("SPECIES_CLIPPING_MAX"))) - SU2_MPI::Error("SPECIES_CLIPPING= YES requires the options SPECIES_CLIPPING_MIN/MAX to set the clipping values.", CURRENT_FUNCTION); + SU2_MPI::Error( + "SPECIES_CLIPPING= YES requires the options SPECIES_CLIPPING_MIN/MAX to set the clipping values.", + CURRENT_FUNCTION); /*--- Make sure a Diffusivity has been set for Constant Diffusivity. ---*/ - if (Kind_Diffusivity_Model == DIFFUSIVITYMODEL::CONSTANT_DIFFUSIVITY && - !(OptionIsSet("DIFFUSIVITY_CONSTANT"))) - SU2_MPI::Error("A DIFFUSIVITY_CONSTANT= has to be set with DIFFUSIVITY_MODEL= CONSTANT_DIFFUSIVITY.", CURRENT_FUNCTION); + if (Kind_Diffusivity_Model == DIFFUSIVITYMODEL::CONSTANT_DIFFUSIVITY && !(OptionIsSet("DIFFUSIVITY_CONSTANT"))) + SU2_MPI::Error("A DIFFUSIVITY_CONSTANT= has to be set with DIFFUSIVITY_MODEL= CONSTANT_DIFFUSIVITY.", + CURRENT_FUNCTION); /*--- Check whether the number of entries of the constant Lewis number equals the number of transported scalar equations solved. nConstant_Lewis_Number is used because it is required for the diffusivity fluid mixing @@ -5439,8 +5849,7 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i nSpecies_options.push_back(nSpecies_Init); if (Species_Clipping) nSpecies_options.insert(nSpecies_options.end(), {nSpecies_Clipping_Min, nSpecies_Clipping_Max}); - if (nMarker_Inlet_Species > 0) - nSpecies_options.push_back(nSpecies_per_Inlet); + if (nMarker_Inlet_Species > 0) nSpecies_options.push_back(nSpecies_per_Inlet); // Add more options for size check here. /*--- nSpecies_Init is the master, but it simply checks for consistency. ---*/ @@ -5451,7 +5860,8 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i /*--- Once consistency is checked set the var that is used throughout the code. ---*/ nSpecies = nSpecies_Init; - /*--- Check whether some variables (or their sums) are in physical bounds. [0,1] for species related quantities. ---*/ + /*--- Check whether some variables (or their sums) are in physical bounds. [0,1] for species related quantities. + * ---*/ /*--- Note, only for species transport, not for flamelet model ---*/ if (Kind_Species_Model == SPECIES_MODEL::SPECIES_TRANSPORT) { su2double Species_Init_Sum = 0.0; @@ -5471,14 +5881,15 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i } } - } // species transport checks + } // species transport checks /*--- Define some variables for flamelet model. ---*/ if (Kind_Species_Model == SPECIES_MODEL::FLAMELET) { /*--- The controlling variables are progress variable, total enthalpy, and optionally mixture fraction ---*/ - //n_control_vars = nSpecies - n_user_scalars; + // n_control_vars = nSpecies - n_user_scalars; if (n_control_vars != (nSpecies - n_user_scalars)) - SU2_MPI::Error("Number of initial species incompatbile with number of controlling variables and user scalars.", CURRENT_FUNCTION); + SU2_MPI::Error("Number of initial species incompatbile with number of controlling variables and user scalars.", + CURRENT_FUNCTION); /*--- We can have additional user defined transported scalars ---*/ n_scalars = n_control_vars + n_user_scalars; } @@ -5489,40 +5900,32 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i } void CConfig::SetMarkers(SU2_COMPONENT val_software) { - - unsigned short iMarker_All, iMarker_CfgFile, iMarker_Euler, iMarker_Custom, - iMarker_FarField, iMarker_SymWall, iMarker_PerBound, - iMarker_NearFieldBound, iMarker_Fluid_InterfaceBound, - iMarker_Inlet, iMarker_Riemann, iMarker_Giles, iMarker_Outlet, - iMarker_Smoluchowski_Maxwell, - iMarker_Isothermal,iMarker_HeatFlux,iMarker_HeatTansfer, - iMarker_EngineInflow, iMarker_EngineExhaust, iMarker_Damper, - iMarker_Displacement, iMarker_Load, iMarker_Internal, - iMarker_Monitoring, iMarker_Designing, iMarker_GeoEval, iMarker_Plotting, iMarker_Analyze, - iMarker_DV, iMarker_Moving, iMarker_SobolevBC, iMarker_PyCustom, iMarker_Supersonic_Inlet, iMarker_Supersonic_Outlet, - iMarker_Clamped, iMarker_ZoneInterface, iMarker_CHTInterface, iMarker_Load_Dir, iMarker_Disp_Dir, - iMarker_Fluid_Load, iMarker_Deform_Mesh, iMarker_Deform_Mesh_Sym_Plane, - iMarker_ActDiskInlet, iMarker_ActDiskOutlet, - iMarker_Turbomachinery, iMarker_MixingPlaneInterface; + unsigned short iMarker_All, iMarker_CfgFile, iMarker_Euler, iMarker_Custom, iMarker_FarField, iMarker_SymWall, + iMarker_PerBound, iMarker_NearFieldBound, iMarker_Fluid_InterfaceBound, iMarker_Inlet, iMarker_Riemann, + iMarker_Giles, iMarker_Outlet, iMarker_Smoluchowski_Maxwell, iMarker_Isothermal, iMarker_HeatFlux, + iMarker_HeatTansfer, iMarker_EngineInflow, iMarker_EngineExhaust, iMarker_Damper, iMarker_Displacement, + iMarker_Load, iMarker_Internal, iMarker_Monitoring, iMarker_Designing, iMarker_GeoEval, iMarker_Plotting, + iMarker_Analyze, iMarker_DV, iMarker_Moving, iMarker_SobolevBC, iMarker_PyCustom, iMarker_Supersonic_Inlet, + iMarker_Supersonic_Outlet, iMarker_Clamped, iMarker_ZoneInterface, iMarker_CHTInterface, iMarker_Load_Dir, + iMarker_Disp_Dir, iMarker_Fluid_Load, iMarker_Deform_Mesh, iMarker_Deform_Mesh_Sym_Plane, iMarker_ActDiskInlet, + iMarker_ActDiskOutlet, iMarker_Turbomachinery, iMarker_MixingPlaneInterface; int size = SINGLE_NODE; SU2_MPI::Comm_size(SU2_MPI::GetComm(), &size); /*--- Compute the total number of markers in the config file ---*/ - nMarker_CfgFile = nMarker_Euler + nMarker_FarField + nMarker_SymWall + - nMarker_PerBound + nMarker_NearFieldBound + nMarker_Fluid_InterfaceBound + - nMarker_CHTInterface + nMarker_Inlet + nMarker_Riemann + nMarker_Smoluchowski_Maxwell + - nMarker_Giles + nMarker_Outlet + nMarker_Isothermal + - nMarker_HeatFlux + nMarker_HeatTransfer + - nMarker_EngineInflow + nMarker_EngineExhaust + nMarker_Internal + - nMarker_Supersonic_Inlet + nMarker_Supersonic_Outlet + nMarker_Displacement + nMarker_Load + - nMarker_Custom + nMarker_Damper + nMarker_Fluid_Load + - nMarker_Clamped + nMarker_Load_Dir + nMarker_Disp_Dir + - nMarker_ActDiskInlet + nMarker_ActDiskOutlet + nMarker_ZoneInterface; + nMarker_CfgFile = nMarker_Euler + nMarker_FarField + nMarker_SymWall + nMarker_PerBound + nMarker_NearFieldBound + + nMarker_Fluid_InterfaceBound + nMarker_CHTInterface + nMarker_Inlet + nMarker_Riemann + + nMarker_Smoluchowski_Maxwell + nMarker_Giles + nMarker_Outlet + nMarker_Isothermal + + nMarker_HeatFlux + nMarker_HeatTransfer + nMarker_EngineInflow + nMarker_EngineExhaust + + nMarker_Internal + nMarker_Supersonic_Inlet + nMarker_Supersonic_Outlet + nMarker_Displacement + + nMarker_Load + nMarker_Custom + nMarker_Damper + nMarker_Fluid_Load + nMarker_Clamped + + nMarker_Load_Dir + nMarker_Disp_Dir + nMarker_ActDiskInlet + nMarker_ActDiskOutlet + + nMarker_ZoneInterface; /*--- Add the possible send/receive domains ---*/ - nMarker_Max = nMarker_CfgFile + OVERHEAD*size; + nMarker_Max = nMarker_CfgFile + OVERHEAD * size; /*--- Basic dimensionalization of the markers (worst scenario) ---*/ @@ -5530,26 +5933,33 @@ void CConfig::SetMarkers(SU2_COMPONENT val_software) { /*--- Allocate the memory (markers in each domain) ---*/ - Marker_All_TagBound = new string[nMarker_All]; // Store the tag that correspond with each marker. - Marker_All_SendRecv = new short[nMarker_All] (); // +#domain (send), -#domain (receive). - Marker_All_KindBC = new unsigned short[nMarker_All] (); // Store the kind of boundary condition. - Marker_All_Monitoring = new unsigned short[nMarker_All] (); // Store whether the boundary should be monitored. - Marker_All_Designing = new unsigned short[nMarker_All] (); // Store whether the boundary should be designed. - Marker_All_Plotting = new unsigned short[nMarker_All] (); // Store whether the boundary should be plotted. - Marker_All_Analyze = new unsigned short[nMarker_All] (); // Store whether the boundary should be plotted. - Marker_All_ZoneInterface = new unsigned short[nMarker_All] (); // Store whether the boundary is in the FSI interface. - Marker_All_GeoEval = new unsigned short[nMarker_All] (); // Store whether the boundary should be geometry evaluation. - Marker_All_DV = new unsigned short[nMarker_All] (); // Store whether the boundary should be affected by design variables. - Marker_All_Moving = new unsigned short[nMarker_All] (); // Store whether the boundary should be in motion. - Marker_All_Deform_Mesh = new unsigned short[nMarker_All] (); // Store whether the boundary is deformable. - Marker_All_Deform_Mesh_Sym_Plane = new unsigned short[nMarker_All] (); //Store wheter the boundary will follow the deformation - Marker_All_Fluid_Load = new unsigned short[nMarker_All] (); // Store whether the boundary computes/applies fluid loads. - Marker_All_PyCustom = new unsigned short[nMarker_All] (); // Store whether the boundary is Python customizable. - Marker_All_PerBound = new short[nMarker_All] (); // Store whether the boundary belongs to a periodic boundary. - Marker_All_Turbomachinery = new unsigned short[nMarker_All] (); // Store whether the boundary is in needed for Turbomachinery computations. - Marker_All_TurbomachineryFlag = new unsigned short[nMarker_All] (); // Store whether the boundary has a flag for Turbomachinery computations. - Marker_All_MixingPlaneInterface = new unsigned short[nMarker_All] (); // Store whether the boundary has a in the MixingPlane interface. - Marker_All_SobolevBC = new unsigned short[nMarker_All] (); // Store wether the boundary should apply to the gradient smoothing. + Marker_All_TagBound = new string[nMarker_All]; // Store the tag that correspond with each marker. + Marker_All_SendRecv = new short[nMarker_All](); // +#domain (send), -#domain (receive). + Marker_All_KindBC = new unsigned short[nMarker_All](); // Store the kind of boundary condition. + Marker_All_Monitoring = new unsigned short[nMarker_All](); // Store whether the boundary should be monitored. + Marker_All_Designing = new unsigned short[nMarker_All](); // Store whether the boundary should be designed. + Marker_All_Plotting = new unsigned short[nMarker_All](); // Store whether the boundary should be plotted. + Marker_All_Analyze = new unsigned short[nMarker_All](); // Store whether the boundary should be plotted. + Marker_All_ZoneInterface = new unsigned short[nMarker_All](); // Store whether the boundary is in the FSI interface. + Marker_All_GeoEval = new unsigned short[nMarker_All](); // Store whether the boundary should be geometry evaluation. + Marker_All_DV = + new unsigned short[nMarker_All](); // Store whether the boundary should be affected by design variables. + Marker_All_Moving = new unsigned short[nMarker_All](); // Store whether the boundary should be in motion. + Marker_All_Deform_Mesh = new unsigned short[nMarker_All](); // Store whether the boundary is deformable. + Marker_All_Deform_Mesh_Sym_Plane = + new unsigned short[nMarker_All](); // Store wheter the boundary will follow the deformation + Marker_All_Fluid_Load = + new unsigned short[nMarker_All](); // Store whether the boundary computes/applies fluid loads. + Marker_All_PyCustom = new unsigned short[nMarker_All](); // Store whether the boundary is Python customizable. + Marker_All_PerBound = new short[nMarker_All](); // Store whether the boundary belongs to a periodic boundary. + Marker_All_Turbomachinery = + new unsigned short[nMarker_All](); // Store whether the boundary is in needed for Turbomachinery computations. + Marker_All_TurbomachineryFlag = + new unsigned short[nMarker_All](); // Store whether the boundary has a flag for Turbomachinery computations. + Marker_All_MixingPlaneInterface = + new unsigned short[nMarker_All](); // Store whether the boundary has a in the MixingPlane interface. + Marker_All_SobolevBC = + new unsigned short[nMarker_All](); // Store wether the boundary should apply to the gradient smoothing. for (iMarker_All = 0; iMarker_All < nMarker_All; iMarker_All++) { Marker_All_TagBound[iMarker_All] = "SEND_RECEIVE"; @@ -5557,25 +5967,25 @@ void CConfig::SetMarkers(SU2_COMPONENT val_software) { /*--- Allocate the memory (markers in the config file) ---*/ - Marker_CfgFile_TagBound = new string[nMarker_CfgFile]; - Marker_CfgFile_KindBC = new unsigned short[nMarker_CfgFile] (); - Marker_CfgFile_Monitoring = new unsigned short[nMarker_CfgFile] (); - Marker_CfgFile_Designing = new unsigned short[nMarker_CfgFile] (); - Marker_CfgFile_Plotting = new unsigned short[nMarker_CfgFile] (); - Marker_CfgFile_Analyze = new unsigned short[nMarker_CfgFile] (); - Marker_CfgFile_GeoEval = new unsigned short[nMarker_CfgFile] (); - Marker_CfgFile_ZoneInterface = new unsigned short[nMarker_CfgFile] (); - Marker_CfgFile_DV = new unsigned short[nMarker_CfgFile] (); - Marker_CfgFile_Moving = new unsigned short[nMarker_CfgFile] (); - Marker_CfgFile_Deform_Mesh = new unsigned short[nMarker_CfgFile] (); - Marker_CfgFile_Deform_Mesh_Sym_Plane= new unsigned short[nMarker_CfgFile] (); - Marker_CfgFile_Fluid_Load = new unsigned short[nMarker_CfgFile] (); - Marker_CfgFile_PerBound = new unsigned short[nMarker_CfgFile] (); - Marker_CfgFile_Turbomachinery = new unsigned short[nMarker_CfgFile] (); - Marker_CfgFile_TurbomachineryFlag = new unsigned short[nMarker_CfgFile] (); - Marker_CfgFile_MixingPlaneInterface = new unsigned short[nMarker_CfgFile] (); - Marker_CfgFile_PyCustom = new unsigned short[nMarker_CfgFile] (); - Marker_CfgFile_SobolevBC = new unsigned short[nMarker_CfgFile] (); + Marker_CfgFile_TagBound = new string[nMarker_CfgFile]; + Marker_CfgFile_KindBC = new unsigned short[nMarker_CfgFile](); + Marker_CfgFile_Monitoring = new unsigned short[nMarker_CfgFile](); + Marker_CfgFile_Designing = new unsigned short[nMarker_CfgFile](); + Marker_CfgFile_Plotting = new unsigned short[nMarker_CfgFile](); + Marker_CfgFile_Analyze = new unsigned short[nMarker_CfgFile](); + Marker_CfgFile_GeoEval = new unsigned short[nMarker_CfgFile](); + Marker_CfgFile_ZoneInterface = new unsigned short[nMarker_CfgFile](); + Marker_CfgFile_DV = new unsigned short[nMarker_CfgFile](); + Marker_CfgFile_Moving = new unsigned short[nMarker_CfgFile](); + Marker_CfgFile_Deform_Mesh = new unsigned short[nMarker_CfgFile](); + Marker_CfgFile_Deform_Mesh_Sym_Plane = new unsigned short[nMarker_CfgFile](); + Marker_CfgFile_Fluid_Load = new unsigned short[nMarker_CfgFile](); + Marker_CfgFile_PerBound = new unsigned short[nMarker_CfgFile](); + Marker_CfgFile_Turbomachinery = new unsigned short[nMarker_CfgFile](); + Marker_CfgFile_TurbomachineryFlag = new unsigned short[nMarker_CfgFile](); + Marker_CfgFile_MixingPlaneInterface = new unsigned short[nMarker_CfgFile](); + Marker_CfgFile_PyCustom = new unsigned short[nMarker_CfgFile](); + Marker_CfgFile_SobolevBC = new unsigned short[nMarker_CfgFile](); for (iMarker_CfgFile = 0; iMarker_CfgFile < nMarker_CfgFile; iMarker_CfgFile++) { Marker_CfgFile_TagBound[iMarker_CfgFile] = "SEND_RECEIVE"; @@ -5583,26 +5993,26 @@ void CConfig::SetMarkers(SU2_COMPONENT val_software) { /*--- Allocate memory to store surface information (Analyze BC) ---*/ - Surface_MassFlow = new su2double[nMarker_Analyze] (); - Surface_Mach = new su2double[nMarker_Analyze] (); - Surface_Temperature = new su2double[nMarker_Analyze] (); - Surface_Pressure = new su2double[nMarker_Analyze] (); - Surface_Density = new su2double[nMarker_Analyze] (); - Surface_Enthalpy = new su2double[nMarker_Analyze] (); - Surface_NormalVelocity = new su2double[nMarker_Analyze] (); - Surface_Uniformity = new su2double[nMarker_Analyze] (); - Surface_SecondaryStrength = new su2double[nMarker_Analyze] (); - Surface_SecondOverUniform = new su2double[nMarker_Analyze] (); - Surface_MomentumDistortion = new su2double[nMarker_Analyze] (); - Surface_TotalTemperature = new su2double[nMarker_Analyze] (); - Surface_TotalPressure = new su2double[nMarker_Analyze] (); - Surface_PressureDrop = new su2double[nMarker_Analyze] (); - Surface_Species_0 = new su2double[nMarker_Analyze] (); - Surface_Species_Variance = new su2double[nMarker_Analyze] (); - Surface_DC60 = new su2double[nMarker_Analyze] (); - Surface_IDC = new su2double[nMarker_Analyze] (); - Surface_IDC_Mach = new su2double[nMarker_Analyze] (); - Surface_IDR = new su2double[nMarker_Analyze] (); + Surface_MassFlow = new su2double[nMarker_Analyze](); + Surface_Mach = new su2double[nMarker_Analyze](); + Surface_Temperature = new su2double[nMarker_Analyze](); + Surface_Pressure = new su2double[nMarker_Analyze](); + Surface_Density = new su2double[nMarker_Analyze](); + Surface_Enthalpy = new su2double[nMarker_Analyze](); + Surface_NormalVelocity = new su2double[nMarker_Analyze](); + Surface_Uniformity = new su2double[nMarker_Analyze](); + Surface_SecondaryStrength = new su2double[nMarker_Analyze](); + Surface_SecondOverUniform = new su2double[nMarker_Analyze](); + Surface_MomentumDistortion = new su2double[nMarker_Analyze](); + Surface_TotalTemperature = new su2double[nMarker_Analyze](); + Surface_TotalPressure = new su2double[nMarker_Analyze](); + Surface_PressureDrop = new su2double[nMarker_Analyze](); + Surface_Species_0 = new su2double[nMarker_Analyze](); + Surface_Species_Variance = new su2double[nMarker_Analyze](); + Surface_DC60 = new su2double[nMarker_Analyze](); + Surface_IDC = new su2double[nMarker_Analyze](); + Surface_IDC_Mach = new su2double[nMarker_Analyze](); + Surface_IDR = new su2double[nMarker_Analyze](); /*--- Populate the marker information in the config file (all domains) ---*/ @@ -5632,31 +6042,31 @@ void CConfig::SetMarkers(SU2_COMPONENT val_software) { iMarker_CfgFile++; } - ActDisk_DeltaPress = new su2double[nMarker_ActDiskInlet] (); - ActDisk_DeltaTemp = new su2double[nMarker_ActDiskInlet] (); - ActDisk_TotalPressRatio = new su2double[nMarker_ActDiskInlet] (); - ActDisk_TotalTempRatio = new su2double[nMarker_ActDiskInlet] (); - ActDisk_StaticPressRatio = new su2double[nMarker_ActDiskInlet] (); - ActDisk_StaticTempRatio = new su2double[nMarker_ActDiskInlet] (); - ActDisk_Power = new su2double[nMarker_ActDiskInlet] (); - ActDisk_MassFlow = new su2double[nMarker_ActDiskInlet] (); - ActDisk_Mach = new su2double[nMarker_ActDiskInlet] (); - ActDisk_Force = new su2double[nMarker_ActDiskInlet] (); - ActDisk_NetThrust = new su2double[nMarker_ActDiskInlet] (); - ActDisk_BCThrust = new su2double[nMarker_ActDiskInlet] (); - ActDisk_BCThrust_Old = new su2double[nMarker_ActDiskInlet] (); - ActDisk_GrossThrust = new su2double[nMarker_ActDiskInlet] (); - ActDisk_Area = new su2double[nMarker_ActDiskInlet] (); - ActDisk_ReverseMassFlow = new su2double[nMarker_ActDiskInlet] (); - - ActDiskInlet_MassFlow = new su2double[nMarker_ActDiskInlet] (); - ActDiskInlet_Temperature = new su2double[nMarker_ActDiskInlet] (); - ActDiskInlet_TotalTemperature = new su2double[nMarker_ActDiskInlet] (); - ActDiskInlet_Pressure = new su2double[nMarker_ActDiskInlet] (); - ActDiskInlet_TotalPressure = new su2double[nMarker_ActDiskInlet] (); - ActDiskInlet_RamDrag = new su2double[nMarker_ActDiskInlet] (); - ActDiskInlet_Force = new su2double[nMarker_ActDiskInlet] (); - ActDiskInlet_Power = new su2double[nMarker_ActDiskInlet] (); + ActDisk_DeltaPress = new su2double[nMarker_ActDiskInlet](); + ActDisk_DeltaTemp = new su2double[nMarker_ActDiskInlet](); + ActDisk_TotalPressRatio = new su2double[nMarker_ActDiskInlet](); + ActDisk_TotalTempRatio = new su2double[nMarker_ActDiskInlet](); + ActDisk_StaticPressRatio = new su2double[nMarker_ActDiskInlet](); + ActDisk_StaticTempRatio = new su2double[nMarker_ActDiskInlet](); + ActDisk_Power = new su2double[nMarker_ActDiskInlet](); + ActDisk_MassFlow = new su2double[nMarker_ActDiskInlet](); + ActDisk_Mach = new su2double[nMarker_ActDiskInlet](); + ActDisk_Force = new su2double[nMarker_ActDiskInlet](); + ActDisk_NetThrust = new su2double[nMarker_ActDiskInlet](); + ActDisk_BCThrust = new su2double[nMarker_ActDiskInlet](); + ActDisk_BCThrust_Old = new su2double[nMarker_ActDiskInlet](); + ActDisk_GrossThrust = new su2double[nMarker_ActDiskInlet](); + ActDisk_Area = new su2double[nMarker_ActDiskInlet](); + ActDisk_ReverseMassFlow = new su2double[nMarker_ActDiskInlet](); + + ActDiskInlet_MassFlow = new su2double[nMarker_ActDiskInlet](); + ActDiskInlet_Temperature = new su2double[nMarker_ActDiskInlet](); + ActDiskInlet_TotalTemperature = new su2double[nMarker_ActDiskInlet](); + ActDiskInlet_Pressure = new su2double[nMarker_ActDiskInlet](); + ActDiskInlet_TotalPressure = new su2double[nMarker_ActDiskInlet](); + ActDiskInlet_RamDrag = new su2double[nMarker_ActDiskInlet](); + ActDiskInlet_Force = new su2double[nMarker_ActDiskInlet](); + ActDiskInlet_Power = new su2double[nMarker_ActDiskInlet](); for (iMarker_ActDiskInlet = 0; iMarker_ActDiskInlet < nMarker_ActDiskInlet; iMarker_ActDiskInlet++) { Marker_CfgFile_TagBound[iMarker_CfgFile] = Marker_ActDiskInlet[iMarker_ActDiskInlet]; @@ -5664,14 +6074,14 @@ void CConfig::SetMarkers(SU2_COMPONENT val_software) { iMarker_CfgFile++; } - ActDiskOutlet_MassFlow = new su2double[nMarker_ActDiskOutlet] (); - ActDiskOutlet_Temperature = new su2double[nMarker_ActDiskOutlet] (); - ActDiskOutlet_TotalTemperature = new su2double[nMarker_ActDiskOutlet] (); - ActDiskOutlet_Pressure = new su2double[nMarker_ActDiskOutlet] (); - ActDiskOutlet_TotalPressure = new su2double[nMarker_ActDiskOutlet] (); - ActDiskOutlet_GrossThrust = new su2double[nMarker_ActDiskOutlet] (); - ActDiskOutlet_Force = new su2double[nMarker_ActDiskOutlet] (); - ActDiskOutlet_Power = new su2double[nMarker_ActDiskOutlet] (); + ActDiskOutlet_MassFlow = new su2double[nMarker_ActDiskOutlet](); + ActDiskOutlet_Temperature = new su2double[nMarker_ActDiskOutlet](); + ActDiskOutlet_TotalTemperature = new su2double[nMarker_ActDiskOutlet](); + ActDiskOutlet_Pressure = new su2double[nMarker_ActDiskOutlet](); + ActDiskOutlet_TotalPressure = new su2double[nMarker_ActDiskOutlet](); + ActDiskOutlet_GrossThrust = new su2double[nMarker_ActDiskOutlet](); + ActDiskOutlet_Force = new su2double[nMarker_ActDiskOutlet](); + ActDiskOutlet_Power = new su2double[nMarker_ActDiskOutlet](); for (iMarker_ActDiskOutlet = 0; iMarker_ActDiskOutlet < nMarker_ActDiskOutlet; iMarker_ActDiskOutlet++) { Marker_CfgFile_TagBound[iMarker_CfgFile] = Marker_ActDiskOutlet[iMarker_ActDiskOutlet]; @@ -5679,9 +6089,9 @@ void CConfig::SetMarkers(SU2_COMPONENT val_software) { iMarker_CfgFile++; } - Outlet_MassFlow = new su2double[nMarker_Outlet] (); - Outlet_Density = new su2double[nMarker_Outlet] (); - Outlet_Area = new su2double[nMarker_Outlet] (); + Outlet_MassFlow = new su2double[nMarker_Outlet](); + Outlet_Density = new su2double[nMarker_Outlet](); + Outlet_Area = new su2double[nMarker_Outlet](); for (iMarker_NearFieldBound = 0; iMarker_NearFieldBound < nMarker_NearFieldBound; iMarker_NearFieldBound++) { Marker_CfgFile_TagBound[iMarker_CfgFile] = Marker_NearFieldBound[iMarker_NearFieldBound]; @@ -5689,7 +6099,8 @@ void CConfig::SetMarkers(SU2_COMPONENT val_software) { iMarker_CfgFile++; } - for (iMarker_Fluid_InterfaceBound = 0; iMarker_Fluid_InterfaceBound < nMarker_Fluid_InterfaceBound; iMarker_Fluid_InterfaceBound++) { + for (iMarker_Fluid_InterfaceBound = 0; iMarker_Fluid_InterfaceBound < nMarker_Fluid_InterfaceBound; + iMarker_Fluid_InterfaceBound++) { Marker_CfgFile_TagBound[iMarker_CfgFile] = Marker_Fluid_InterfaceBound[iMarker_Fluid_InterfaceBound]; Marker_CfgFile_KindBC[iMarker_CfgFile] = FLUID_INTERFACE; iMarker_CfgFile++; @@ -5719,23 +6130,23 @@ void CConfig::SetMarkers(SU2_COMPONENT val_software) { iMarker_CfgFile++; } - Engine_Power = new su2double[nMarker_EngineInflow] (); - Engine_Mach = new su2double[nMarker_EngineInflow] (); - Engine_Force = new su2double[nMarker_EngineInflow] (); - Engine_NetThrust = new su2double[nMarker_EngineInflow] (); - Engine_GrossThrust = new su2double[nMarker_EngineInflow] (); - Engine_Area = new su2double[nMarker_EngineInflow] (); - - Inflow_Mach = new su2double[nMarker_EngineInflow] (); - Inflow_Pressure = new su2double[nMarker_EngineInflow] (); - Inflow_MassFlow = new su2double[nMarker_EngineInflow] (); - Inflow_ReverseMassFlow = new su2double[nMarker_EngineInflow] (); - Inflow_TotalPressure = new su2double[nMarker_EngineInflow] (); - Inflow_Temperature = new su2double[nMarker_EngineInflow] (); - Inflow_TotalTemperature = new su2double[nMarker_EngineInflow] (); - Inflow_RamDrag = new su2double[nMarker_EngineInflow] (); - Inflow_Force = new su2double[nMarker_EngineInflow] (); - Inflow_Power = new su2double[nMarker_EngineInflow] (); + Engine_Power = new su2double[nMarker_EngineInflow](); + Engine_Mach = new su2double[nMarker_EngineInflow](); + Engine_Force = new su2double[nMarker_EngineInflow](); + Engine_NetThrust = new su2double[nMarker_EngineInflow](); + Engine_GrossThrust = new su2double[nMarker_EngineInflow](); + Engine_Area = new su2double[nMarker_EngineInflow](); + + Inflow_Mach = new su2double[nMarker_EngineInflow](); + Inflow_Pressure = new su2double[nMarker_EngineInflow](); + Inflow_MassFlow = new su2double[nMarker_EngineInflow](); + Inflow_ReverseMassFlow = new su2double[nMarker_EngineInflow](); + Inflow_TotalPressure = new su2double[nMarker_EngineInflow](); + Inflow_Temperature = new su2double[nMarker_EngineInflow](); + Inflow_TotalTemperature = new su2double[nMarker_EngineInflow](); + Inflow_RamDrag = new su2double[nMarker_EngineInflow](); + Inflow_Force = new su2double[nMarker_EngineInflow](); + Inflow_Power = new su2double[nMarker_EngineInflow](); for (iMarker_EngineInflow = 0; iMarker_EngineInflow < nMarker_EngineInflow; iMarker_EngineInflow++) { Marker_CfgFile_TagBound[iMarker_CfgFile] = Marker_EngineInflow[iMarker_EngineInflow]; @@ -5743,14 +6154,14 @@ void CConfig::SetMarkers(SU2_COMPONENT val_software) { iMarker_CfgFile++; } - Exhaust_Pressure = new su2double[nMarker_EngineExhaust] (); - Exhaust_Temperature = new su2double[nMarker_EngineExhaust] (); - Exhaust_MassFlow = new su2double[nMarker_EngineExhaust] (); - Exhaust_TotalPressure = new su2double[nMarker_EngineExhaust] (); - Exhaust_TotalTemperature = new su2double[nMarker_EngineExhaust] (); - Exhaust_GrossThrust = new su2double[nMarker_EngineExhaust] (); - Exhaust_Force = new su2double[nMarker_EngineExhaust] (); - Exhaust_Power = new su2double[nMarker_EngineExhaust] (); + Exhaust_Pressure = new su2double[nMarker_EngineExhaust](); + Exhaust_Temperature = new su2double[nMarker_EngineExhaust](); + Exhaust_MassFlow = new su2double[nMarker_EngineExhaust](); + Exhaust_TotalPressure = new su2double[nMarker_EngineExhaust](); + Exhaust_TotalTemperature = new su2double[nMarker_EngineExhaust](); + Exhaust_GrossThrust = new su2double[nMarker_EngineExhaust](); + Exhaust_Force = new su2double[nMarker_EngineExhaust](); + Exhaust_Power = new su2double[nMarker_EngineExhaust](); for (iMarker_EngineExhaust = 0; iMarker_EngineExhaust < nMarker_EngineExhaust; iMarker_EngineExhaust++) { Marker_CfgFile_TagBound[iMarker_CfgFile] = Marker_EngineExhaust[iMarker_EngineExhaust]; @@ -5764,7 +6175,8 @@ void CConfig::SetMarkers(SU2_COMPONENT val_software) { iMarker_CfgFile++; } - for (iMarker_Supersonic_Outlet = 0; iMarker_Supersonic_Outlet < nMarker_Supersonic_Outlet; iMarker_Supersonic_Outlet++) { + for (iMarker_Supersonic_Outlet = 0; iMarker_Supersonic_Outlet < nMarker_Supersonic_Outlet; + iMarker_Supersonic_Outlet++) { Marker_CfgFile_TagBound[iMarker_CfgFile] = Marker_Supersonic_Outlet[iMarker_Supersonic_Outlet]; Marker_CfgFile_KindBC[iMarker_CfgFile] = SUPERSONIC_OUTLET; iMarker_CfgFile++; @@ -5794,7 +6206,8 @@ void CConfig::SetMarkers(SU2_COMPONENT val_software) { iMarker_CfgFile++; } - for (iMarker_Smoluchowski_Maxwell = 0; iMarker_Smoluchowski_Maxwell < nMarker_Smoluchowski_Maxwell; iMarker_Smoluchowski_Maxwell++) { + for (iMarker_Smoluchowski_Maxwell = 0; iMarker_Smoluchowski_Maxwell < nMarker_Smoluchowski_Maxwell; + iMarker_Smoluchowski_Maxwell++) { Marker_CfgFile_TagBound[iMarker_CfgFile] = Marker_Smoluchowski_Maxwell[iMarker_Smoluchowski_Maxwell]; Marker_CfgFile_KindBC[iMarker_CfgFile] = SMOLUCHOWSKI_MAXWELL; iMarker_CfgFile++; @@ -5900,17 +6313,17 @@ void CConfig::SetMarkers(SU2_COMPONENT val_software) { /*--- Identification of Turbomachinery markers and flag them---*/ for (iMarker_CfgFile = 0; iMarker_CfgFile < nMarker_CfgFile; iMarker_CfgFile++) { - unsigned short indexMarker=0; + unsigned short indexMarker = 0; Marker_CfgFile_Turbomachinery[iMarker_CfgFile] = NO; Marker_CfgFile_TurbomachineryFlag[iMarker_CfgFile] = NO; - for (iMarker_Turbomachinery = 0; iMarker_Turbomachinery < nMarker_Turbomachinery; iMarker_Turbomachinery++){ - if (Marker_CfgFile_TagBound[iMarker_CfgFile] == Marker_TurboBoundIn[iMarker_Turbomachinery]){ - indexMarker=(iMarker_Turbomachinery+1); + for (iMarker_Turbomachinery = 0; iMarker_Turbomachinery < nMarker_Turbomachinery; iMarker_Turbomachinery++) { + if (Marker_CfgFile_TagBound[iMarker_CfgFile] == Marker_TurboBoundIn[iMarker_Turbomachinery]) { + indexMarker = (iMarker_Turbomachinery + 1); Marker_CfgFile_Turbomachinery[iMarker_CfgFile] = indexMarker; Marker_CfgFile_TurbomachineryFlag[iMarker_CfgFile] = INFLOW; } - if (Marker_CfgFile_TagBound[iMarker_CfgFile] == Marker_TurboBoundOut[iMarker_Turbomachinery]){ - indexMarker=(iMarker_Turbomachinery+1); + if (Marker_CfgFile_TagBound[iMarker_CfgFile] == Marker_TurboBoundOut[iMarker_Turbomachinery]) { + indexMarker = (iMarker_Turbomachinery + 1); Marker_CfgFile_Turbomachinery[iMarker_CfgFile] = indexMarker; Marker_CfgFile_TurbomachineryFlag[iMarker_CfgFile] = OUTFLOW; } @@ -5920,19 +6333,19 @@ void CConfig::SetMarkers(SU2_COMPONENT val_software) { /*--- Identification of MixingPlane interface markers ---*/ for (iMarker_CfgFile = 0; iMarker_CfgFile < nMarker_CfgFile; iMarker_CfgFile++) { - unsigned short indexMarker=0; + unsigned short indexMarker = 0; Marker_CfgFile_MixingPlaneInterface[iMarker_CfgFile] = NO; - for (iMarker_MixingPlaneInterface = 0; iMarker_MixingPlaneInterface < nMarker_MixingPlaneInterface; iMarker_MixingPlaneInterface++) + for (iMarker_MixingPlaneInterface = 0; iMarker_MixingPlaneInterface < nMarker_MixingPlaneInterface; + iMarker_MixingPlaneInterface++) if (Marker_CfgFile_TagBound[iMarker_CfgFile] == Marker_MixingPlaneInterface[iMarker_MixingPlaneInterface]) - indexMarker=(int)(iMarker_MixingPlaneInterface/2+1); + indexMarker = (int)(iMarker_MixingPlaneInterface / 2 + 1); Marker_CfgFile_MixingPlaneInterface[iMarker_CfgFile] = indexMarker; } for (iMarker_CfgFile = 0; iMarker_CfgFile < nMarker_CfgFile; iMarker_CfgFile++) { Marker_CfgFile_DV[iMarker_CfgFile] = NO; for (iMarker_DV = 0; iMarker_DV < nMarker_DV; iMarker_DV++) - if (Marker_CfgFile_TagBound[iMarker_CfgFile] == Marker_DV[iMarker_DV]) - Marker_CfgFile_DV[iMarker_CfgFile] = YES; + if (Marker_CfgFile_TagBound[iMarker_CfgFile] == Marker_DV[iMarker_DV]) Marker_CfgFile_DV[iMarker_CfgFile] = YES; } /*--- Add an extra check for DV_MARKER to make sure that any given marker @@ -5947,15 +6360,18 @@ void CConfig::SetMarkers(SU2_COMPONENT val_software) { } } - if(!found) { - if (nZone==1) - SU2_MPI::Error("DV_MARKER contains marker names that do not exist in the lists of BCs in the config file.", CURRENT_FUNCTION); + if (!found) { + if (nZone == 1) + SU2_MPI::Error("DV_MARKER contains marker names that do not exist in the lists of BCs in the config file.", + CURRENT_FUNCTION); // In case of multiple zones, the markers might appear only in zonal config and not in the Master. // A loop over all zones would need to be included which is not straight forward as this can only be // checked once all zonal configs are read. else if (rank == MASTER_NODE) - cout << "Warning: DV_MARKER contains marker names that do not exist in the lists of BCs of the master config file.\n" - "Make sure the marker names exist in the zonal config files" << endl; + cout << "Warning: DV_MARKER contains marker names that do not exist in the lists of BCs of the master config " + "file.\n" + "Make sure the marker names exist in the zonal config files" + << endl; } } @@ -5975,7 +6391,8 @@ void CConfig::SetMarkers(SU2_COMPONENT val_software) { for (iMarker_CfgFile = 0; iMarker_CfgFile < nMarker_CfgFile; iMarker_CfgFile++) { Marker_CfgFile_Deform_Mesh_Sym_Plane[iMarker_CfgFile] = NO; - for (iMarker_Deform_Mesh_Sym_Plane = 0; iMarker_Deform_Mesh_Sym_Plane < nMarker_Deform_Mesh_Sym_Plane; iMarker_Deform_Mesh_Sym_Plane++) + for (iMarker_Deform_Mesh_Sym_Plane = 0; iMarker_Deform_Mesh_Sym_Plane < nMarker_Deform_Mesh_Sym_Plane; + iMarker_Deform_Mesh_Sym_Plane++) if (Marker_CfgFile_TagBound[iMarker_CfgFile] == Marker_Deform_Mesh_Sym_Plane[iMarker_Deform_Mesh_Sym_Plane]) Marker_CfgFile_Deform_Mesh_Sym_Plane[iMarker_CfgFile] = YES; } @@ -5987,9 +6404,9 @@ void CConfig::SetMarkers(SU2_COMPONENT val_software) { Marker_CfgFile_Fluid_Load[iMarker_CfgFile] = YES; } - for (iMarker_CfgFile=0; iMarker_CfgFile < nMarker_CfgFile; iMarker_CfgFile++) { + for (iMarker_CfgFile = 0; iMarker_CfgFile < nMarker_CfgFile; iMarker_CfgFile++) { Marker_CfgFile_PyCustom[iMarker_CfgFile] = NO; - for(iMarker_PyCustom=0; iMarker_PyCustom < nMarker_PyCustom; iMarker_PyCustom++) + for (iMarker_PyCustom = 0; iMarker_PyCustom < nMarker_PyCustom; iMarker_PyCustom++) if (Marker_CfgFile_TagBound[iMarker_CfgFile] == Marker_PyCustom[iMarker_PyCustom]) Marker_CfgFile_PyCustom[iMarker_CfgFile] = YES; } @@ -6000,58 +6417,61 @@ void CConfig::SetMarkers(SU2_COMPONENT val_software) { if (Marker_CfgFile_TagBound[iMarker_CfgFile] == Marker_SobolevBC[iMarker_SobolevBC]) Marker_CfgFile_SobolevBC[iMarker_CfgFile] = YES; } - } void CConfig::SetOutput(SU2_COMPONENT val_software, unsigned short val_izone) { - - unsigned short iMarker_Euler, iMarker_Custom, iMarker_FarField, - iMarker_SymWall, iMarker_PerBound, iMarker_NearFieldBound, - iMarker_Fluid_InterfaceBound, iMarker_Inlet, iMarker_Riemann, - iMarker_Deform_Mesh, iMarker_Deform_Mesh_Sym_Plane, iMarker_Fluid_Load, - iMarker_Smoluchowski_Maxwell, iWall_Catalytic, - iMarker_Giles, iMarker_Outlet, iMarker_Isothermal, iMarker_HeatFlux, iMarker_HeatTransfer, - iMarker_EngineInflow, iMarker_EngineExhaust, iMarker_Displacement, iMarker_Damper, - iMarker_Load, iMarker_Internal, iMarker_Monitoring, - iMarker_Designing, iMarker_GeoEval, iMarker_Plotting, iMarker_Analyze, iMarker_DV, iDV_Value, - iMarker_ZoneInterface, iMarker_PyCustom, iMarker_Load_Dir, iMarker_Disp_Dir, iMarker_Clamped, - iMarker_Moving, iMarker_Supersonic_Inlet, iMarker_Supersonic_Outlet, iMarker_ActDiskInlet, - iMarker_Emissivity, iMarker_StrongBC, - iMarker_ActDiskOutlet, iMarker_MixingPlaneInterface, - iMarker_SobolevBC; + unsigned short iMarker_Euler, iMarker_Custom, iMarker_FarField, iMarker_SymWall, iMarker_PerBound, + iMarker_NearFieldBound, iMarker_Fluid_InterfaceBound, iMarker_Inlet, iMarker_Riemann, iMarker_Deform_Mesh, + iMarker_Deform_Mesh_Sym_Plane, iMarker_Fluid_Load, iMarker_Smoluchowski_Maxwell, iWall_Catalytic, iMarker_Giles, + iMarker_Outlet, iMarker_Isothermal, iMarker_HeatFlux, iMarker_HeatTransfer, iMarker_EngineInflow, + iMarker_EngineExhaust, iMarker_Displacement, iMarker_Damper, iMarker_Load, iMarker_Internal, iMarker_Monitoring, + iMarker_Designing, iMarker_GeoEval, iMarker_Plotting, iMarker_Analyze, iMarker_DV, iDV_Value, + iMarker_ZoneInterface, iMarker_PyCustom, iMarker_Load_Dir, iMarker_Disp_Dir, iMarker_Clamped, iMarker_Moving, + iMarker_Supersonic_Inlet, iMarker_Supersonic_Outlet, iMarker_ActDiskInlet, iMarker_Emissivity, iMarker_StrongBC, + iMarker_ActDiskOutlet, iMarker_MixingPlaneInterface, iMarker_SobolevBC; bool fea = ((Kind_Solver == MAIN_SOLVER::FEM_ELASTICITY) || (Kind_Solver == MAIN_SOLVER::DISC_ADJ_FEM)); - cout << endl <<"----------------- Physical Case Definition ( Zone " << iZone << " ) -------------------" << endl; + cout << endl << "----------------- Physical Case Definition ( Zone " << iZone << " ) -------------------" << endl; if (val_software == SU2_COMPONENT::SU2_CFD) { - if (FSI_Problem) - cout << "Fluid-Structure Interaction." << endl; + if (FSI_Problem) cout << "Fluid-Structure Interaction." << endl; if (DiscreteAdjoint) { - cout <<"Discrete Adjoint equations using Algorithmic Differentiation\n"; - cout <<"based on the physical case: "; + cout << "Discrete Adjoint equations using Algorithmic Differentiation\n"; + cout << "based on the physical case: "; } switch (Kind_Solver) { - case MAIN_SOLVER::EULER: case MAIN_SOLVER::DISC_ADJ_EULER: - case MAIN_SOLVER::INC_EULER: case MAIN_SOLVER::DISC_ADJ_INC_EULER: - case MAIN_SOLVER::FEM_EULER: case MAIN_SOLVER::DISC_ADJ_FEM_EULER: + case MAIN_SOLVER::EULER: + case MAIN_SOLVER::DISC_ADJ_EULER: + case MAIN_SOLVER::INC_EULER: + case MAIN_SOLVER::DISC_ADJ_INC_EULER: + case MAIN_SOLVER::FEM_EULER: + case MAIN_SOLVER::DISC_ADJ_FEM_EULER: if (Kind_Regime == ENUM_REGIME::COMPRESSIBLE) cout << "Compressible Euler equations." << endl; if (Kind_Regime == ENUM_REGIME::INCOMPRESSIBLE) cout << "Incompressible Euler equations." << endl; break; - case MAIN_SOLVER::NAVIER_STOKES: case MAIN_SOLVER::DISC_ADJ_NAVIER_STOKES: - case MAIN_SOLVER::INC_NAVIER_STOKES: case MAIN_SOLVER::DISC_ADJ_INC_NAVIER_STOKES: - case MAIN_SOLVER::FEM_NAVIER_STOKES: case MAIN_SOLVER::DISC_ADJ_FEM_NS: + case MAIN_SOLVER::NAVIER_STOKES: + case MAIN_SOLVER::DISC_ADJ_NAVIER_STOKES: + case MAIN_SOLVER::INC_NAVIER_STOKES: + case MAIN_SOLVER::DISC_ADJ_INC_NAVIER_STOKES: + case MAIN_SOLVER::FEM_NAVIER_STOKES: + case MAIN_SOLVER::DISC_ADJ_FEM_NS: if (Kind_Regime == ENUM_REGIME::COMPRESSIBLE) cout << "Compressible Laminar Navier-Stokes' equations." << endl; - if (Kind_Regime == ENUM_REGIME::INCOMPRESSIBLE) cout << "Incompressible Laminar Navier-Stokes' equations." << endl; + if (Kind_Regime == ENUM_REGIME::INCOMPRESSIBLE) + cout << "Incompressible Laminar Navier-Stokes' equations." << endl; break; - case MAIN_SOLVER::RANS: case MAIN_SOLVER::DISC_ADJ_RANS: - case MAIN_SOLVER::INC_RANS: case MAIN_SOLVER::DISC_ADJ_INC_RANS: - case MAIN_SOLVER::FEM_RANS: case MAIN_SOLVER::DISC_ADJ_FEM_RANS: + case MAIN_SOLVER::RANS: + case MAIN_SOLVER::DISC_ADJ_RANS: + case MAIN_SOLVER::INC_RANS: + case MAIN_SOLVER::DISC_ADJ_INC_RANS: + case MAIN_SOLVER::FEM_RANS: + case MAIN_SOLVER::DISC_ADJ_FEM_RANS: if (Kind_Regime == ENUM_REGIME::COMPRESSIBLE) cout << "Compressible RANS equations." << endl; if (Kind_Regime == ENUM_REGIME::INCOMPRESSIBLE) cout << "Incompressible RANS equations." << endl; cout << "Turbulence model: "; switch (Kind_Turb_Model) { - case TURB_MODEL::NONE: break; + case TURB_MODEL::NONE: + break; case TURB_MODEL::SA: switch (saParsedOptions.version) { case SA_OPTIONS::NEG: @@ -6074,8 +6494,10 @@ void CConfig::SetOutput(SU2_COMPONENT val_software, unsigned short val_izone) { break; case TURB_MODEL::SST: cout << "Menter's k-omega SST"; - if (sstParsedOptions.version == SST_OPTIONS::V1994) cout << "-1994"; - else cout << "-2003"; + if (sstParsedOptions.version == SST_OPTIONS::V1994) + cout << "-1994"; + else + cout << "-2003"; if (sstParsedOptions.modified) cout << "m"; if (sstParsedOptions.sust) cout << " with sustaining terms, and"; @@ -6098,7 +6520,8 @@ void CConfig::SetOutput(SU2_COMPONENT val_software, unsigned short val_izone) { break; } switch (Kind_Trans_Model) { - case TURB_TRANS_MODEL::NONE: break; + case TURB_TRANS_MODEL::NONE: + break; case TURB_TRANS_MODEL::LM: { cout << "Transition model: Langtry and Menter's 4 equation model"; if (lmParsedOptions.LM2015) { @@ -6110,72 +6533,121 @@ void CConfig::SetOutput(SU2_COMPONENT val_software, unsigned short val_izone) { } } if (Kind_Trans_Model == TURB_TRANS_MODEL::LM) { - cout << "Correlation Functions: "; switch (lmParsedOptions.Correlation) { - case TURB_TRANS_CORRELATION::MALAN: cout << "Malan et al. (2009)" << endl; break; - case TURB_TRANS_CORRELATION::SULUKSNA: cout << "Suluksna et al. (2009)" << endl; break; - case TURB_TRANS_CORRELATION::KRAUSE: cout << "Krause et al. (2008)" << endl; break; - case TURB_TRANS_CORRELATION::KRAUSE_HYPER: cout << "Krause et al. (2008, paper)" << endl; break; - case TURB_TRANS_CORRELATION::MEDIDA_BAEDER: cout << "Medida and Baeder (2011)" << endl; break; - case TURB_TRANS_CORRELATION::MEDIDA: cout << "Medida PhD (2014)" << endl; break; - case TURB_TRANS_CORRELATION::MENTER_LANGTRY: cout << "Menter and Langtry (2009)" << endl; break; + case TURB_TRANS_CORRELATION::MALAN: + cout << "Malan et al. (2009)" << endl; + break; + case TURB_TRANS_CORRELATION::SULUKSNA: + cout << "Suluksna et al. (2009)" << endl; + break; + case TURB_TRANS_CORRELATION::KRAUSE: + cout << "Krause et al. (2008)" << endl; + break; + case TURB_TRANS_CORRELATION::KRAUSE_HYPER: + cout << "Krause et al. (2008, paper)" << endl; + break; + case TURB_TRANS_CORRELATION::MEDIDA_BAEDER: + cout << "Medida and Baeder (2011)" << endl; + break; + case TURB_TRANS_CORRELATION::MEDIDA: + cout << "Medida PhD (2014)" << endl; + break; + case TURB_TRANS_CORRELATION::MENTER_LANGTRY: + cout << "Menter and Langtry (2009)" << endl; + break; case TURB_TRANS_CORRELATION::DEFAULT: switch (Kind_Turb_Model) { - case TURB_MODEL::SA: cout << "Malan et al. (2009)" << endl; break; - case TURB_MODEL::SST: cout << "Menter and Langtry (2009)" << endl; break; - case TURB_MODEL::NONE: SU2_MPI::Error("No turbulence model has been selected but LM transition model is active.", CURRENT_FUNCTION); break; + case TURB_MODEL::SA: + cout << "Malan et al. (2009)" << endl; + break; + case TURB_MODEL::SST: + cout << "Menter and Langtry (2009)" << endl; + break; + case TURB_MODEL::NONE: + SU2_MPI::Error("No turbulence model has been selected but LM transition model is active.", + CURRENT_FUNCTION); + break; } break; } } cout << "Hybrid RANS/LES: "; switch (Kind_HybridRANSLES) { - case NO_HYBRIDRANSLES: cout << "No Hybrid RANS/LES" << endl; break; - case SA_DES: cout << "Detached Eddy Simulation (DES97) " << endl; break; - case SA_DDES: cout << "Delayed Detached Eddy Simulation (DDES) with Standard SGS" << endl; break; - case SA_ZDES: cout << "Delayed Detached Eddy Simulation (DDES) with Vorticity-based SGS" << endl; break; - case SA_EDDES: cout << "Delayed Detached Eddy Simulation (DDES) with Shear-layer Adapted SGS" << endl; break; + case NO_HYBRIDRANSLES: + cout << "No Hybrid RANS/LES" << endl; + break; + case SA_DES: + cout << "Detached Eddy Simulation (DES97) " << endl; + break; + case SA_DDES: + cout << "Delayed Detached Eddy Simulation (DDES) with Standard SGS" << endl; + break; + case SA_ZDES: + cout << "Delayed Detached Eddy Simulation (DDES) with Vorticity-based SGS" << endl; + break; + case SA_EDDES: + cout << "Delayed Detached Eddy Simulation (DDES) with Shear-layer Adapted SGS" << endl; + break; } break; case MAIN_SOLVER::NEMO_EULER: - if (Kind_Regime == ENUM_REGIME::COMPRESSIBLE) cout << "Compressible two-temperature thermochemical non-equilibrium Euler equations." << endl; - if (Kind_FluidModel == SU2_NONEQ){ + if (Kind_Regime == ENUM_REGIME::COMPRESSIBLE) + cout << "Compressible two-temperature thermochemical non-equilibrium Euler equations." << endl; + if (Kind_FluidModel == SU2_NONEQ) { if ((GasModel != "N2") && (GasModel != "AIR-5") && (GasModel != "AIR-7") && (GasModel != "ARGON")) - SU2_MPI::Error("The GAS_MODEL given is unavailable using CSU2TCLIB. Choose one of the options: N2, AIR-5, AIR-7, or ARGON.", CURRENT_FUNCTION); + SU2_MPI::Error( + "The GAS_MODEL given is unavailable using CSU2TCLIB. Choose one of the options: N2, AIR-5, AIR-7, or " + "ARGON.", + CURRENT_FUNCTION); } break; case MAIN_SOLVER::NEMO_NAVIER_STOKES: - if (Kind_Regime == ENUM_REGIME::COMPRESSIBLE) cout << "Compressible two-temperature thermochemical non-equilibrium Navier-Stokes equations." << endl; - if (Kind_FluidModel == SU2_NONEQ){ + if (Kind_Regime == ENUM_REGIME::COMPRESSIBLE) + cout << "Compressible two-temperature thermochemical non-equilibrium Navier-Stokes equations." << endl; + if (Kind_FluidModel == SU2_NONEQ) { if ((GasModel != "N2") && (GasModel != "AIR-5") && (GasModel != "AIR-7") && (GasModel != "ARGON")) - SU2_MPI::Error("The GAS_MODEL given is unavailable using CSU2TCLIB. Choose one of the options: N2, AIR-5, AIR-7, or ARGON.", CURRENT_FUNCTION); + SU2_MPI::Error( + "The GAS_MODEL given is unavailable using CSU2TCLIB. Choose one of the options: N2, AIR-5, AIR-7, or " + "ARGON.", + CURRENT_FUNCTION); } break; case MAIN_SOLVER::FEM_LES: - if (Kind_Regime == ENUM_REGIME::COMPRESSIBLE) cout << "Compressible LES equations." << endl; + if (Kind_Regime == ENUM_REGIME::COMPRESSIBLE) cout << "Compressible LES equations." << endl; if (Kind_Regime == ENUM_REGIME::INCOMPRESSIBLE) cout << "Incompressible LES equations." << endl; cout << "LES Subgrid Scale model: "; switch (Kind_SGS_Model) { - case TURB_SGS_MODEL::IMPLICIT_LES: cout << "Implicit LES" << endl; break; - case TURB_SGS_MODEL::SMAGORINSKY: cout << "Smagorinsky " << endl; break; - case TURB_SGS_MODEL::WALE: cout << "WALE" << endl; break; - case TURB_SGS_MODEL::VREMAN: cout << "VREMAN" << endl; break; + case TURB_SGS_MODEL::IMPLICIT_LES: + cout << "Implicit LES" << endl; + break; + case TURB_SGS_MODEL::SMAGORINSKY: + cout << "Smagorinsky " << endl; + break; + case TURB_SGS_MODEL::WALE: + cout << "WALE" << endl; + break; + case TURB_SGS_MODEL::VREMAN: + cout << "VREMAN" << endl; + break; default: SU2_MPI::Error("Subgrid Scale model not specified.", CURRENT_FUNCTION); - } break; - case MAIN_SOLVER::FEM_ELASTICITY: case MAIN_SOLVER::DISC_ADJ_FEM: + case MAIN_SOLVER::FEM_ELASTICITY: + case MAIN_SOLVER::DISC_ADJ_FEM: if (Kind_Struct_Solver == STRUCT_DEFORMATION::SMALL) cout << "Geometrically linear elasticity solver." << endl; - if (Kind_Struct_Solver == STRUCT_DEFORMATION::LARGE) cout << "Geometrically non-linear elasticity solver." << endl; + if (Kind_Struct_Solver == STRUCT_DEFORMATION::LARGE) + cout << "Geometrically non-linear elasticity solver." << endl; if (Kind_Material == STRUCT_MODEL::LINEAR_ELASTIC) cout << "Linear elastic material." << endl; if (Kind_Material == STRUCT_MODEL::NEO_HOOKEAN) { if (Kind_Material_Compress == STRUCT_COMPRESS::COMPRESSIBLE) cout << "Compressible Neo-Hookean material model." << endl; } break; - case MAIN_SOLVER::ADJ_EULER: cout << "Continuous Euler adjoint equations." << endl; break; + case MAIN_SOLVER::ADJ_EULER: + cout << "Continuous Euler adjoint equations." << endl; + break; case MAIN_SOLVER::ADJ_NAVIER_STOKES: if (Frozen_Visc_Cont) cout << "Continuous Navier-Stokes adjoint equations with frozen (laminar) viscosity." << endl; @@ -6188,7 +6660,8 @@ void CConfig::SetOutput(SU2_COMPONENT val_software, unsigned short val_izone) { else cout << "Continuous RANS adjoint equations." << endl; break; - case MAIN_SOLVER::HEAT_EQUATION: case MAIN_SOLVER::DISC_ADJ_HEAT: + case MAIN_SOLVER::HEAT_EQUATION: + case MAIN_SOLVER::DISC_ADJ_HEAT: cout << "Heat solver" << endl; break; case MAIN_SOLVER::MULTIPHYSICS: @@ -6196,100 +6669,138 @@ void CConfig::SetOutput(SU2_COMPONENT val_software, unsigned short val_izone) { break; default: SU2_MPI::Error("No valid solver was chosen", CURRENT_FUNCTION); - } if ((Kind_Regime == ENUM_REGIME::COMPRESSIBLE) && (Kind_Solver != MAIN_SOLVER::FEM_ELASTICITY)) { - cout << "Mach number: " << Mach <<"."<< endl; - cout << "Angle of attack (AoA): " << AoA <<" deg, and angle of sideslip (AoS): " << AoS <<" deg."<< endl; + cout << "Mach number: " << Mach << "." << endl; + cout << "Angle of attack (AoA): " << AoA << " deg, and angle of sideslip (AoS): " << AoS << " deg." << endl; if ((Kind_Solver == MAIN_SOLVER::NAVIER_STOKES) || (Kind_Solver == MAIN_SOLVER::ADJ_NAVIER_STOKES) || (Kind_Solver == MAIN_SOLVER::RANS) || (Kind_Solver == MAIN_SOLVER::ADJ_RANS) || (Kind_Solver == MAIN_SOLVER::NEMO_NAVIER_STOKES)) - cout << "Reynolds number: " << Reynolds <<". Reference length " << Length_Reynolds << "." << endl; + cout << "Reynolds number: " << Reynolds << ". Reference length " << Length_Reynolds << "." << endl; if (Fixed_CL_Mode) { cout << "Fixed CL mode, target value: " << Target_CL << "." << endl; } } if (EquivArea) { - cout <<"The equivalent area is going to be evaluated on the near-field."<< endl; - cout <<"The lower integration limit is "< 1) || (nRefOriginMoment_Y > 1) || (nRefOriginMoment_Z > 1)) { cout << "Surface(s) where the force coefficients are evaluated and \n"; cout << "their reference origin for moment computation: \n"; for (iMarker_Monitoring = 0; iMarker_Monitoring < nMarker_Monitoring; iMarker_Monitoring++) { - cout << " - " << Marker_Monitoring[iMarker_Monitoring] << " (" << RefOriginMoment_X[iMarker_Monitoring] <<", "< value <-> param):" << endl; + if ((Design_Variable[iDV] != NO_DEFORMATION) && (Design_Variable[iDV] != FFD_SETTING) && + (Design_Variable[iDV] != SCALE_GRID) && (Design_Variable[iDV] != TRANSLATE_GRID) && + (Design_Variable[iDV] != ROTATE_GRID) && (Design_Variable[iDV] != SURFACE_FILE)) { + if (iDV == 0) cout << "Design variables definition (markers <-> value <-> param):" << endl; switch (Design_Variable[iDV]) { - case FFD_CONTROL_POINT_2D: cout << "FFD 2D (control point) <-> "; break; - case FFD_CAMBER_2D: cout << "FFD 2D (camber) <-> "; break; - case FFD_THICKNESS_2D: cout << "FFD 2D (thickness) <-> "; break; - case HICKS_HENNE: cout << "Hicks Henne <-> " ; break; - case SURFACE_BUMP: cout << "Surface bump <-> " ; break; - case ANGLE_OF_ATTACK: cout << "Angle of attack <-> " ; break; - case CST: cout << "Kulfan parameter number (CST) <-> " ; break; - case TRANSLATION: cout << "Translation design variable."; break; - case SCALE: cout << "Scale design variable."; break; - case NACA_4DIGITS: cout << "NACA four digits <-> "; break; - case PARABOLIC: cout << "Parabolic <-> "; break; - case AIRFOIL: cout << "Airfoil <-> "; break; - case ROTATION: cout << "Rotation <-> "; break; - case FFD_CONTROL_POINT: cout << "FFD (control point) <-> "; break; - case FFD_NACELLE: cout << "FFD (nacelle) <-> "; break; - case FFD_GULL: cout << "FFD (gull) <-> "; break; - case FFD_TWIST: cout << "FFD (twist) <-> "; break; - case FFD_ROTATION: cout << "FFD (rotation) <-> "; break; - case FFD_CONTROL_SURFACE: cout << "FFD (control surface) <-> "; break; - case FFD_CAMBER: cout << "FFD (camber) <-> "; break; - case FFD_THICKNESS: cout << "FFD (thickness) -> "; break; - case FFD_ANGLE_OF_ATTACK: cout << "FFD (angle of attack) <-> "; break; + case FFD_CONTROL_POINT_2D: + cout << "FFD 2D (control point) <-> "; + break; + case FFD_CAMBER_2D: + cout << "FFD 2D (camber) <-> "; + break; + case FFD_THICKNESS_2D: + cout << "FFD 2D (thickness) <-> "; + break; + case HICKS_HENNE: + cout << "Hicks Henne <-> "; + break; + case SURFACE_BUMP: + cout << "Surface bump <-> "; + break; + case ANGLE_OF_ATTACK: + cout << "Angle of attack <-> "; + break; + case CST: + cout << "Kulfan parameter number (CST) <-> "; + break; + case TRANSLATION: + cout << "Translation design variable."; + break; + case SCALE: + cout << "Scale design variable."; + break; + case NACA_4DIGITS: + cout << "NACA four digits <-> "; + break; + case PARABOLIC: + cout << "Parabolic <-> "; + break; + case AIRFOIL: + cout << "Airfoil <-> "; + break; + case ROTATION: + cout << "Rotation <-> "; + break; + case FFD_CONTROL_POINT: + cout << "FFD (control point) <-> "; + break; + case FFD_NACELLE: + cout << "FFD (nacelle) <-> "; + break; + case FFD_GULL: + cout << "FFD (gull) <-> "; + break; + case FFD_TWIST: + cout << "FFD (twist) <-> "; + break; + case FFD_ROTATION: + cout << "FFD (rotation) <-> "; + break; + case FFD_CONTROL_SURFACE: + cout << "FFD (control surface) <-> "; + break; + case FFD_CAMBER: + cout << "FFD (camber) <-> "; + break; + case FFD_THICKNESS: + cout << "FFD (thickness) -> "; + break; + case FFD_ANGLE_OF_ATTACK: + cout << "FFD (angle of attack) <-> "; + break; } for (iMarker_DV = 0; iMarker_DV < nMarker_DV; iMarker_DV++) { cout << Marker_DV[iMarker_DV]; - if (iMarker_DV < nMarker_DV-1) cout << ", "; - else cout << " <-> "; + if (iMarker_DV < nMarker_DV - 1) + cout << ", "; + else + cout << " <-> "; } for (iDV_Value = 0; iDV_Value < nDV_Value[iDV]; iDV_Value++) { cout << DV_Value[iDV][iDV_Value]; - if (iDV_Value != nDV_Value[iDV]-1) cout << ", "; + if (iDV_Value != nDV_Value[iDV] - 1) cout << ", "; } cout << " <-> "; - if ((Design_Variable[iDV] == NO_DEFORMATION) || - (Design_Variable[iDV] == FFD_SETTING) || - (Design_Variable[iDV] == SCALE) ) nParamDV = 0; + if ((Design_Variable[iDV] == NO_DEFORMATION) || (Design_Variable[iDV] == FFD_SETTING) || + (Design_Variable[iDV] == SCALE)) + nParamDV = 0; if (Design_Variable[iDV] == ANGLE_OF_ATTACK) nParamDV = 1; - if ((Design_Variable[iDV] == FFD_CAMBER_2D) || - (Design_Variable[iDV] == FFD_THICKNESS_2D) || - (Design_Variable[iDV] == HICKS_HENNE) || - (Design_Variable[iDV] == PARABOLIC) || - (Design_Variable[iDV] == AIRFOIL) || - (Design_Variable[iDV] == FFD_GULL) || - (Design_Variable[iDV] == FFD_ANGLE_OF_ATTACK) ) nParamDV = 2; - if ((Design_Variable[iDV] == TRANSLATION) || - (Design_Variable[iDV] == NACA_4DIGITS) || - (Design_Variable[iDV] == CST) || - (Design_Variable[iDV] == SURFACE_BUMP) || - (Design_Variable[iDV] == FFD_CAMBER) || - (Design_Variable[iDV] == FFD_THICKNESS) ) nParamDV = 3; + if ((Design_Variable[iDV] == FFD_CAMBER_2D) || (Design_Variable[iDV] == FFD_THICKNESS_2D) || + (Design_Variable[iDV] == HICKS_HENNE) || (Design_Variable[iDV] == PARABOLIC) || + (Design_Variable[iDV] == AIRFOIL) || (Design_Variable[iDV] == FFD_GULL) || + (Design_Variable[iDV] == FFD_ANGLE_OF_ATTACK)) + nParamDV = 2; + if ((Design_Variable[iDV] == TRANSLATION) || (Design_Variable[iDV] == NACA_4DIGITS) || + (Design_Variable[iDV] == CST) || (Design_Variable[iDV] == SURFACE_BUMP) || + (Design_Variable[iDV] == FFD_CAMBER) || (Design_Variable[iDV] == FFD_THICKNESS)) + nParamDV = 3; if (Design_Variable[iDV] == FFD_CONTROL_POINT_2D) nParamDV = 5; if (Design_Variable[iDV] == ROTATION) nParamDV = 6; - if ((Design_Variable[iDV] == FFD_CONTROL_POINT) || - (Design_Variable[iDV] == FFD_ROTATION) || - (Design_Variable[iDV] == FFD_CONTROL_SURFACE) ) nParamDV = 7; + if ((Design_Variable[iDV] == FFD_CONTROL_POINT) || (Design_Variable[iDV] == FFD_ROTATION) || + (Design_Variable[iDV] == FFD_CONTROL_SURFACE)) + nParamDV = 7; if (Design_Variable[iDV] == FFD_TWIST) nParamDV = 8; for (unsigned short iParamDV = 0; iParamDV < nParamDV; iParamDV++) { - if (iParamDV == 0) cout << "( "; if ((iParamDV == 0) && - ((Design_Variable[iDV] == NO_DEFORMATION) || - (Design_Variable[iDV] == FFD_SETTING) || - (Design_Variable[iDV] == FFD_ANGLE_OF_ATTACK) || - (Design_Variable[iDV] == FFD_CONTROL_POINT_2D) || - (Design_Variable[iDV] == FFD_CAMBER_2D) || - (Design_Variable[iDV] == FFD_THICKNESS_2D) || - (Design_Variable[iDV] == FFD_CONTROL_POINT) || - (Design_Variable[iDV] == FFD_NACELLE) || - (Design_Variable[iDV] == FFD_GULL) || - (Design_Variable[iDV] == FFD_TWIST) || - (Design_Variable[iDV] == FFD_ROTATION) || - (Design_Variable[iDV] == FFD_CONTROL_SURFACE) || - (Design_Variable[iDV] == FFD_CAMBER) || - (Design_Variable[iDV] == FFD_THICKNESS))) cout << FFDTag[iDV]; - else cout << ParamDV[iDV][iParamDV]; - - if (iParamDV < nParamDV-1) cout << ", "; - else cout <<" )"<< endl; + ((Design_Variable[iDV] == NO_DEFORMATION) || (Design_Variable[iDV] == FFD_SETTING) || + (Design_Variable[iDV] == FFD_ANGLE_OF_ATTACK) || (Design_Variable[iDV] == FFD_CONTROL_POINT_2D) || + (Design_Variable[iDV] == FFD_CAMBER_2D) || (Design_Variable[iDV] == FFD_THICKNESS_2D) || + (Design_Variable[iDV] == FFD_CONTROL_POINT) || (Design_Variable[iDV] == FFD_NACELLE) || + (Design_Variable[iDV] == FFD_GULL) || (Design_Variable[iDV] == FFD_TWIST) || + (Design_Variable[iDV] == FFD_ROTATION) || (Design_Variable[iDV] == FFD_CONTROL_SURFACE) || + (Design_Variable[iDV] == FFD_CAMBER) || (Design_Variable[iDV] == FFD_THICKNESS))) + cout << FFDTag[iDV]; + else + cout << ParamDV[iDV][iParamDV]; + if (iParamDV < nParamDV - 1) + cout << ", "; + else + cout << " )" << endl; } } @@ -6523,19 +7079,19 @@ void CConfig::SetOutput(SU2_COMPONENT val_software, unsigned short val_izone) { } else if (Design_Variable[iDV] == FFD_SETTING) { - cout << "Setting the FFD box structure." << endl; cout << "FFD boxes definition (FFD tag <-> degree <-> coord):" << endl; for (unsigned short iFFDBox = 0; iFFDBox < nFFDBox; iFFDBox++) { - cout << TagFFDBox[iFFDBox] << " <-> "; for (unsigned short iDegreeFFD = 0; iDegreeFFD < 3; iDegreeFFD++) { if (iDegreeFFD == 0) cout << "( "; cout << DegreeFFDBox[iFFDBox][iDegreeFFD]; - if (iDegreeFFD < 2) cout << ", "; - else cout <<" )"; + if (iDegreeFFD < 2) + cout << ", "; + else + cout << " )"; } cout << " <-> "; @@ -6543,78 +7099,148 @@ void CConfig::SetOutput(SU2_COMPONENT val_software, unsigned short val_izone) { for (unsigned short iCoordFFD = 0; iCoordFFD < 24; iCoordFFD++) { if (iCoordFFD == 0) cout << "( "; cout << CoordFFDBox[iFFDBox][iCoordFFD]; - if (iCoordFFD < 23) cout << ", "; - else cout <<" )"<< endl; + if (iCoordFFD < 23) + cout << ", "; + else + cout << " )" << endl; } - } } - else cout << endl; - + else + cout << endl; } } - if (((val_software == SU2_COMPONENT::SU2_CFD) && ( ContinuousAdjoint || DiscreteAdjoint)) || (val_software == SU2_COMPONENT::SU2_DOT)) { - - cout << endl <<"---------------- Design problem definition ( Zone " << iZone << " ) ------------------" << endl; - if (nObj==1) { + if (((val_software == SU2_COMPONENT::SU2_CFD) && (ContinuousAdjoint || DiscreteAdjoint)) || + (val_software == SU2_COMPONENT::SU2_DOT)) { + cout << endl << "---------------- Design problem definition ( Zone " << iZone << " ) ------------------" << endl; + if (nObj == 1) { switch (Kind_ObjFunc[0]) { - case DRAG_COEFFICIENT: cout << "CD objective function"; - if (Fixed_CL_Mode) { cout << " using fixed CL mode, dCD/dCL = " << dCD_dCL << "." << endl; } - else { cout << "." << endl; } + case DRAG_COEFFICIENT: + cout << "CD objective function"; + if (Fixed_CL_Mode) { + cout << " using fixed CL mode, dCD/dCL = " << dCD_dCL << "." << endl; + } else { + cout << "." << endl; + } break; - case LIFT_COEFFICIENT: cout << "CL objective function." << endl; break; - case MOMENT_X_COEFFICIENT: cout << "CMx objective function" << endl; - if (Fixed_CL_Mode) { cout << " using fixed CL mode, dCMx/dCL = " << dCMx_dCL << "." << endl; } - else { cout << "." << endl; } + case LIFT_COEFFICIENT: + cout << "CL objective function." << endl; break; - case MOMENT_Y_COEFFICIENT: cout << "CMy objective function" << endl; - if (Fixed_CL_Mode) { cout << " using fixed CL mode, dCMy/dCL = " << dCMy_dCL << "." << endl; } - else { cout << "." << endl; } + case MOMENT_X_COEFFICIENT: + cout << "CMx objective function" << endl; + if (Fixed_CL_Mode) { + cout << " using fixed CL mode, dCMx/dCL = " << dCMx_dCL << "." << endl; + } else { + cout << "." << endl; + } break; - case MOMENT_Z_COEFFICIENT: cout << "CMz objective function" << endl; - if (Fixed_CL_Mode) { cout << " using fixed CL mode, dCMz/dCL = " << dCMz_dCL << "." << endl; } - else { cout << "." << endl; } + case MOMENT_Y_COEFFICIENT: + cout << "CMy objective function" << endl; + if (Fixed_CL_Mode) { + cout << " using fixed CL mode, dCMy/dCL = " << dCMy_dCL << "." << endl; + } else { + cout << "." << endl; + } + break; + case MOMENT_Z_COEFFICIENT: + cout << "CMz objective function" << endl; + if (Fixed_CL_Mode) { + cout << " using fixed CL mode, dCMz/dCL = " << dCMz_dCL << "." << endl; + } else { + cout << "." << endl; + } + break; + case INVERSE_DESIGN_PRESSURE: + cout << "Inverse design (Cp) objective function." << endl; + break; + case INVERSE_DESIGN_HEATFLUX: + cout << "Inverse design (Heat Flux) objective function." << endl; + break; + case SIDEFORCE_COEFFICIENT: + cout << "Side force objective function." << endl; + break; + case EFFICIENCY: + cout << "CL/CD objective function." << endl; + break; + case EQUIVALENT_AREA: + cout << "Equivalent area objective function. CD weight: " << WeightCd << "." << endl; + break; + case NEARFIELD_PRESSURE: + cout << "Nearfield pressure objective function. CD weight: " << WeightCd << "." << endl; + break; + case FORCE_X_COEFFICIENT: + cout << "X-force objective function." << endl; + break; + case FORCE_Y_COEFFICIENT: + cout << "Y-force objective function." << endl; + break; + case FORCE_Z_COEFFICIENT: + cout << "Z-force objective function." << endl; + break; + case THRUST_COEFFICIENT: + cout << "Thrust objective function." << endl; + break; + case TORQUE_COEFFICIENT: + cout << "Torque efficiency objective function." << endl; + break; + case TOTAL_HEATFLUX: + cout << "Total heat flux objective function." << endl; + break; + case MAXIMUM_HEATFLUX: + cout << "Maximum heat flux objective function." << endl; + break; + case FIGURE_OF_MERIT: + cout << "Rotor Figure of Merit objective function." << endl; + break; + case BUFFET_SENSOR: + cout << "Buffet sensor objective function." << endl; + break; + case SURFACE_TOTAL_PRESSURE: + cout << "Average total pressure objective function." << endl; + break; + case SURFACE_STATIC_PRESSURE: + cout << "Average static pressure objective function." << endl; + break; + case SURFACE_STATIC_TEMPERATURE: + cout << "Average static temperature objective function." << endl; + break; + case SURFACE_MASSFLOW: + cout << "Mass flow rate objective function." << endl; + break; + case SURFACE_MACH: + cout << "Mach number objective function." << endl; + break; + case CUSTOM_OBJFUNC: + cout << "Custom objective function." << endl; + break; + case REFERENCE_GEOMETRY: + cout << "Target geometry objective function." << endl; + break; + case REFERENCE_NODE: + cout << "Target node displacement objective function." << endl; + break; + case VOLUME_FRACTION: + cout << "Volume fraction objective function." << endl; + break; + case TOPOL_DISCRETENESS: + cout << "Topology discreteness objective function." << endl; + break; + case TOPOL_COMPLIANCE: + cout << "Topology compliance objective function." << endl; + break; + case STRESS_PENALTY: + cout << "Stress penalty objective function." << endl; break; - case INVERSE_DESIGN_PRESSURE: cout << "Inverse design (Cp) objective function." << endl; break; - case INVERSE_DESIGN_HEATFLUX: cout << "Inverse design (Heat Flux) objective function." << endl; break; - case SIDEFORCE_COEFFICIENT: cout << "Side force objective function." << endl; break; - case EFFICIENCY: cout << "CL/CD objective function." << endl; break; - case EQUIVALENT_AREA: cout << "Equivalent area objective function. CD weight: " << WeightCd <<"."<< endl; break; - case NEARFIELD_PRESSURE: cout << "Nearfield pressure objective function. CD weight: " << WeightCd <<"."<< endl; break; - case FORCE_X_COEFFICIENT: cout << "X-force objective function." << endl; break; - case FORCE_Y_COEFFICIENT: cout << "Y-force objective function." << endl; break; - case FORCE_Z_COEFFICIENT: cout << "Z-force objective function." << endl; break; - case THRUST_COEFFICIENT: cout << "Thrust objective function." << endl; break; - case TORQUE_COEFFICIENT: cout << "Torque efficiency objective function." << endl; break; - case TOTAL_HEATFLUX: cout << "Total heat flux objective function." << endl; break; - case MAXIMUM_HEATFLUX: cout << "Maximum heat flux objective function." << endl; break; - case FIGURE_OF_MERIT: cout << "Rotor Figure of Merit objective function." << endl; break; - case BUFFET_SENSOR: cout << "Buffet sensor objective function." << endl; break; - case SURFACE_TOTAL_PRESSURE: cout << "Average total pressure objective function." << endl; break; - case SURFACE_STATIC_PRESSURE: cout << "Average static pressure objective function." << endl; break; - case SURFACE_STATIC_TEMPERATURE: cout << "Average static temperature objective function." << endl; break; - case SURFACE_MASSFLOW: cout << "Mass flow rate objective function." << endl; break; - case SURFACE_MACH: cout << "Mach number objective function." << endl; break; - case CUSTOM_OBJFUNC: cout << "Custom objective function." << endl; break; - case REFERENCE_GEOMETRY: cout << "Target geometry objective function." << endl; break; - case REFERENCE_NODE: cout << "Target node displacement objective function." << endl; break; - case VOLUME_FRACTION: cout << "Volume fraction objective function." << endl; break; - case TOPOL_DISCRETENESS: cout << "Topology discreteness objective function." << endl; break; - case TOPOL_COMPLIANCE: cout << "Topology compliance objective function." << endl; break; - case STRESS_PENALTY: cout << "Stress penalty objective function." << endl; break; } - } - else { + } else { cout << "Weighted sum objective function." << endl; } - } if (val_software == SU2_COMPONENT::SU2_CFD) { - auto PrintLimiterInfo = [&](const LIMITER kind_limiter) { cout << "Second order integration in space, with slope limiter.\n"; switch (kind_limiter) { @@ -6649,12 +7275,14 @@ void CConfig::SetOutput(SU2_COMPONENT val_software, unsigned short val_izone) { case LIMITER::SHARP_EDGES: cout << "Sharp edges slope-limiting method, with constant: " << Venkat_LimiterCoeff << ".\n"; cout << "The reference element size is: " << RefElemLength << ".\n"; - cout << "The reference sharp edge distance is: " << AdjSharp_LimiterCoeff*RefElemLength*Venkat_LimiterCoeff << "." << endl; + cout << "The reference sharp edge distance is: " + << AdjSharp_LimiterCoeff * RefElemLength * Venkat_LimiterCoeff << "." << endl; break; case LIMITER::WALL_DISTANCE: cout << "Wall distance slope-limiting method, with constant: " << Venkat_LimiterCoeff << ".\n"; cout << "The reference element size is: " << RefElemLength << ".\n"; - cout << "The reference wall distance is: " << AdjSharp_LimiterCoeff*RefElemLength*Venkat_LimiterCoeff << "." << endl; + cout << "The reference wall distance is: " << AdjSharp_LimiterCoeff * RefElemLength * Venkat_LimiterCoeff + << "." << endl; break; default: SU2_MPI::Error("Unknown or invalid limiter type.", CURRENT_FUNCTION); @@ -6662,53 +7290,69 @@ void CConfig::SetOutput(SU2_COMPONENT val_software, unsigned short val_izone) { } }; - cout << endl <<"--------------- Space Numerical Integration ( Zone " << iZone << " ) ------------------" << endl; + cout << endl << "--------------- Space Numerical Integration ( Zone " << iZone << " ) ------------------" << endl; if (SmoothNumGrid) cout << "There are some smoothing iterations on the grid coordinates." << endl; - if ((Kind_Solver == MAIN_SOLVER::EULER) || (Kind_Solver == MAIN_SOLVER::NAVIER_STOKES) || (Kind_Solver == MAIN_SOLVER::RANS) || - (Kind_Solver == MAIN_SOLVER::INC_EULER) || (Kind_Solver == MAIN_SOLVER::INC_NAVIER_STOKES) || (Kind_Solver == MAIN_SOLVER::INC_RANS) || - (Kind_Solver == MAIN_SOLVER::NEMO_EULER) || (Kind_Solver == MAIN_SOLVER::NEMO_NAVIER_STOKES) || - (Kind_Solver == MAIN_SOLVER::DISC_ADJ_EULER) || (Kind_Solver == MAIN_SOLVER::DISC_ADJ_NAVIER_STOKES) || (Kind_Solver == MAIN_SOLVER::DISC_ADJ_RANS) ) { - + if ((Kind_Solver == MAIN_SOLVER::EULER) || (Kind_Solver == MAIN_SOLVER::NAVIER_STOKES) || + (Kind_Solver == MAIN_SOLVER::RANS) || (Kind_Solver == MAIN_SOLVER::INC_EULER) || + (Kind_Solver == MAIN_SOLVER::INC_NAVIER_STOKES) || (Kind_Solver == MAIN_SOLVER::INC_RANS) || + (Kind_Solver == MAIN_SOLVER::NEMO_EULER) || (Kind_Solver == MAIN_SOLVER::NEMO_NAVIER_STOKES) || + (Kind_Solver == MAIN_SOLVER::DISC_ADJ_EULER) || (Kind_Solver == MAIN_SOLVER::DISC_ADJ_NAVIER_STOKES) || + (Kind_Solver == MAIN_SOLVER::DISC_ADJ_RANS)) { if (Kind_ConvNumScheme_Flow == SPACE_CENTERED) { if (Kind_Centered_Flow == CENTERED::LAX) { cout << "Lax-Friedrich scheme (1st order in space) for the flow inviscid terms.\n"; cout << "Lax viscous coefficients (1st): " << Kappa_1st_Flow << ".\n"; cout << "First order integration." << endl; - } - else { + } else { cout << "Jameson-Schmidt-Turkel scheme (2nd order in space) for the flow inviscid terms.\n"; cout << "JST viscous coefficients (2nd & 4th): " << Kappa_2nd_Flow << ", " << Kappa_4th_Flow << ".\n"; - cout << "The method includes a grid stretching correction (p = 0.3)."<< endl; + cout << "The method includes a grid stretching correction (p = 0.3)." << endl; } } if (Kind_ConvNumScheme_Flow == SPACE_UPWIND) { - if (Kind_Upwind_Flow == UPWIND::ROE) cout << "Roe (with entropy fix = "<< EntropyFix_Coeff <<") solver for the flow inviscid terms."<< endl; - if (Kind_Upwind_Flow == UPWIND::TURKEL) cout << "Roe-Turkel solver for the flow inviscid terms."<< endl; - if (Kind_Upwind_Flow == UPWIND::AUSM) cout << "AUSM solver for the flow inviscid terms."<< endl; - if (Kind_Upwind_Flow == UPWIND::HLLC) cout << "HLLC solver for the flow inviscid terms."<< endl; - if (Kind_Upwind_Flow == UPWIND::SW) cout << "Steger-Warming solver for the flow inviscid terms."<< endl; - if (Kind_Upwind_Flow == UPWIND::MSW) cout << "Modified Steger-Warming solver for the flow inviscid terms."<< endl; - if (Kind_Upwind_Flow == UPWIND::L2ROE) cout << "L2ROE Low Mach ROE solver for the flow inviscid terms."<< endl; - if (Kind_Upwind_Flow == UPWIND::LMROE) cout << "Rieper Low Mach ROE solver for the flow inviscid terms."<< endl; - if (Kind_Upwind_Flow == UPWIND::SLAU) cout << "Simple Low-Dissipation AUSM solver for the flow inviscid terms."<< endl; - if (Kind_Upwind_Flow == UPWIND::SLAU2) cout << "Simple Low-Dissipation AUSM 2 solver for the flow inviscid terms."<< endl; - if (Kind_Upwind_Flow == UPWIND::FDS) cout << "Flux difference splitting (FDS) upwind scheme for the flow inviscid terms."<< endl; - if (Kind_Upwind_Flow == UPWIND::AUSMPLUSUP) cout << "AUSM+-up solver for the flow inviscid terms."<< endl; - if (Kind_Upwind_Flow == UPWIND::AUSMPLUSUP2) cout << "AUSM+-up2 solver for the flow inviscid terms."<< endl; - if (Kind_Upwind_Flow == UPWIND::AUSMPLUSM) cout << "AUSM+M solver for the flow inviscid terms."<< endl; - - if (Kind_Solver == MAIN_SOLVER::EULER || Kind_Solver == MAIN_SOLVER::DISC_ADJ_EULER || + if (Kind_Upwind_Flow == UPWIND::ROE) + cout << "Roe (with entropy fix = " << EntropyFix_Coeff << ") solver for the flow inviscid terms." << endl; + if (Kind_Upwind_Flow == UPWIND::TURKEL) cout << "Roe-Turkel solver for the flow inviscid terms." << endl; + if (Kind_Upwind_Flow == UPWIND::AUSM) cout << "AUSM solver for the flow inviscid terms." << endl; + if (Kind_Upwind_Flow == UPWIND::HLLC) cout << "HLLC solver for the flow inviscid terms." << endl; + if (Kind_Upwind_Flow == UPWIND::SW) cout << "Steger-Warming solver for the flow inviscid terms." << endl; + if (Kind_Upwind_Flow == UPWIND::MSW) + cout << "Modified Steger-Warming solver for the flow inviscid terms." << endl; + if (Kind_Upwind_Flow == UPWIND::L2ROE) cout << "L2ROE Low Mach ROE solver for the flow inviscid terms." << endl; + if (Kind_Upwind_Flow == UPWIND::LMROE) + cout << "Rieper Low Mach ROE solver for the flow inviscid terms." << endl; + if (Kind_Upwind_Flow == UPWIND::SLAU) + cout << "Simple Low-Dissipation AUSM solver for the flow inviscid terms." << endl; + if (Kind_Upwind_Flow == UPWIND::SLAU2) + cout << "Simple Low-Dissipation AUSM 2 solver for the flow inviscid terms." << endl; + if (Kind_Upwind_Flow == UPWIND::FDS) + cout << "Flux difference splitting (FDS) upwind scheme for the flow inviscid terms." << endl; + if (Kind_Upwind_Flow == UPWIND::AUSMPLUSUP) cout << "AUSM+-up solver for the flow inviscid terms." << endl; + if (Kind_Upwind_Flow == UPWIND::AUSMPLUSUP2) cout << "AUSM+-up2 solver for the flow inviscid terms." << endl; + if (Kind_Upwind_Flow == UPWIND::AUSMPLUSM) cout << "AUSM+M solver for the flow inviscid terms." << endl; + + if (Kind_Solver == MAIN_SOLVER::EULER || Kind_Solver == MAIN_SOLVER::DISC_ADJ_EULER || Kind_Solver == MAIN_SOLVER::NAVIER_STOKES || Kind_Solver == MAIN_SOLVER::DISC_ADJ_NAVIER_STOKES || - Kind_Solver == MAIN_SOLVER::RANS || Kind_Solver == MAIN_SOLVER::DISC_ADJ_RANS) { + Kind_Solver == MAIN_SOLVER::RANS || Kind_Solver == MAIN_SOLVER::DISC_ADJ_RANS) { switch (Kind_RoeLowDiss) { - case NO_ROELOWDISS: cout << "Standard Roe without low-dissipation function."<< endl; break; - case NTS: cout << "Roe with NTS low-dissipation function."<< endl; break; - case FD: cout << "Roe with DDES's FD low-dissipation function."<< endl; break; - case NTS_DUCROS: cout << "Roe with NTS low-dissipation function + Ducros shock sensor."<< endl; break; - case FD_DUCROS: cout << "Roe with DDES's FD low-dissipation function + Ducros shock sensor."<< endl; break; + case NO_ROELOWDISS: + cout << "Standard Roe without low-dissipation function." << endl; + break; + case NTS: + cout << "Roe with NTS low-dissipation function." << endl; + break; + case FD: + cout << "Roe with DDES's FD low-dissipation function." << endl; + break; + case NTS_DUCROS: + cout << "Roe with NTS low-dissipation function + Ducros shock sensor." << endl; + break; + case FD_DUCROS: + cout << "Roe with DDES's FD low-dissipation function + Ducros shock sensor." << endl; + break; } } @@ -6717,9 +7361,7 @@ void CConfig::SetOutput(SU2_COMPONENT val_software, unsigned short val_izone) { } else { cout << "First order integration in space." << endl; } - } - } if ((Kind_Solver == MAIN_SOLVER::RANS) || (Kind_Solver == MAIN_SOLVER::DISC_ADJ_RANS)) { @@ -6733,24 +7375,25 @@ void CConfig::SetOutput(SU2_COMPONENT val_software, unsigned short val_izone) { } } - if ((Kind_Solver == MAIN_SOLVER::ADJ_EULER) || (Kind_Solver == MAIN_SOLVER::ADJ_NAVIER_STOKES) || (Kind_Solver == MAIN_SOLVER::ADJ_RANS)) { - + if ((Kind_Solver == MAIN_SOLVER::ADJ_EULER) || (Kind_Solver == MAIN_SOLVER::ADJ_NAVIER_STOKES) || + (Kind_Solver == MAIN_SOLVER::ADJ_RANS)) { if (Kind_ConvNumScheme_AdjFlow == SPACE_CENTERED) { if (Kind_Centered_AdjFlow == CENTERED::JST) { - cout << "Jameson-Schmidt-Turkel scheme for the adjoint inviscid terms."<< endl; - cout << "JST viscous coefficients (1st, 2nd, & 4th): " << Kappa_1st_AdjFlow - << ", " << Kappa_2nd_AdjFlow << ", " << Kappa_4th_AdjFlow <<"."<< endl; - cout << "The method includes a grid stretching correction (p = 0.3)."<< endl; + cout << "Jameson-Schmidt-Turkel scheme for the adjoint inviscid terms." << endl; + cout << "JST viscous coefficients (1st, 2nd, & 4th): " << Kappa_1st_AdjFlow << ", " << Kappa_2nd_AdjFlow + << ", " << Kappa_4th_AdjFlow << "." << endl; + cout << "The method includes a grid stretching correction (p = 0.3)." << endl; cout << "Second order integration." << endl; } if (Kind_Centered_AdjFlow == CENTERED::LAX) { - cout << "Lax-Friedrich scheme for the adjoint inviscid terms."<< endl; + cout << "Lax-Friedrich scheme for the adjoint inviscid terms." << endl; cout << "First order integration." << endl; } } if (Kind_ConvNumScheme_AdjFlow == SPACE_UPWIND) { - if (Kind_Upwind_AdjFlow == UPWIND::ROE) cout << "Roe (with entropy fix = "<< EntropyFix_Coeff <<") solver for the adjoint inviscid terms."<< endl; + if (Kind_Upwind_AdjFlow == UPWIND::ROE) + cout << "Roe (with entropy fix = " << EntropyFix_Coeff << ") solver for the adjoint inviscid terms." << endl; if (MUSCL_AdjFlow) { PrintLimiterInfo(Kind_SlopeLimit_AdjFlow); } else { @@ -6758,13 +7401,14 @@ void CConfig::SetOutput(SU2_COMPONENT val_software, unsigned short val_izone) { } } - cout << "The reference sharp edge distance is: " << AdjSharp_LimiterCoeff*RefElemLength*Venkat_LimiterCoeff <<". "<< endl; - + cout << "The reference sharp edge distance is: " << AdjSharp_LimiterCoeff * RefElemLength * Venkat_LimiterCoeff + << ". " << endl; } if ((Kind_Solver == MAIN_SOLVER::ADJ_RANS) && (!Frozen_Visc_Cont)) { if (Kind_ConvNumScheme_AdjTurb == SPACE_UPWIND) { - if (Kind_Upwind_Turb == UPWIND::SCALAR_UPWIND) cout << "Scalar upwind solver for the adjoint turbulence model." << endl; + if (Kind_Upwind_Turb == UPWIND::SCALAR_UPWIND) + cout << "Scalar upwind solver for the adjoint turbulence model." << endl; if (MUSCL_AdjTurb) { PrintLimiterInfo(Kind_SlopeLimit_AdjTurb); } else { @@ -6775,62 +7419,85 @@ void CConfig::SetOutput(SU2_COMPONENT val_software, unsigned short val_izone) { if ((Kind_Solver == MAIN_SOLVER::NAVIER_STOKES) || (Kind_Solver == MAIN_SOLVER::RANS) || (Kind_Solver == MAIN_SOLVER::INC_NAVIER_STOKES) || (Kind_Solver == MAIN_SOLVER::INC_RANS) || - (Kind_Solver == MAIN_SOLVER::NEMO_NAVIER_STOKES) || - (Kind_Solver == MAIN_SOLVER::DISC_ADJ_INC_NAVIER_STOKES) || (Kind_Solver == MAIN_SOLVER::DISC_ADJ_INC_RANS) || - (Kind_Solver == MAIN_SOLVER::DISC_ADJ_NAVIER_STOKES) || (Kind_Solver == MAIN_SOLVER::DISC_ADJ_RANS)) { - cout << "Average of gradients with correction (viscous flow terms)." << endl; + (Kind_Solver == MAIN_SOLVER::NEMO_NAVIER_STOKES) || (Kind_Solver == MAIN_SOLVER::DISC_ADJ_INC_NAVIER_STOKES) || + (Kind_Solver == MAIN_SOLVER::DISC_ADJ_INC_RANS) || (Kind_Solver == MAIN_SOLVER::DISC_ADJ_NAVIER_STOKES) || + (Kind_Solver == MAIN_SOLVER::DISC_ADJ_RANS)) { + cout << "Average of gradients with correction (viscous flow terms)." << endl; } if ((Kind_Solver == MAIN_SOLVER::ADJ_NAVIER_STOKES) || (Kind_Solver == MAIN_SOLVER::ADJ_RANS)) { cout << "Average of gradients with correction (viscous adjoint terms)." << endl; } - if ((Kind_Solver == MAIN_SOLVER::RANS) || (Kind_Solver == MAIN_SOLVER::DISC_ADJ_RANS) || (Kind_Solver == MAIN_SOLVER::INC_RANS) || (Kind_Solver == MAIN_SOLVER::DISC_ADJ_INC_RANS) ) { + if ((Kind_Solver == MAIN_SOLVER::RANS) || (Kind_Solver == MAIN_SOLVER::DISC_ADJ_RANS) || + (Kind_Solver == MAIN_SOLVER::INC_RANS) || (Kind_Solver == MAIN_SOLVER::DISC_ADJ_INC_RANS)) { cout << "Average of gradients with correction (viscous turbulence terms)." << endl; } if ((Kind_Solver == MAIN_SOLVER::ADJ_RANS) && (!Frozen_Visc_Cont)) { - cout << "Average of gradients with correction (2nd order) for computation of adjoint viscous turbulence terms." << endl; - if (Kind_TimeIntScheme_AdjTurb == EULER_IMPLICIT) cout << "Euler implicit method for the turbulent adjoint equation." << endl; + cout << "Average of gradients with correction (2nd order) for computation of adjoint viscous turbulence terms." + << endl; + if (Kind_TimeIntScheme_AdjTurb == EULER_IMPLICIT) + cout << "Euler implicit method for the turbulent adjoint equation." << endl; } - if(Kind_Solver != MAIN_SOLVER::FEM_EULER && Kind_Solver != MAIN_SOLVER::FEM_NAVIER_STOKES && - Kind_Solver != MAIN_SOLVER::FEM_RANS && Kind_Solver != MAIN_SOLVER::FEM_LES && - Kind_Solver != MAIN_SOLVER::DISC_ADJ_FEM_EULER && Kind_Solver != MAIN_SOLVER::DISC_ADJ_FEM_NS && - Kind_Solver != MAIN_SOLVER::DISC_ADJ_FEM_RANS) { - if (!fea){ + if (Kind_Solver != MAIN_SOLVER::FEM_EULER && Kind_Solver != MAIN_SOLVER::FEM_NAVIER_STOKES && + Kind_Solver != MAIN_SOLVER::FEM_RANS && Kind_Solver != MAIN_SOLVER::FEM_LES && + Kind_Solver != MAIN_SOLVER::DISC_ADJ_FEM_EULER && Kind_Solver != MAIN_SOLVER::DISC_ADJ_FEM_NS && + Kind_Solver != MAIN_SOLVER::DISC_ADJ_FEM_RANS) { + if (!fea) { switch (Kind_Gradient_Method_Recon) { - case GREEN_GAUSS: cout << "Gradient for upwind reconstruction: Green-Gauss." << endl; break; - case LEAST_SQUARES: cout << "Gradient for upwind reconstruction: unweighted Least-Squares." << endl; break; - case WEIGHTED_LEAST_SQUARES: cout << "Gradient for upwind reconstruction: inverse-distance weighted Least-Squares." << endl; break; + case GREEN_GAUSS: + cout << "Gradient for upwind reconstruction: Green-Gauss." << endl; + break; + case LEAST_SQUARES: + cout << "Gradient for upwind reconstruction: unweighted Least-Squares." << endl; + break; + case WEIGHTED_LEAST_SQUARES: + cout << "Gradient for upwind reconstruction: inverse-distance weighted Least-Squares." << endl; + break; } switch (Kind_Gradient_Method) { - case GREEN_GAUSS: cout << "Gradient for viscous and source terms: Green-Gauss." << endl; break; - case LEAST_SQUARES: cout << "Gradient for viscous and source terms: unweighted Least-Squares." << endl; break; - case WEIGHTED_LEAST_SQUARES: cout << "Gradient for viscous and source terms: inverse-distance weighted Least-Squares." << endl; break; + case GREEN_GAUSS: + cout << "Gradient for viscous and source terms: Green-Gauss." << endl; + break; + case LEAST_SQUARES: + cout << "Gradient for viscous and source terms: unweighted Least-Squares." << endl; + break; + case WEIGHTED_LEAST_SQUARES: + cout << "Gradient for viscous and source terms: inverse-distance weighted Least-Squares." << endl; + break; } - } - else{ + } else { cout << "Spatial discretization using the Finite Element Method." << endl; } } - if(Kind_Solver == MAIN_SOLVER::FEM_EULER || Kind_Solver == MAIN_SOLVER::FEM_NAVIER_STOKES || - Kind_Solver == MAIN_SOLVER::FEM_RANS || Kind_Solver == MAIN_SOLVER::FEM_LES || - Kind_Solver == MAIN_SOLVER::DISC_ADJ_FEM_EULER || Kind_Solver == MAIN_SOLVER::DISC_ADJ_FEM_NS || - Kind_Solver == MAIN_SOLVER::DISC_ADJ_FEM_RANS) { - if(Kind_FEM_Flow == DG) { + if (Kind_Solver == MAIN_SOLVER::FEM_EULER || Kind_Solver == MAIN_SOLVER::FEM_NAVIER_STOKES || + Kind_Solver == MAIN_SOLVER::FEM_RANS || Kind_Solver == MAIN_SOLVER::FEM_LES || + Kind_Solver == MAIN_SOLVER::DISC_ADJ_FEM_EULER || Kind_Solver == MAIN_SOLVER::DISC_ADJ_FEM_NS || + Kind_Solver == MAIN_SOLVER::DISC_ADJ_FEM_RANS) { + if (Kind_FEM_Flow == DG) { cout << "Discontinuous Galerkin Finite element solver" << endl; - switch( Riemann_Solver_FEM ) { - case UPWIND::ROE: cout << "Roe (with entropy fix) solver for inviscid fluxes over the faces" << endl; break; - case UPWIND::LAX_FRIEDRICH: cout << "Lax-Friedrich solver for inviscid fluxes over the faces" << endl; break; - case UPWIND::AUSM: cout << "AUSM solver inviscid fluxes over the faces" << endl; break; - case UPWIND::HLLC: cout << "HLLC solver inviscid fluxes over the faces" << endl; break; - default: break; + switch (Riemann_Solver_FEM) { + case UPWIND::ROE: + cout << "Roe (with entropy fix) solver for inviscid fluxes over the faces" << endl; + break; + case UPWIND::LAX_FRIEDRICH: + cout << "Lax-Friedrich solver for inviscid fluxes over the faces" << endl; + break; + case UPWIND::AUSM: + cout << "AUSM solver inviscid fluxes over the faces" << endl; + break; + case UPWIND::HLLC: + cout << "HLLC solver inviscid fluxes over the faces" << endl; + break; + default: + break; } - if(Kind_Solver != MAIN_SOLVER::FEM_EULER && Kind_Solver != MAIN_SOLVER::DISC_ADJ_FEM_EULER) { + if (Kind_Solver != MAIN_SOLVER::FEM_EULER && Kind_Solver != MAIN_SOLVER::DISC_ADJ_FEM_EULER) { cout << "Theta symmetrizing terms interior penalty: " << Theta_Interior_Penalty_DGFEM << endl; } } @@ -6842,50 +7509,58 @@ void CConfig::SetOutput(SU2_COMPONENT val_software, unsigned short val_izone) { cout << "Padded matrix size for optimal performance: " << sizeMatMulPadding << endl; } - cout << endl <<"--------------- Time Numerical Integration ( Zone " << iZone << " ) ------------------" << endl; + cout << endl << "--------------- Time Numerical Integration ( Zone " << iZone << " ) ------------------" << endl; if (!fea) { - switch (TimeMarching) { - case TIME_MARCHING::STEADY: - cout << "Local time stepping (steady state simulation)." << endl; break; - - case TIME_MARCHING::TIME_STEPPING: - cout << "Unsteady simulation using a time stepping strategy."<< endl; - if (Unst_CFL != 0.0) { - cout << "Time step computed by the code. Unsteady CFL number: " << Unst_CFL <<"."<< endl; - if (Delta_UnstTime != 0.0) { - cout << "Synchronization time provided by the user (s): "<< Delta_UnstTime << "." << endl; - } - } - else cout << "Unsteady time step provided by the user (s): "<< Delta_UnstTime << "." << endl; - break; + switch (TimeMarching) { + case TIME_MARCHING::STEADY: + cout << "Local time stepping (steady state simulation)." << endl; + break; - case TIME_MARCHING::DT_STEPPING_1ST: case TIME_MARCHING::DT_STEPPING_2ND: - if (TimeMarching == TIME_MARCHING::DT_STEPPING_1ST) cout << "Unsteady simulation, dual time stepping strategy (first order in time)."<< endl; - if (TimeMarching == TIME_MARCHING::DT_STEPPING_2ND) cout << "Unsteady simulation, dual time stepping strategy (second order in time)."<< endl; - if (Unst_CFL != 0.0) cout << "Time step computed by the code. Unsteady CFL number: " << Unst_CFL <<"."<< endl; - else cout << "Unsteady time step provided by the user (s): "<< Delta_UnstTime << "." << endl; - break; + case TIME_MARCHING::TIME_STEPPING: + cout << "Unsteady simulation using a time stepping strategy." << endl; + if (Unst_CFL != 0.0) { + cout << "Time step computed by the code. Unsteady CFL number: " << Unst_CFL << "." << endl; + if (Delta_UnstTime != 0.0) { + cout << "Synchronization time provided by the user (s): " << Delta_UnstTime << "." << endl; + } + } else + cout << "Unsteady time step provided by the user (s): " << Delta_UnstTime << "." << endl; + break; - default: - break; - } - } - else { - if (Time_Domain) { - cout << "Dynamic structural analysis."<< endl; - cout << "Time step provided by the user for the dynamic analysis(s): "<< Time_Step << "." << endl; + case TIME_MARCHING::DT_STEPPING_1ST: + case TIME_MARCHING::DT_STEPPING_2ND: + if (TimeMarching == TIME_MARCHING::DT_STEPPING_1ST) + cout << "Unsteady simulation, dual time stepping strategy (first order in time)." << endl; + if (TimeMarching == TIME_MARCHING::DT_STEPPING_2ND) + cout << "Unsteady simulation, dual time stepping strategy (second order in time)." << endl; + if (Unst_CFL != 0.0) + cout << "Time step computed by the code. Unsteady CFL number: " << Unst_CFL << "." << endl; + else + cout << "Unsteady time step provided by the user (s): " << Delta_UnstTime << "." << endl; + break; + + default: + break; + } } else { - cout << "Static structural analysis." << endl; + if (Time_Domain) { + cout << "Dynamic structural analysis." << endl; + cout << "Time step provided by the user for the dynamic analysis(s): " << Time_Step << "." << endl; + } else { + cout << "Static structural analysis." << endl; + } } - } - if ((Kind_Solver == MAIN_SOLVER::EULER) || (Kind_Solver == MAIN_SOLVER::NAVIER_STOKES) || (Kind_Solver == MAIN_SOLVER::RANS) || - (Kind_Solver == MAIN_SOLVER::INC_EULER) || (Kind_Solver == MAIN_SOLVER::INC_NAVIER_STOKES) || (Kind_Solver == MAIN_SOLVER::INC_RANS) || + if ((Kind_Solver == MAIN_SOLVER::EULER) || (Kind_Solver == MAIN_SOLVER::NAVIER_STOKES) || + (Kind_Solver == MAIN_SOLVER::RANS) || (Kind_Solver == MAIN_SOLVER::INC_EULER) || + (Kind_Solver == MAIN_SOLVER::INC_NAVIER_STOKES) || (Kind_Solver == MAIN_SOLVER::INC_RANS) || (Kind_Solver == MAIN_SOLVER::NEMO_EULER) || (Kind_Solver == MAIN_SOLVER::NEMO_NAVIER_STOKES) || - (Kind_Solver == MAIN_SOLVER::DISC_ADJ_INC_EULER) || (Kind_Solver == MAIN_SOLVER::DISC_ADJ_INC_NAVIER_STOKES) || (Kind_Solver == MAIN_SOLVER::DISC_ADJ_INC_RANS) || - (Kind_Solver == MAIN_SOLVER::DISC_ADJ_EULER) || (Kind_Solver == MAIN_SOLVER::DISC_ADJ_NAVIER_STOKES) || (Kind_Solver == MAIN_SOLVER::DISC_ADJ_RANS) || - (Kind_Solver == MAIN_SOLVER::DISC_ADJ_FEM_EULER) || (Kind_Solver == MAIN_SOLVER::DISC_ADJ_FEM_NS) || (Kind_Solver == MAIN_SOLVER::DISC_ADJ_FEM_RANS)) { + (Kind_Solver == MAIN_SOLVER::DISC_ADJ_INC_EULER) || (Kind_Solver == MAIN_SOLVER::DISC_ADJ_INC_NAVIER_STOKES) || + (Kind_Solver == MAIN_SOLVER::DISC_ADJ_INC_RANS) || (Kind_Solver == MAIN_SOLVER::DISC_ADJ_EULER) || + (Kind_Solver == MAIN_SOLVER::DISC_ADJ_NAVIER_STOKES) || (Kind_Solver == MAIN_SOLVER::DISC_ADJ_RANS) || + (Kind_Solver == MAIN_SOLVER::DISC_ADJ_FEM_EULER) || (Kind_Solver == MAIN_SOLVER::DISC_ADJ_FEM_NS) || + (Kind_Solver == MAIN_SOLVER::DISC_ADJ_FEM_RANS)) { switch (Kind_TimeIntScheme_Flow) { case RUNGE_KUTTA_EXPLICIT: cout << "Runge-Kutta explicit method for the flow equations." << endl; @@ -6902,7 +7577,8 @@ void CConfig::SetOutput(SU2_COMPONENT val_software, unsigned short val_izone) { case EULER_IMPLICIT: cout << "Euler implicit method for the flow equations." << endl; if (Kind_FluidModel == MUTATIONPP) - SU2_MPI::Error("Implicit time scheme is not yet implemented with Mutation++. Use EULER_EXPLICIT.", CURRENT_FUNCTION); + SU2_MPI::Error("Implicit time scheme is not yet implemented with Mutation++. Use EULER_EXPLICIT.", + CURRENT_FUNCTION); switch (Kind_Linear_Solver) { case BCGSTAB: case FGMRES: @@ -6912,24 +7588,40 @@ void CConfig::SetOutput(SU2_COMPONENT val_software, unsigned short val_izone) { else cout << "FGMRES is used for solving the linear system." << endl; switch (Kind_Linear_Solver_Prec) { - case ILU: cout << "Using a ILU("<< Linear_Solver_ILU_n <<") preconditioning."<< endl; break; - case LINELET: cout << "Using a linelet preconditioning."<< endl; break; - case LU_SGS: cout << "Using a LU-SGS preconditioning."<< endl; break; - case JACOBI: cout << "Using a Jacobi preconditioning."<< endl; break; + case ILU: + cout << "Using a ILU(" << Linear_Solver_ILU_n << ") preconditioning." << endl; + break; + case LINELET: + cout << "Using a linelet preconditioning." << endl; + break; + case LU_SGS: + cout << "Using a LU-SGS preconditioning." << endl; + break; + case JACOBI: + cout << "Using a Jacobi preconditioning." << endl; + break; } break; case SMOOTHER: switch (Kind_Linear_Solver_Prec) { - case ILU: cout << "A ILU(" << Linear_Solver_ILU_n << ")"; break; - case LINELET: cout << "A Linelet"; break; - case LU_SGS: cout << "A LU-SGS"; break; - case JACOBI: cout << "A Jacobi"; break; + case ILU: + cout << "A ILU(" << Linear_Solver_ILU_n << ")"; + break; + case LINELET: + cout << "A Linelet"; + break; + case LU_SGS: + cout << "A LU-SGS"; + break; + case JACOBI: + cout << "A Jacobi"; + break; } cout << " method is used for smoothing the linear system." << endl; break; } - cout << "Convergence criteria of the linear solver: "<< Linear_Solver_Error <<"."<< endl; - cout << "Max number of linear iterations: "<< Linear_Solver_Iter <<"."<< endl; + cout << "Convergence criteria of the linear solver: " << Linear_Solver_Error << "." << endl; + cout << "Max number of linear iterations: " << Linear_Solver_Iter << "." << endl; break; case CLASSICAL_RK4_EXPLICIT: cout << "Classical RK4 explicit method for the flow equations." << endl; @@ -6950,25 +7642,27 @@ void CConfig::SetOutput(SU2_COMPONENT val_software, unsigned short val_izone) { switch (Kind_Linear_Solver) { case BCGSTAB: cout << "BCGSTAB is used for solving the linear system." << endl; - cout << "Convergence criteria of the linear solver: "<< Linear_Solver_Error <<"."<< endl; - cout << "Max number of iterations: "<< Linear_Solver_Iter <<"."<< endl; + cout << "Convergence criteria of the linear solver: " << Linear_Solver_Error << "." << endl; + cout << "Max number of iterations: " << Linear_Solver_Iter << "." << endl; break; - case FGMRES: case RESTARTED_FGMRES: + case FGMRES: + case RESTARTED_FGMRES: cout << "FGMRES is used for solving the linear system." << endl; - cout << "Convergence criteria of the linear solver: "<< Linear_Solver_Error <<"."<< endl; - cout << "Max number of iterations: "<< Linear_Solver_Iter <<"."<< endl; + cout << "Convergence criteria of the linear solver: " << Linear_Solver_Error << "." << endl; + cout << "Max number of iterations: " << Linear_Solver_Iter << "." << endl; break; case CONJUGATE_GRADIENT: cout << "A Conjugate Gradient method is used for solving the linear system." << endl; - cout << "Convergence criteria of the linear solver: "<< Linear_Solver_Error <<"."<< endl; - cout << "Max number of iterations: "<< Linear_Solver_Iter <<"."<< endl; + cout << "Convergence criteria of the linear solver: " << Linear_Solver_Error << "." << endl; + cout << "Max number of iterations: " << Linear_Solver_Iter << "." << endl; break; } break; } } - if ((Kind_Solver == MAIN_SOLVER::ADJ_EULER) || (Kind_Solver == MAIN_SOLVER::ADJ_NAVIER_STOKES) || (Kind_Solver == MAIN_SOLVER::ADJ_RANS)) { + if ((Kind_Solver == MAIN_SOLVER::ADJ_EULER) || (Kind_Solver == MAIN_SOLVER::ADJ_NAVIER_STOKES) || + (Kind_Solver == MAIN_SOLVER::ADJ_RANS)) { switch (Kind_TimeIntScheme_AdjFlow) { case RUNGE_KUTTA_EXPLICIT: cout << "Runge-Kutta explicit method for the adjoint equations." << endl; @@ -6979,13 +7673,17 @@ void CConfig::SetOutput(SU2_COMPONENT val_software, unsigned short val_izone) { } cout << endl; break; - case EULER_EXPLICIT: cout << "Euler explicit method for the adjoint equations." << endl; break; - case EULER_IMPLICIT: cout << "Euler implicit method for the adjoint equations." << endl; break; + case EULER_EXPLICIT: + cout << "Euler explicit method for the adjoint equations." << endl; + break; + case EULER_IMPLICIT: + cout << "Euler implicit method for the adjoint equations." << endl; + break; } } - if(Kind_Solver == MAIN_SOLVER::FEM_EULER || Kind_Solver == MAIN_SOLVER::FEM_NAVIER_STOKES || - Kind_Solver == MAIN_SOLVER::FEM_RANS || Kind_Solver == MAIN_SOLVER::FEM_LES) { + if (Kind_Solver == MAIN_SOLVER::FEM_EULER || Kind_Solver == MAIN_SOLVER::FEM_NAVIER_STOKES || + Kind_Solver == MAIN_SOLVER::FEM_RANS || Kind_Solver == MAIN_SOLVER::FEM_LES) { switch (Kind_TimeIntScheme_FEM_Flow) { case RUNGE_KUTTA_EXPLICIT: cout << "Runge-Kutta explicit method for the flow equations." << endl; @@ -7004,13 +7702,13 @@ void CConfig::SetOutput(SU2_COMPONENT val_software, unsigned short val_izone) { break; case ADER_DG: - if(nLevels_TimeAccurateLTS == 1) + if (nLevels_TimeAccurateLTS == 1) cout << "ADER-DG for the flow equations with global time stepping." << endl; else cout << "ADER-DG for the flow equations with " << nLevels_TimeAccurateLTS << " levels for time accurate local time stepping." << endl; - switch( Kind_ADER_Predictor ) { + switch (Kind_ADER_Predictor) { case ADER_ALIASED_PREDICTOR: cout << "An aliased approach is used in the predictor step. " << endl; break; @@ -7020,19 +7718,19 @@ void CConfig::SetOutput(SU2_COMPONENT val_software, unsigned short val_izone) { } cout << "Number of time DOFs ADER-DG predictor step: " << nTimeDOFsADER_DG << endl; cout << "Location of time DOFs ADER-DG on the interval [-1,1]: "; - for (unsigned short iDOF=0; iDOF & option_value) { +bool CConfig::TokenizeString(string& str, string& option_name, vector& option_value) { const string delimiters(" (){}:,\t\n\v\f\r"); // check for comments or empty string string::size_type pos, last_pos; pos = str.find_first_of('%'); - if ( (str.length() == 0) || (pos == 0) ) { + if ((str.length() == 0) || (pos == 0)) { // str is empty or a comment line, so no option here return false; } @@ -7596,24 +8305,22 @@ bool CConfig::TokenizeString(string & str, string & option_name, pos = str.find('='); if (pos == string::npos) { cerr << "Error in TokenizeString(): " - << "line in the configuration file with no \"=\" sign." - << endl; + << "line in the configuration file with no \"=\" sign." << endl; cout << "Look for: " << str << endl; cout << "str.length() = " << str.length() << endl; throw(-1); } name_part = str.substr(0, pos); - value_part = str.substr(pos+1, string::npos); - //cout << "name_part = |" << name_part << "|" << endl; - //cout << "value_part = |" << value_part << "|" << endl; + value_part = str.substr(pos + 1, string::npos); + // cout << "name_part = |" << name_part << "|" << endl; + // cout << "value_part = |" << value_part << "|" << endl; // the first_part should consist of one string with no interior delimiters last_pos = name_part.find_first_not_of(delimiters, 0); pos = name_part.find_first_of(delimiters, last_pos); - if ( (name_part.length() == 0) || (last_pos == string::npos) ) { + if ((name_part.length() == 0) || (last_pos == string::npos)) { cerr << "Error in CConfig::TokenizeString(): " - << "line in the configuration file with no name before the \"=\" sign." - << endl; + << "line in the configuration file with no name before the \"=\" sign." << endl; throw(-1); } if (pos == string::npos) pos = name_part.length(); @@ -7621,14 +8328,13 @@ bool CConfig::TokenizeString(string & str, string & option_name, last_pos = name_part.find_first_not_of(delimiters, pos); if (last_pos != string::npos) { cerr << "Error in TokenizeString(): " - << "two or more options before an \"=\" sign in the configuration file." - << endl; + << "two or more options before an \"=\" sign in the configuration file." << endl; throw(-1); } StringToUpperCase(option_name); - //cout << "option_name = |" << option_name << "|" << endl; - //cout << "pos = " << pos << ": last_pos = " << last_pos << endl; + // cout << "option_name = |" << option_name << "|" << endl; + // cout << "pos = " << pos << ": last_pos = " << last_pos << endl; // now fill the option value vector option_value.clear(); @@ -7636,7 +8342,7 @@ bool CConfig::TokenizeString(string & str, string & option_name, // detect a raw string if (value_part[last_pos] == '\'' && value_part.back() == '\'') { - option_value.push_back(value_part.substr(last_pos+1, value_part.size()-last_pos-2)); + option_value.push_back(value_part.substr(last_pos + 1, value_part.size() - last_pos - 2)); return true; } @@ -7651,8 +8357,7 @@ bool CConfig::TokenizeString(string & str, string & option_name, } if (option_value.empty()) { cerr << "Error in TokenizeString(): " - << "option " << option_name << " in configuration file with no value assigned." - << endl; + << "option " << option_name << " in configuration file with no value assigned." << endl; throw(-1); } @@ -7675,7 +8380,7 @@ bool CConfig::TokenizeString(string & str, string & option_name, pos = it->find(';'); if (pos != string::npos) { string before_semi = it->substr(0, pos); - string after_semi= it->substr(pos+1, string::npos); + string after_semi = it->substr(pos + 1, string::npos); if (before_semi.empty()) { *it = ";"; it++; @@ -7685,14 +8390,13 @@ bool CConfig::TokenizeString(string & str, string & option_name, it++; vector to_insert; to_insert.emplace_back(";"); - if (!after_semi.empty()) - to_insert.push_back(after_semi); + if (!after_semi.empty()) to_insert.push_back(after_semi); option_value.insert(it, to_insert.begin(), to_insert.end()); } - it = option_value.begin(); // go back to beginning; not efficient + it = option_value.begin(); // go back to beginning; not efficient continue; - } it++; - + } + it++; } #if 0 cout << "option value(s) = "; @@ -7726,14 +8430,13 @@ bool CConfig::TokenizeString(string & str, string & option_name, } unsigned short CConfig::GetMarker_CfgFile_TagBound(const string& val_marker) const { - unsigned short iMarker_CfgFile; for (iMarker_CfgFile = 0; iMarker_CfgFile < nMarker_CfgFile; iMarker_CfgFile++) { - if (Marker_CfgFile_TagBound[iMarker_CfgFile] == val_marker) - return iMarker_CfgFile; + if (Marker_CfgFile_TagBound[iMarker_CfgFile] == val_marker) return iMarker_CfgFile; } - SU2_MPI::Error(string("The configuration file doesn't have any definition for marker ") + val_marker, CURRENT_FUNCTION); + SU2_MPI::Error(string("The configuration file doesn't have any definition for marker ") + val_marker, + CURRENT_FUNCTION); return 0; } @@ -7848,7 +8551,7 @@ unsigned short CConfig::GetMarker_CfgFile_Fluid_Load(const string& val_marker) c unsigned short CConfig::GetMarker_CfgFile_PyCustom(const string& val_marker) const { unsigned short iMarker_CfgFile; - for (iMarker_CfgFile=0; iMarker_CfgFile < nMarker_CfgFile; iMarker_CfgFile++) + for (iMarker_CfgFile = 0; iMarker_CfgFile < nMarker_CfgFile; iMarker_CfgFile++) if (Marker_CfgFile_TagBound[iMarker_CfgFile] == val_marker) break; return Marker_CfgFile_PyCustom[iMarker_CfgFile]; } @@ -7875,70 +8578,64 @@ unsigned short CConfig::GetMarker_CfgFile_SobolevBC(const string& val_marker) co } bool CConfig::GetViscous_Wall(unsigned short iMarker) const { - - return (Marker_All_KindBC[iMarker] == HEAT_FLUX || - Marker_All_KindBC[iMarker] == ISOTHERMAL || - Marker_All_KindBC[iMarker] == HEAT_TRANSFER || - Marker_All_KindBC[iMarker] == SMOLUCHOWSKI_MAXWELL || + return (Marker_All_KindBC[iMarker] == HEAT_FLUX || Marker_All_KindBC[iMarker] == ISOTHERMAL || + Marker_All_KindBC[iMarker] == HEAT_TRANSFER || Marker_All_KindBC[iMarker] == SMOLUCHOWSKI_MAXWELL || Marker_All_KindBC[iMarker] == CHT_WALL_INTERFACE); } bool CConfig::GetCatalytic_Wall(unsigned short iMarker) const { - bool catalytic = false; - for (unsigned short iMarker_Catalytic = 0; iMarker_Catalytic < nWall_Catalytic; iMarker_Catalytic++){ + for (unsigned short iMarker_Catalytic = 0; iMarker_Catalytic < nWall_Catalytic; iMarker_Catalytic++) { string Catalytic_Tag = Wall_Catalytic[iMarker_Catalytic]; - if (Catalytic_Tag == Marker_All_TagBound[iMarker]) { catalytic = true; break; } + if (Catalytic_Tag == Marker_All_TagBound[iMarker]) { + catalytic = true; + break; + } } return catalytic; } bool CConfig::GetSolid_Wall(unsigned short iMarker) const { - - return GetViscous_Wall(iMarker) || - Marker_All_KindBC[iMarker] == EULER_WALL; + return GetViscous_Wall(iMarker) || Marker_All_KindBC[iMarker] == EULER_WALL; } void CConfig::SetSurface_Movement(unsigned short iMarker, unsigned short kind_movement) { - auto* new_surface_movement = new unsigned short[nMarker_Moving + 1]; - auto* new_marker_moving = new string[nMarker_Moving+1]; + auto* new_marker_moving = new string[nMarker_Moving + 1]; - for (unsigned short iMarker_Moving = 0; iMarker_Moving < nMarker_Moving; iMarker_Moving++){ + for (unsigned short iMarker_Moving = 0; iMarker_Moving < nMarker_Moving; iMarker_Moving++) { new_surface_movement[iMarker_Moving] = Kind_SurfaceMovement[iMarker_Moving]; new_marker_moving[iMarker_Moving] = Marker_Moving[iMarker_Moving]; } - if (nKind_SurfaceMovement > 0){ - delete [] Marker_Moving; - delete [] Kind_SurfaceMovement; + if (nKind_SurfaceMovement > 0) { + delete[] Marker_Moving; + delete[] Kind_SurfaceMovement; } Kind_SurfaceMovement = new_surface_movement; - Marker_Moving = new_marker_moving; + Marker_Moving = new_marker_moving; Kind_SurfaceMovement[nMarker_Moving] = kind_movement; Marker_Moving[nMarker_Moving] = Marker_All_TagBound[iMarker]; nMarker_Moving++; nKind_SurfaceMovement++; - } CConfig::~CConfig() { - unsigned long iDV, iMarker; /*--- Delete all of the option objects in the global option map ---*/ - for(auto itr = option_map.begin(); itr != option_map.end(); itr++) { + for (auto itr = option_map.begin(); itr != option_map.end(); itr++) { delete itr->second; } - delete [] TimeDOFsADER_DG; - delete [] TimeIntegrationADER_DG; - delete [] WeightsIntegrationADER_DG; + delete[] TimeDOFsADER_DG; + delete[] TimeIntegrationADER_DG; + delete[] WeightsIntegrationADER_DG; /*--- Free memory for Aeroelastic problems. ---*/ @@ -8008,12 +8705,12 @@ CConfig::~CConfig() { if (DV_Value != nullptr) { for (iDV = 0; iDV < nDV; iDV++) delete[] DV_Value[iDV]; - delete [] DV_Value; + delete[] DV_Value; } if (ParamDV != nullptr) { for (iDV = 0; iDV < nDV; iDV++) delete[] ParamDV[iDV]; - delete [] ParamDV; + delete[] ParamDV; } delete[] Exhaust_Pressure; @@ -8104,15 +8801,13 @@ CConfig::~CConfig() { delete[] Surface_IDR; if (Riemann_FlowDir != nullptr) { - for (iMarker = 0; iMarker < nMarker_Riemann; iMarker++) - delete [] Riemann_FlowDir[iMarker]; - delete [] Riemann_FlowDir; + for (iMarker = 0; iMarker < nMarker_Riemann; iMarker++) delete[] Riemann_FlowDir[iMarker]; + delete[] Riemann_FlowDir; } if (Giles_FlowDir != nullptr) { - for (iMarker = 0; iMarker < nMarker_Giles; iMarker++) - delete [] Giles_FlowDir[iMarker]; - delete [] Giles_FlowDir; + for (iMarker = 0; iMarker < nMarker_Giles; iMarker++) delete[] Giles_FlowDir[iMarker]; + delete[] Giles_FlowDir; } delete[] PlaneTag; @@ -8120,30 +8815,29 @@ CConfig::~CConfig() { /*--- Delete some arrays needed just for initializing options. ---*/ - delete [] FFDTag; - delete [] nDV_Value; + delete[] FFDTag; + delete[] nDV_Value; - delete [] Kind_Data_Riemann; - delete [] Riemann_Var1; - delete [] Riemann_Var2; - delete [] Kind_Data_Giles; - delete [] Giles_Var1; - delete [] Giles_Var2; - delete [] RelaxFactorAverage; - delete [] RelaxFactorFourier; - delete [] nSpan_iZones; + delete[] Kind_Data_Riemann; + delete[] Riemann_Var1; + delete[] Riemann_Var2; + delete[] Kind_Data_Giles; + delete[] Giles_Var1; + delete[] Giles_Var2; + delete[] RelaxFactorAverage; + delete[] RelaxFactorFourier; + delete[] nSpan_iZones; - delete [] Marker_TurboBoundIn; - delete [] Marker_TurboBoundOut; - delete [] Marker_Riemann; - delete [] Marker_Giles; + delete[] Marker_TurboBoundIn; + delete[] Marker_TurboBoundOut; + delete[] Marker_Riemann; + delete[] Marker_Giles; - delete [] nBlades; - delete [] FreeStreamTurboNormal; + delete[] nBlades; + delete[] FreeStreamTurboNormal; } string CConfig::GetFilename(string filename, const string& ext, int timeIter) const { - /*--- Remove any extension --- */ unsigned short lastindex = filename.find_last_of('.'); @@ -8154,22 +8848,21 @@ string CConfig::GetFilename(string filename, const string& ext, int timeIter) co filename = filename + string(ext); /*--- Append the zone number if multizone problems ---*/ - if (Multizone_Problem) - filename = GetMultizone_FileName(filename, GetiZone(), ext); + if (Multizone_Problem) filename = GetMultizone_FileName(filename, GetiZone(), ext); /*--- Append the zone number if multiple instance problems ---*/ - if (GetnTimeInstances() > 1) - filename = GetMultiInstance_FileName(filename, GetiInst(), ext); + if (GetnTimeInstances() > 1) filename = GetMultiInstance_FileName(filename, GetiInst(), ext); /*--- Append the iteration number for unsteady problems ---*/ - if (GetTime_Domain()){ + if (GetTime_Domain()) { filename = GetUnsteady_FileName(filename, timeIter, ext); } return filename; } -string CConfig::GetFilename_Iter(const string& filename_iter, unsigned long curInnerIter, unsigned long curOuterIter) const { +string CConfig::GetFilename_Iter(const string& filename_iter, unsigned long curInnerIter, + unsigned long curOuterIter) const { const auto iter = GetMultizone_Problem() ? curOuterIter : curInnerIter; std::stringstream iter_ss; iter_ss << filename_iter << "_" << std::setw(6) << std::setfill('0') << iter; @@ -8177,7 +8870,6 @@ string CConfig::GetFilename_Iter(const string& filename_iter, unsigned long curI } string CConfig::GetUnsteady_FileName(string val_filename, int val_iter, const string& ext) const { - string UnstExt, UnstFilename = std::move(val_filename); char buffer[50]; @@ -8193,12 +8885,11 @@ string CConfig::GetUnsteady_FileName(string val_filename, int val_iter, const st /*--- Append iteration number for unsteady cases ---*/ if (Time_Domain) { - - if ((val_iter >= 0) && (val_iter < 10)) SPRINTF (buffer, "_0000%d", val_iter); - if ((val_iter >= 10) && (val_iter < 100)) SPRINTF (buffer, "_000%d", val_iter); - if ((val_iter >= 100) && (val_iter < 1000)) SPRINTF (buffer, "_00%d", val_iter); - if ((val_iter >= 1000) && (val_iter < 10000)) SPRINTF (buffer, "_0%d", val_iter); - if (val_iter >= 10000) SPRINTF (buffer, "_%d", val_iter); + if ((val_iter >= 0) && (val_iter < 10)) SPRINTF(buffer, "_0000%d", val_iter); + if ((val_iter >= 10) && (val_iter < 100)) SPRINTF(buffer, "_000%d", val_iter); + if ((val_iter >= 100) && (val_iter < 1000)) SPRINTF(buffer, "_00%d", val_iter); + if ((val_iter >= 1000) && (val_iter < 10000)) SPRINTF(buffer, "_0%d", val_iter); + if (val_iter >= 10000) SPRINTF(buffer, "_%d", val_iter); UnstExt = string(buffer); } UnstExt += ext; @@ -8208,152 +8899,234 @@ string CConfig::GetUnsteady_FileName(string val_filename, int val_iter, const st } string CConfig::GetMultizone_FileName(string val_filename, int val_iZone, const string& ext) const { + string multizone_filename = std::move(val_filename); + char buffer[50]; - string multizone_filename = std::move(val_filename); - char buffer[50]; - - unsigned short lastindex = multizone_filename.find_last_of('.'); - multizone_filename = multizone_filename.substr(0, lastindex); + unsigned short lastindex = multizone_filename.find_last_of('.'); + multizone_filename = multizone_filename.substr(0, lastindex); - if (Multizone_Problem) { - SPRINTF (buffer, "_%d", SU2_TYPE::Int(val_iZone)); - multizone_filename.append(string(buffer)); - } + if (Multizone_Problem) { + SPRINTF(buffer, "_%d", SU2_TYPE::Int(val_iZone)); + multizone_filename.append(string(buffer)); + } - multizone_filename += ext; - return multizone_filename; + multizone_filename += ext; + return multizone_filename; } string CConfig::GetMultizone_HistoryFileName(string val_filename, int val_iZone, const string& ext) const { - - string multizone_filename = std::move(val_filename); - char buffer[50]; - unsigned short lastindex = multizone_filename.find_last_of('.'); - multizone_filename = multizone_filename.substr(0, lastindex); - if (Multizone_Problem) { - SPRINTF (buffer, "_%d", SU2_TYPE::Int(val_iZone)); - multizone_filename.append(string(buffer)); - } - multizone_filename += ext; - return multizone_filename; + string multizone_filename = std::move(val_filename); + char buffer[50]; + unsigned short lastindex = multizone_filename.find_last_of('.'); + multizone_filename = multizone_filename.substr(0, lastindex); + if (Multizone_Problem) { + SPRINTF(buffer, "_%d", SU2_TYPE::Int(val_iZone)); + multizone_filename.append(string(buffer)); + } + multizone_filename += ext; + return multizone_filename; } string CConfig::GetMultiInstance_FileName(string val_filename, int val_iInst, const string& ext) const { - string multizone_filename = std::move(val_filename); char buffer[50]; unsigned short lastindex = multizone_filename.find_last_of('.'); multizone_filename = multizone_filename.substr(0, lastindex); - SPRINTF (buffer, "_%d", SU2_TYPE::Int(val_iInst)); + SPRINTF(buffer, "_%d", SU2_TYPE::Int(val_iInst)); multizone_filename.append(string(buffer)); multizone_filename += ext; return multizone_filename; } string CConfig::GetMultiInstance_HistoryFileName(string val_filename, int val_iInst) const { - string multizone_filename = std::move(val_filename); char buffer[50]; unsigned short lastindex = multizone_filename.find_last_of('.'); multizone_filename = multizone_filename.substr(0, lastindex); - SPRINTF (buffer, "_%d", SU2_TYPE::Int(val_iInst)); + SPRINTF(buffer, "_%d", SU2_TYPE::Int(val_iInst)); multizone_filename.append(string(buffer)); return multizone_filename; } string CConfig::GetObjFunc_Extension(string val_filename) const { - string AdjExt, Filename = std::move(val_filename); if (ContinuousAdjoint || DiscreteAdjoint) { - /*--- Remove filename extension (.dat) ---*/ unsigned short lastindex = Filename.find_last_of('.'); Filename = Filename.substr(0, lastindex); - if (nObj==1) { + if (nObj == 1) { switch (Kind_ObjFunc[0]) { - case DRAG_COEFFICIENT: AdjExt = "_cd"; break; - case LIFT_COEFFICIENT: AdjExt = "_cl"; break; - case SIDEFORCE_COEFFICIENT: AdjExt = "_csf"; break; - case INVERSE_DESIGN_PRESSURE: AdjExt = "_invpress"; break; - case INVERSE_DESIGN_HEATFLUX: AdjExt = "_invheat"; break; - case MOMENT_X_COEFFICIENT: AdjExt = "_cmx"; break; - case MOMENT_Y_COEFFICIENT: AdjExt = "_cmy"; break; - case MOMENT_Z_COEFFICIENT: AdjExt = "_cmz"; break; - case EFFICIENCY: AdjExt = "_eff"; break; - case EQUIVALENT_AREA: AdjExt = "_ea"; break; - case NEARFIELD_PRESSURE: AdjExt = "_nfp"; break; - case FORCE_X_COEFFICIENT: AdjExt = "_cfx"; break; - case FORCE_Y_COEFFICIENT: AdjExt = "_cfy"; break; - case FORCE_Z_COEFFICIENT: AdjExt = "_cfz"; break; - case THRUST_COEFFICIENT: AdjExt = "_ct"; break; - case TORQUE_COEFFICIENT: AdjExt = "_cq"; break; - case TOTAL_HEATFLUX: AdjExt = "_totheat"; break; - case MAXIMUM_HEATFLUX: AdjExt = "_maxheat"; break; - case AVG_TEMPERATURE: AdjExt = "_avtp"; break; - case FIGURE_OF_MERIT: AdjExt = "_merit"; break; - case BUFFET_SENSOR: AdjExt = "_buffet"; break; - case SURFACE_TOTAL_PRESSURE: AdjExt = "_pt"; break; - case SURFACE_STATIC_PRESSURE: AdjExt = "_pe"; break; - case SURFACE_STATIC_TEMPERATURE: AdjExt = "_T"; break; - case SURFACE_MASSFLOW: AdjExt = "_mfr"; break; - case SURFACE_UNIFORMITY: AdjExt = "_uniform"; break; - case SURFACE_SECONDARY: AdjExt = "_second"; break; - case SURFACE_MOM_DISTORTION: AdjExt = "_distort"; break; - case SURFACE_SECOND_OVER_UNIFORM: AdjExt = "_sou"; break; - case SURFACE_PRESSURE_DROP: AdjExt = "_dp"; break; - case SURFACE_SPECIES_0: AdjExt = "_avgspec0"; break; - case SURFACE_SPECIES_VARIANCE: AdjExt = "_specvar"; break; - case SURFACE_MACH: AdjExt = "_mach"; break; - case CUSTOM_OBJFUNC: AdjExt = "_custom"; break; - case REFERENCE_GEOMETRY: AdjExt = "_refgeom"; break; - case REFERENCE_NODE: AdjExt = "_refnode"; break; - case VOLUME_FRACTION: AdjExt = "_volfrac"; break; - case TOPOL_DISCRETENESS: AdjExt = "_topdisc"; break; - case TOPOL_COMPLIANCE: AdjExt = "_topcomp"; break; - case STRESS_PENALTY: AdjExt = "_stress"; break; + case DRAG_COEFFICIENT: + AdjExt = "_cd"; + break; + case LIFT_COEFFICIENT: + AdjExt = "_cl"; + break; + case SIDEFORCE_COEFFICIENT: + AdjExt = "_csf"; + break; + case INVERSE_DESIGN_PRESSURE: + AdjExt = "_invpress"; + break; + case INVERSE_DESIGN_HEATFLUX: + AdjExt = "_invheat"; + break; + case MOMENT_X_COEFFICIENT: + AdjExt = "_cmx"; + break; + case MOMENT_Y_COEFFICIENT: + AdjExt = "_cmy"; + break; + case MOMENT_Z_COEFFICIENT: + AdjExt = "_cmz"; + break; + case EFFICIENCY: + AdjExt = "_eff"; + break; + case EQUIVALENT_AREA: + AdjExt = "_ea"; + break; + case NEARFIELD_PRESSURE: + AdjExt = "_nfp"; + break; + case FORCE_X_COEFFICIENT: + AdjExt = "_cfx"; + break; + case FORCE_Y_COEFFICIENT: + AdjExt = "_cfy"; + break; + case FORCE_Z_COEFFICIENT: + AdjExt = "_cfz"; + break; + case THRUST_COEFFICIENT: + AdjExt = "_ct"; + break; + case TORQUE_COEFFICIENT: + AdjExt = "_cq"; + break; + case TOTAL_HEATFLUX: + AdjExt = "_totheat"; + break; + case MAXIMUM_HEATFLUX: + AdjExt = "_maxheat"; + break; + case AVG_TEMPERATURE: + AdjExt = "_avtp"; + break; + case FIGURE_OF_MERIT: + AdjExt = "_merit"; + break; + case BUFFET_SENSOR: + AdjExt = "_buffet"; + break; + case SURFACE_TOTAL_PRESSURE: + AdjExt = "_pt"; + break; + case SURFACE_STATIC_PRESSURE: + AdjExt = "_pe"; + break; + case SURFACE_STATIC_TEMPERATURE: + AdjExt = "_T"; + break; + case SURFACE_MASSFLOW: + AdjExt = "_mfr"; + break; + case SURFACE_UNIFORMITY: + AdjExt = "_uniform"; + break; + case SURFACE_SECONDARY: + AdjExt = "_second"; + break; + case SURFACE_MOM_DISTORTION: + AdjExt = "_distort"; + break; + case SURFACE_SECOND_OVER_UNIFORM: + AdjExt = "_sou"; + break; + case SURFACE_PRESSURE_DROP: + AdjExt = "_dp"; + break; + case SURFACE_SPECIES_0: + AdjExt = "_avgspec0"; + break; + case SURFACE_SPECIES_VARIANCE: + AdjExt = "_specvar"; + break; + case SURFACE_MACH: + AdjExt = "_mach"; + break; + case CUSTOM_OBJFUNC: + AdjExt = "_custom"; + break; + case REFERENCE_GEOMETRY: + AdjExt = "_refgeom"; + break; + case REFERENCE_NODE: + AdjExt = "_refnode"; + break; + case VOLUME_FRACTION: + AdjExt = "_volfrac"; + break; + case TOPOL_DISCRETENESS: + AdjExt = "_topdisc"; + break; + case TOPOL_COMPLIANCE: + AdjExt = "_topcomp"; + break; + case STRESS_PENALTY: + AdjExt = "_stress"; + break; } - } - else{ + } else { AdjExt = "_combo"; } Filename.append(AdjExt); /*--- Lastly, add the .dat extension ---*/ Filename.append(".dat"); - } return Filename; } unsigned short CConfig::GetContainerPosition(unsigned short val_eqsystem) { - switch (val_eqsystem) { - case RUNTIME_FLOW_SYS: return FLOW_SOL; - case RUNTIME_TURB_SYS: return TURB_SOL; - case RUNTIME_TRANS_SYS: return TRANS_SOL; - case RUNTIME_SPECIES_SYS: return SPECIES_SOL; - case RUNTIME_HEAT_SYS: return HEAT_SOL; - case RUNTIME_FEA_SYS: return FEA_SOL; - case RUNTIME_ADJFLOW_SYS: return ADJFLOW_SOL; - case RUNTIME_ADJTURB_SYS: return ADJTURB_SOL; - case RUNTIME_ADJSPECIES_SYS:return ADJSPECIES_SOL; - case RUNTIME_ADJFEA_SYS: return ADJFEA_SOL; - case RUNTIME_RADIATION_SYS: return RAD_SOL; - case RUNTIME_MULTIGRID_SYS: return 0; + case RUNTIME_FLOW_SYS: + return FLOW_SOL; + case RUNTIME_TURB_SYS: + return TURB_SOL; + case RUNTIME_TRANS_SYS: + return TRANS_SOL; + case RUNTIME_SPECIES_SYS: + return SPECIES_SOL; + case RUNTIME_HEAT_SYS: + return HEAT_SOL; + case RUNTIME_FEA_SYS: + return FEA_SOL; + case RUNTIME_ADJFLOW_SYS: + return ADJFLOW_SOL; + case RUNTIME_ADJTURB_SYS: + return ADJTURB_SOL; + case RUNTIME_ADJSPECIES_SYS: + return ADJSPECIES_SOL; + case RUNTIME_ADJFEA_SYS: + return ADJFEA_SOL; + case RUNTIME_RADIATION_SYS: + return RAD_SOL; + case RUNTIME_MULTIGRID_SYS: + return 0; } return 0; } -void CConfig::SetKind_ConvNumScheme(unsigned short val_kind_convnumscheme, - CENTERED val_kind_centered, UPWIND val_kind_upwind, - LIMITER val_kind_slopelimit, bool val_muscl, +void CConfig::SetKind_ConvNumScheme(unsigned short val_kind_convnumscheme, CENTERED val_kind_centered, + UPWIND val_kind_upwind, LIMITER val_kind_slopelimit, bool val_muscl, unsigned short val_kind_fem) { Kind_ConvNumScheme = val_kind_convnumscheme; Kind_Centered = val_kind_centered; @@ -8361,23 +9134,19 @@ void CConfig::SetKind_ConvNumScheme(unsigned short val_kind_convnumscheme, Kind_FEM = val_kind_fem; Kind_SlopeLimit = val_kind_slopelimit; MUSCL = val_muscl; - } -void CConfig::SetGlobalParam(MAIN_SOLVER val_solver, - unsigned short val_system) { - +void CConfig::SetGlobalParam(MAIN_SOLVER val_solver, unsigned short val_system) { /*--- Set the simulation global time ---*/ - Current_UnstTime = static_cast(TimeIter)*Delta_UnstTime; - Current_UnstTimeND = static_cast(TimeIter)*Delta_UnstTimeND; + Current_UnstTime = static_cast(TimeIter) * Delta_UnstTime; + Current_UnstTimeND = static_cast(TimeIter) * Delta_UnstTimeND; /*--- Set the solver methods ---*/ auto SetFlowParam = [&]() { if (val_system == RUNTIME_FLOW_SYS) { - SetKind_ConvNumScheme(Kind_ConvNumScheme_Flow, Kind_Centered_Flow, - Kind_Upwind_Flow, Kind_SlopeLimit_Flow, + SetKind_ConvNumScheme(Kind_ConvNumScheme_Flow, Kind_Centered_Flow, Kind_Upwind_Flow, Kind_SlopeLimit_Flow, MUSCL_Flow, NONE); SetKind_TimeIntScheme(Kind_TimeIntScheme_Flow); } @@ -8385,8 +9154,7 @@ void CConfig::SetGlobalParam(MAIN_SOLVER val_solver, auto SetTurbParam = [&]() { if (val_system == RUNTIME_TURB_SYS) { - SetKind_ConvNumScheme(Kind_ConvNumScheme_Turb, Kind_Centered_Turb, - Kind_Upwind_Turb, Kind_SlopeLimit_Turb, + SetKind_ConvNumScheme(Kind_ConvNumScheme_Turb, Kind_Centered_Turb, Kind_Upwind_Turb, Kind_SlopeLimit_Turb, MUSCL_Turb, NONE); SetKind_TimeIntScheme(Kind_TimeIntScheme_Turb); } @@ -8394,51 +9162,56 @@ void CConfig::SetGlobalParam(MAIN_SOLVER val_solver, auto SetHeatParam = [&]() { if (val_system == RUNTIME_HEAT_SYS) { - SetKind_ConvNumScheme(Kind_ConvNumScheme_Heat, Kind_Centered_Heat, - Kind_Upwind_Heat, Kind_SlopeLimit_Heat, MUSCL_Heat, NONE); + SetKind_ConvNumScheme(Kind_ConvNumScheme_Heat, Kind_Centered_Heat, Kind_Upwind_Heat, Kind_SlopeLimit_Heat, + MUSCL_Heat, NONE); SetKind_TimeIntScheme(Kind_TimeIntScheme_Heat); } }; auto SetSpeciesParam = [&]() { if (val_system == RUNTIME_SPECIES_SYS) { - SetKind_ConvNumScheme(Kind_ConvNumScheme_Species, Kind_Centered_Species, - Kind_Upwind_Species, Kind_SlopeLimit_Species, - MUSCL_Species, NONE); + SetKind_ConvNumScheme(Kind_ConvNumScheme_Species, Kind_Centered_Species, Kind_Upwind_Species, + Kind_SlopeLimit_Species, MUSCL_Species, NONE); SetKind_TimeIntScheme(Kind_TimeIntScheme_Species); } }; auto SetAdjFlowParam = [&]() { if (val_system == RUNTIME_ADJFLOW_SYS) { - SetKind_ConvNumScheme(Kind_ConvNumScheme_AdjFlow, Kind_Centered_AdjFlow, - Kind_Upwind_AdjFlow, Kind_SlopeLimit_AdjFlow, - MUSCL_AdjFlow, NONE); + SetKind_ConvNumScheme(Kind_ConvNumScheme_AdjFlow, Kind_Centered_AdjFlow, Kind_Upwind_AdjFlow, + Kind_SlopeLimit_AdjFlow, MUSCL_AdjFlow, NONE); SetKind_TimeIntScheme(Kind_TimeIntScheme_AdjFlow); } }; switch (val_solver) { - case MAIN_SOLVER::EULER: case MAIN_SOLVER::INC_EULER: case MAIN_SOLVER::NEMO_EULER: - case MAIN_SOLVER::DISC_ADJ_EULER: case MAIN_SOLVER::DISC_ADJ_INC_EULER: + case MAIN_SOLVER::EULER: + case MAIN_SOLVER::INC_EULER: + case MAIN_SOLVER::NEMO_EULER: + case MAIN_SOLVER::DISC_ADJ_EULER: + case MAIN_SOLVER::DISC_ADJ_INC_EULER: SetFlowParam(); break; - case MAIN_SOLVER::NAVIER_STOKES: case MAIN_SOLVER::INC_NAVIER_STOKES: case MAIN_SOLVER::NEMO_NAVIER_STOKES: - case MAIN_SOLVER::DISC_ADJ_NAVIER_STOKES: case MAIN_SOLVER::DISC_ADJ_INC_NAVIER_STOKES: + case MAIN_SOLVER::NAVIER_STOKES: + case MAIN_SOLVER::INC_NAVIER_STOKES: + case MAIN_SOLVER::NEMO_NAVIER_STOKES: + case MAIN_SOLVER::DISC_ADJ_NAVIER_STOKES: + case MAIN_SOLVER::DISC_ADJ_INC_NAVIER_STOKES: SetFlowParam(); SetSpeciesParam(); SetHeatParam(); break; - case MAIN_SOLVER::RANS: case MAIN_SOLVER::INC_RANS: - case MAIN_SOLVER::DISC_ADJ_RANS: case MAIN_SOLVER::DISC_ADJ_INC_RANS: + case MAIN_SOLVER::RANS: + case MAIN_SOLVER::INC_RANS: + case MAIN_SOLVER::DISC_ADJ_RANS: + case MAIN_SOLVER::DISC_ADJ_INC_RANS: SetFlowParam(); SetTurbParam(); SetSpeciesParam(); SetHeatParam(); if (val_system == RUNTIME_TRANS_SYS) { - SetKind_ConvNumScheme(Kind_ConvNumScheme_Turb, Kind_Centered_Turb, - Kind_Upwind_Turb, Kind_SlopeLimit_Turb, + SetKind_ConvNumScheme(Kind_ConvNumScheme_Turb, Kind_Centered_Turb, Kind_Upwind_Turb, Kind_SlopeLimit_Turb, MUSCL_Turb, NONE); SetKind_TimeIntScheme(Kind_TimeIntScheme_Turb); } @@ -8451,8 +9224,7 @@ void CConfig::SetGlobalParam(MAIN_SOLVER val_solver, case MAIN_SOLVER::DISC_ADJ_FEM_NS: case MAIN_SOLVER::DISC_ADJ_FEM_RANS: if (val_system == RUNTIME_FLOW_SYS) { - SetKind_ConvNumScheme(Kind_ConvNumScheme_FEM_Flow, Kind_Centered_Flow, - Kind_Upwind_Flow, Kind_SlopeLimit_Flow, + SetKind_ConvNumScheme(Kind_ConvNumScheme_FEM_Flow, Kind_Centered_Flow, Kind_Upwind_Flow, Kind_SlopeLimit_Flow, MUSCL_Flow, Kind_FEM_Flow); SetKind_TimeIntScheme(Kind_TimeIntScheme_FEM_Flow); } @@ -8468,9 +9240,8 @@ void CConfig::SetGlobalParam(MAIN_SOLVER val_solver, SetAdjFlowParam(); if (val_system == RUNTIME_ADJTURB_SYS) { - SetKind_ConvNumScheme(Kind_ConvNumScheme_AdjTurb, Kind_Centered_AdjTurb, - Kind_Upwind_AdjTurb, Kind_SlopeLimit_AdjTurb, - MUSCL_AdjTurb, NONE); + SetKind_ConvNumScheme(Kind_ConvNumScheme_AdjTurb, Kind_Centered_AdjTurb, Kind_Upwind_AdjTurb, + Kind_SlopeLimit_AdjTurb, MUSCL_AdjTurb, NONE); SetKind_TimeIntScheme(Kind_TimeIntScheme_AdjTurb); } break; @@ -8537,113 +9308,115 @@ unsigned short CConfig::GetMarker_Periodic_Donor(const string& val_marker) const su2double CConfig::GetActDisk_NetThrust(const string& val_marker) const { unsigned short iMarker_ActDisk; for (iMarker_ActDisk = 0; iMarker_ActDisk < nMarker_ActDiskInlet; iMarker_ActDisk++) - if ((Marker_ActDiskInlet[iMarker_ActDisk] == val_marker) || - (Marker_ActDiskOutlet[iMarker_ActDisk] == val_marker)) break; + if ((Marker_ActDiskInlet[iMarker_ActDisk] == val_marker) || (Marker_ActDiskOutlet[iMarker_ActDisk] == val_marker)) + break; return ActDisk_NetThrust[iMarker_ActDisk]; } su2double CConfig::GetActDisk_Power(const string& val_marker) const { unsigned short iMarker_ActDisk; for (iMarker_ActDisk = 0; iMarker_ActDisk < nMarker_ActDiskInlet; iMarker_ActDisk++) - if ((Marker_ActDiskInlet[iMarker_ActDisk] == val_marker) || - (Marker_ActDiskOutlet[iMarker_ActDisk] == val_marker)) break; + if ((Marker_ActDiskInlet[iMarker_ActDisk] == val_marker) || (Marker_ActDiskOutlet[iMarker_ActDisk] == val_marker)) + break; return ActDisk_Power[iMarker_ActDisk]; } su2double CConfig::GetActDisk_MassFlow(const string& val_marker) const { unsigned short iMarker_ActDisk; for (iMarker_ActDisk = 0; iMarker_ActDisk < nMarker_ActDiskInlet; iMarker_ActDisk++) - if ((Marker_ActDiskInlet[iMarker_ActDisk] == val_marker) || - (Marker_ActDiskOutlet[iMarker_ActDisk] == val_marker)) break; + if ((Marker_ActDiskInlet[iMarker_ActDisk] == val_marker) || (Marker_ActDiskOutlet[iMarker_ActDisk] == val_marker)) + break; return ActDisk_MassFlow[iMarker_ActDisk]; } su2double CConfig::GetActDisk_Mach(const string& val_marker) const { unsigned short iMarker_ActDisk; for (iMarker_ActDisk = 0; iMarker_ActDisk < nMarker_ActDiskInlet; iMarker_ActDisk++) - if ((Marker_ActDiskInlet[iMarker_ActDisk] == val_marker) || - (Marker_ActDiskOutlet[iMarker_ActDisk] == val_marker)) break; + if ((Marker_ActDiskInlet[iMarker_ActDisk] == val_marker) || (Marker_ActDiskOutlet[iMarker_ActDisk] == val_marker)) + break; return ActDisk_Mach[iMarker_ActDisk]; } su2double CConfig::GetActDisk_Force(const string& val_marker) const { unsigned short iMarker_ActDisk; for (iMarker_ActDisk = 0; iMarker_ActDisk < nMarker_ActDiskInlet; iMarker_ActDisk++) - if ((Marker_ActDiskInlet[iMarker_ActDisk] == val_marker) || - (Marker_ActDiskOutlet[iMarker_ActDisk] == val_marker)) break; + if ((Marker_ActDiskInlet[iMarker_ActDisk] == val_marker) || (Marker_ActDiskOutlet[iMarker_ActDisk] == val_marker)) + break; return ActDisk_Force[iMarker_ActDisk]; } su2double CConfig::GetActDisk_BCThrust(const string& val_marker) const { unsigned short iMarker_ActDisk; for (iMarker_ActDisk = 0; iMarker_ActDisk < nMarker_ActDiskInlet; iMarker_ActDisk++) - if ((Marker_ActDiskInlet[iMarker_ActDisk] == val_marker) || - (Marker_ActDiskOutlet[iMarker_ActDisk] == val_marker)) break; + if ((Marker_ActDiskInlet[iMarker_ActDisk] == val_marker) || (Marker_ActDiskOutlet[iMarker_ActDisk] == val_marker)) + break; return ActDisk_BCThrust[iMarker_ActDisk]; } su2double CConfig::GetActDisk_BCThrust_Old(const string& val_marker) const { unsigned short iMarker_ActDisk; for (iMarker_ActDisk = 0; iMarker_ActDisk < nMarker_ActDiskInlet; iMarker_ActDisk++) - if ((Marker_ActDiskInlet[iMarker_ActDisk] == val_marker) || - (Marker_ActDiskOutlet[iMarker_ActDisk] == val_marker)) break; + if ((Marker_ActDiskInlet[iMarker_ActDisk] == val_marker) || (Marker_ActDiskOutlet[iMarker_ActDisk] == val_marker)) + break; return ActDisk_BCThrust_Old[iMarker_ActDisk]; } void CConfig::SetActDisk_BCThrust(const string& val_marker, su2double val_actdisk_bcthrust) { unsigned short iMarker_ActDisk; for (iMarker_ActDisk = 0; iMarker_ActDisk < nMarker_ActDiskInlet; iMarker_ActDisk++) - if ((Marker_ActDiskInlet[iMarker_ActDisk] == val_marker) || - (Marker_ActDiskOutlet[iMarker_ActDisk] == val_marker)) break; + if ((Marker_ActDiskInlet[iMarker_ActDisk] == val_marker) || (Marker_ActDiskOutlet[iMarker_ActDisk] == val_marker)) + break; ActDisk_BCThrust[iMarker_ActDisk] = val_actdisk_bcthrust; } void CConfig::SetActDisk_BCThrust_Old(const string& val_marker, su2double val_actdisk_bcthrust_old) { unsigned short iMarker_ActDisk; for (iMarker_ActDisk = 0; iMarker_ActDisk < nMarker_ActDiskInlet; iMarker_ActDisk++) - if ((Marker_ActDiskInlet[iMarker_ActDisk] == val_marker) || - (Marker_ActDiskOutlet[iMarker_ActDisk] == val_marker)) break; + if ((Marker_ActDiskInlet[iMarker_ActDisk] == val_marker) || (Marker_ActDiskOutlet[iMarker_ActDisk] == val_marker)) + break; ActDisk_BCThrust_Old[iMarker_ActDisk] = val_actdisk_bcthrust_old; } su2double CConfig::GetActDisk_Area(const string& val_marker) const { unsigned short iMarker_ActDisk; for (iMarker_ActDisk = 0; iMarker_ActDisk < nMarker_ActDiskInlet; iMarker_ActDisk++) - if ((Marker_ActDiskInlet[iMarker_ActDisk] == val_marker) || - (Marker_ActDiskOutlet[iMarker_ActDisk] == val_marker)) break; + if ((Marker_ActDiskInlet[iMarker_ActDisk] == val_marker) || (Marker_ActDiskOutlet[iMarker_ActDisk] == val_marker)) + break; return ActDisk_Area[iMarker_ActDisk]; } su2double CConfig::GetActDisk_ReverseMassFlow(const string& val_marker) const { unsigned short iMarker_ActDisk; for (iMarker_ActDisk = 0; iMarker_ActDisk < nMarker_ActDiskInlet; iMarker_ActDisk++) - if ((Marker_ActDiskInlet[iMarker_ActDisk] == val_marker) || - (Marker_ActDiskOutlet[iMarker_ActDisk] == val_marker)) break; + if ((Marker_ActDiskInlet[iMarker_ActDisk] == val_marker) || (Marker_ActDiskOutlet[iMarker_ActDisk] == val_marker)) + break; return ActDisk_ReverseMassFlow[iMarker_ActDisk]; } su2double CConfig::GetActDisk_PressJump(const string& val_marker, unsigned short val_value) const { unsigned short iMarker_ActDisk; for (iMarker_ActDisk = 0; iMarker_ActDisk < nMarker_ActDiskInlet; iMarker_ActDisk++) - if ((Marker_ActDiskInlet[iMarker_ActDisk] == val_marker) || - (Marker_ActDiskOutlet[iMarker_ActDisk] == val_marker)) break; + if ((Marker_ActDiskInlet[iMarker_ActDisk] == val_marker) || (Marker_ActDiskOutlet[iMarker_ActDisk] == val_marker)) + break; return ActDisk_PressJump[iMarker_ActDisk][val_value]; } su2double CConfig::GetActDisk_TempJump(const string& val_marker, unsigned short val_value) const { unsigned short iMarker_ActDisk; for (iMarker_ActDisk = 0; iMarker_ActDisk < nMarker_ActDiskInlet; iMarker_ActDisk++) - if ((Marker_ActDiskInlet[iMarker_ActDisk] == val_marker) || - (Marker_ActDiskOutlet[iMarker_ActDisk] == val_marker)) break; - return ActDisk_TempJump[iMarker_ActDisk][val_value];; + if ((Marker_ActDiskInlet[iMarker_ActDisk] == val_marker) || (Marker_ActDiskOutlet[iMarker_ActDisk] == val_marker)) + break; + return ActDisk_TempJump[iMarker_ActDisk][val_value]; + ; } su2double CConfig::GetActDisk_Omega(const string& val_marker, unsigned short val_value) const { unsigned short iMarker_ActDisk; for (iMarker_ActDisk = 0; iMarker_ActDisk < nMarker_ActDiskInlet; iMarker_ActDisk++) - if ((Marker_ActDiskInlet[iMarker_ActDisk] == val_marker) || - (Marker_ActDiskOutlet[iMarker_ActDisk] == val_marker)) break; - return ActDisk_Omega[iMarker_ActDisk][val_value];; + if ((Marker_ActDiskInlet[iMarker_ActDisk] == val_marker) || (Marker_ActDiskOutlet[iMarker_ActDisk] == val_marker)) + break; + return ActDisk_Omega[iMarker_ActDisk][val_value]; + ; } su2double CConfig::GetOutlet_MassFlow(const string& val_marker) const { @@ -8702,24 +9475,21 @@ unsigned short CConfig::GetMarker_CfgFile_EngineExhaust(const string& val_marker bool CConfig::GetVolumetric_Movement() const { bool volumetric_movement = false; - if (GetSurface_Movement(AEROELASTIC) || - GetSurface_Movement(AEROELASTIC_RIGID_MOTION)|| - GetSurface_Movement(EXTERNAL) || - GetSurface_Movement(EXTERNAL_ROTATION)){ + if (GetSurface_Movement(AEROELASTIC) || GetSurface_Movement(AEROELASTIC_RIGID_MOTION) || + GetSurface_Movement(EXTERNAL) || GetSurface_Movement(EXTERNAL_ROTATION)) { volumetric_movement = true; } - if (Kind_SU2 == SU2_COMPONENT::SU2_DEF || - Kind_SU2 == SU2_COMPONENT::SU2_DOT || - DirectDiff) - { volumetric_movement = true;} + if (Kind_SU2 == SU2_COMPONENT::SU2_DEF || Kind_SU2 == SU2_COMPONENT::SU2_DOT || DirectDiff) { + volumetric_movement = true; + } return volumetric_movement; } bool CConfig::GetSurface_Movement(unsigned short kind_movement) const { - for (unsigned short iMarkerMoving = 0; iMarkerMoving < nKind_SurfaceMovement; iMarkerMoving++){ - if (Kind_SurfaceMovement[iMarkerMoving] == kind_movement){ + for (unsigned short iMarkerMoving = 0; iMarkerMoving < nKind_SurfaceMovement; iMarkerMoving++) { + if (Kind_SurfaceMovement[iMarkerMoving] == kind_movement) { return true; } } @@ -8821,8 +9591,7 @@ su2double CConfig::GetInlet_Ptotal(const string& val_marker) const { void CConfig::SetInlet_Ptotal(su2double val_pressure, const string& val_marker) { unsigned short iMarker_Inlet; for (iMarker_Inlet = 0; iMarker_Inlet < nMarker_Inlet; iMarker_Inlet++) - if (Marker_Inlet[iMarker_Inlet] == val_marker) - Inlet_Ptotal[iMarker_Inlet] = val_pressure; + if (Marker_Inlet[iMarker_Inlet] == val_marker) Inlet_Ptotal[iMarker_Inlet] = val_pressure; } const su2double* CConfig::GetInlet_FlowDir(const string& val_marker) const { @@ -8881,8 +9650,7 @@ su2double CConfig::GetOutlet_Pressure(const string& val_marker) const { void CConfig::SetOutlet_Pressure(su2double val_pressure, const string& val_marker) { unsigned short iMarker_Outlet; for (iMarker_Outlet = 0; iMarker_Outlet < nMarker_Outlet; iMarker_Outlet++) - if (Marker_Outlet[iMarker_Outlet] == val_marker) - Outlet_Pressure[iMarker_Outlet] = val_pressure; + if (Marker_Outlet[iMarker_Outlet] == val_marker) Outlet_Pressure[iMarker_Outlet] = val_pressure; } su2double CConfig::GetRiemann_Var1(const string& val_marker) const { @@ -8965,29 +9733,31 @@ unsigned short CConfig::GetKind_Data_Giles(const string& val_marker) const { su2double CConfig::GetPressureOut_BC() const { unsigned short iMarker_BC; su2double pres_out = 0.0; - for (iMarker_BC = 0; iMarker_BC < nMarker_Giles; iMarker_BC++){ - if (Kind_Data_Giles[iMarker_BC] == STATIC_PRESSURE || Kind_Data_Giles[iMarker_BC] == STATIC_PRESSURE_1D || Kind_Data_Giles[iMarker_BC] == RADIAL_EQUILIBRIUM ){ + for (iMarker_BC = 0; iMarker_BC < nMarker_Giles; iMarker_BC++) { + if (Kind_Data_Giles[iMarker_BC] == STATIC_PRESSURE || Kind_Data_Giles[iMarker_BC] == STATIC_PRESSURE_1D || + Kind_Data_Giles[iMarker_BC] == RADIAL_EQUILIBRIUM) { pres_out = Giles_Var1[iMarker_BC]; } } - for (iMarker_BC = 0; iMarker_BC < nMarker_Riemann; iMarker_BC++){ - if (Kind_Data_Riemann[iMarker_BC] == STATIC_PRESSURE || Kind_Data_Riemann[iMarker_BC] == RADIAL_EQUILIBRIUM){ + for (iMarker_BC = 0; iMarker_BC < nMarker_Riemann; iMarker_BC++) { + if (Kind_Data_Riemann[iMarker_BC] == STATIC_PRESSURE || Kind_Data_Riemann[iMarker_BC] == RADIAL_EQUILIBRIUM) { pres_out = Riemann_Var1[iMarker_BC]; } } - return pres_out/Pressure_Ref; + return pres_out / Pressure_Ref; } void CConfig::SetPressureOut_BC(su2double val_press) { unsigned short iMarker_BC; - for (iMarker_BC = 0; iMarker_BC < nMarker_Giles; iMarker_BC++){ - if (Kind_Data_Giles[iMarker_BC] == STATIC_PRESSURE || Kind_Data_Giles[iMarker_BC] == STATIC_PRESSURE_1D || Kind_Data_Giles[iMarker_BC] == RADIAL_EQUILIBRIUM ){ - Giles_Var1[iMarker_BC] = val_press*Pressure_Ref; + for (iMarker_BC = 0; iMarker_BC < nMarker_Giles; iMarker_BC++) { + if (Kind_Data_Giles[iMarker_BC] == STATIC_PRESSURE || Kind_Data_Giles[iMarker_BC] == STATIC_PRESSURE_1D || + Kind_Data_Giles[iMarker_BC] == RADIAL_EQUILIBRIUM) { + Giles_Var1[iMarker_BC] = val_press * Pressure_Ref; } } - for (iMarker_BC = 0; iMarker_BC < nMarker_Riemann; iMarker_BC++){ - if (Kind_Data_Riemann[iMarker_BC] == STATIC_PRESSURE || Kind_Data_Riemann[iMarker_BC] == RADIAL_EQUILIBRIUM){ - Riemann_Var1[iMarker_BC] = val_press*Pressure_Ref; + for (iMarker_BC = 0; iMarker_BC < nMarker_Riemann; iMarker_BC++) { + if (Kind_Data_Riemann[iMarker_BC] == STATIC_PRESSURE || Kind_Data_Riemann[iMarker_BC] == RADIAL_EQUILIBRIUM) { + Riemann_Var1[iMarker_BC] = val_press * Pressure_Ref; } } } @@ -8995,175 +9765,159 @@ void CConfig::SetPressureOut_BC(su2double val_press) { su2double CConfig::GetTotalPressureIn_BC() const { unsigned short iMarker_BC; su2double tot_pres_in = 0.0; - for (iMarker_BC = 0; iMarker_BC < nMarker_Giles; iMarker_BC++){ - if (Kind_Data_Giles[iMarker_BC] == TOTAL_CONDITIONS_PT || Kind_Data_Giles[iMarker_BC] == TOTAL_CONDITIONS_PT_1D){ + for (iMarker_BC = 0; iMarker_BC < nMarker_Giles; iMarker_BC++) { + if (Kind_Data_Giles[iMarker_BC] == TOTAL_CONDITIONS_PT || Kind_Data_Giles[iMarker_BC] == TOTAL_CONDITIONS_PT_1D) { tot_pres_in = Giles_Var1[iMarker_BC]; } } - for (iMarker_BC = 0; iMarker_BC < nMarker_Riemann; iMarker_BC++){ - if (Kind_Data_Riemann[iMarker_BC] == TOTAL_CONDITIONS_PT ){ + for (iMarker_BC = 0; iMarker_BC < nMarker_Riemann; iMarker_BC++) { + if (Kind_Data_Riemann[iMarker_BC] == TOTAL_CONDITIONS_PT) { tot_pres_in = Riemann_Var1[iMarker_BC]; } } - if(nMarker_Inlet == 1 && Kind_Inlet == INLET_TYPE::TOTAL_CONDITIONS){ + if (nMarker_Inlet == 1 && Kind_Inlet == INLET_TYPE::TOTAL_CONDITIONS) { tot_pres_in = Inlet_Ptotal[0]; } - return tot_pres_in/Pressure_Ref; + return tot_pres_in / Pressure_Ref; } su2double CConfig::GetTotalTemperatureIn_BC() const { unsigned short iMarker_BC; su2double tot_temp_in = 0.0; - for (iMarker_BC = 0; iMarker_BC < nMarker_Giles; iMarker_BC++){ - if (Kind_Data_Giles[iMarker_BC] == TOTAL_CONDITIONS_PT || Kind_Data_Giles[iMarker_BC] == TOTAL_CONDITIONS_PT_1D){ + for (iMarker_BC = 0; iMarker_BC < nMarker_Giles; iMarker_BC++) { + if (Kind_Data_Giles[iMarker_BC] == TOTAL_CONDITIONS_PT || Kind_Data_Giles[iMarker_BC] == TOTAL_CONDITIONS_PT_1D) { tot_temp_in = Giles_Var2[iMarker_BC]; } } - for (iMarker_BC = 0; iMarker_BC < nMarker_Riemann; iMarker_BC++){ - if (Kind_Data_Riemann[iMarker_BC] == TOTAL_CONDITIONS_PT ){ + for (iMarker_BC = 0; iMarker_BC < nMarker_Riemann; iMarker_BC++) { + if (Kind_Data_Riemann[iMarker_BC] == TOTAL_CONDITIONS_PT) { tot_temp_in = Riemann_Var2[iMarker_BC]; } } - if(nMarker_Inlet == 1 && Kind_Inlet == INLET_TYPE::TOTAL_CONDITIONS){ + if (nMarker_Inlet == 1 && Kind_Inlet == INLET_TYPE::TOTAL_CONDITIONS) { tot_temp_in = Inlet_Ttotal[0]; } - return tot_temp_in/Temperature_Ref; + return tot_temp_in / Temperature_Ref; } void CConfig::SetTotalTemperatureIn_BC(su2double val_temp) { unsigned short iMarker_BC; - for (iMarker_BC = 0; iMarker_BC < nMarker_Giles; iMarker_BC++){ - if (Kind_Data_Giles[iMarker_BC] == TOTAL_CONDITIONS_PT || Kind_Data_Giles[iMarker_BC] == TOTAL_CONDITIONS_PT_1D){ - Giles_Var2[iMarker_BC] = val_temp*Temperature_Ref; + for (iMarker_BC = 0; iMarker_BC < nMarker_Giles; iMarker_BC++) { + if (Kind_Data_Giles[iMarker_BC] == TOTAL_CONDITIONS_PT || Kind_Data_Giles[iMarker_BC] == TOTAL_CONDITIONS_PT_1D) { + Giles_Var2[iMarker_BC] = val_temp * Temperature_Ref; } } - for (iMarker_BC = 0; iMarker_BC < nMarker_Riemann; iMarker_BC++){ - if (Kind_Data_Riemann[iMarker_BC] == TOTAL_CONDITIONS_PT ){ - Riemann_Var2[iMarker_BC] = val_temp*Temperature_Ref; + for (iMarker_BC = 0; iMarker_BC < nMarker_Riemann; iMarker_BC++) { + if (Kind_Data_Riemann[iMarker_BC] == TOTAL_CONDITIONS_PT) { + Riemann_Var2[iMarker_BC] = val_temp * Temperature_Ref; } } - if(nMarker_Inlet == 1 && Kind_Inlet == INLET_TYPE::TOTAL_CONDITIONS){ - Inlet_Ttotal[0] = val_temp*Temperature_Ref; + if (nMarker_Inlet == 1 && Kind_Inlet == INLET_TYPE::TOTAL_CONDITIONS) { + Inlet_Ttotal[0] = val_temp * Temperature_Ref; } } su2double CConfig::GetFlowAngleIn_BC() const { unsigned short iMarker_BC; su2double alpha_in = 0.0; - for (iMarker_BC = 0; iMarker_BC < nMarker_Giles; iMarker_BC++){ - if (Kind_Data_Giles[iMarker_BC] == TOTAL_CONDITIONS_PT || Kind_Data_Giles[iMarker_BC] == TOTAL_CONDITIONS_PT_1D){ - alpha_in = atan(Giles_FlowDir[iMarker_BC][1]/Giles_FlowDir[iMarker_BC][0]); + for (iMarker_BC = 0; iMarker_BC < nMarker_Giles; iMarker_BC++) { + if (Kind_Data_Giles[iMarker_BC] == TOTAL_CONDITIONS_PT || Kind_Data_Giles[iMarker_BC] == TOTAL_CONDITIONS_PT_1D) { + alpha_in = atan(Giles_FlowDir[iMarker_BC][1] / Giles_FlowDir[iMarker_BC][0]); } } - for (iMarker_BC = 0; iMarker_BC < nMarker_Riemann; iMarker_BC++){ - if (Kind_Data_Riemann[iMarker_BC] == TOTAL_CONDITIONS_PT ){ - alpha_in = atan(Riemann_FlowDir[iMarker_BC][1]/Riemann_FlowDir[iMarker_BC][0]); + for (iMarker_BC = 0; iMarker_BC < nMarker_Riemann; iMarker_BC++) { + if (Kind_Data_Riemann[iMarker_BC] == TOTAL_CONDITIONS_PT) { + alpha_in = atan(Riemann_FlowDir[iMarker_BC][1] / Riemann_FlowDir[iMarker_BC][0]); } } - if(nMarker_Inlet == 1 && Kind_Inlet == INLET_TYPE::TOTAL_CONDITIONS){ - alpha_in = atan(Inlet_FlowDir[0][1]/Inlet_FlowDir[0][0]); + if (nMarker_Inlet == 1 && Kind_Inlet == INLET_TYPE::TOTAL_CONDITIONS) { + alpha_in = atan(Inlet_FlowDir[0][1] / Inlet_FlowDir[0][0]); } return alpha_in; } su2double CConfig::GetIncInlet_BC() const { - su2double val_out = 0.0; if (nMarker_Inlet > 0) { if (Kind_Inc_Inlet[0] == INLET_TYPE::VELOCITY_INLET) - val_out = Inlet_Ptotal[0]/Velocity_Ref; + val_out = Inlet_Ptotal[0] / Velocity_Ref; else if (Kind_Inc_Inlet[0] == INLET_TYPE::PRESSURE_INLET) - val_out = Inlet_Ptotal[0]/Pressure_Ref; + val_out = Inlet_Ptotal[0] / Pressure_Ref; } return val_out; } void CConfig::SetIncInlet_BC(su2double val_in) { - if (nMarker_Inlet > 0) { if (Kind_Inc_Inlet[0] == INLET_TYPE::VELOCITY_INLET) - Inlet_Ptotal[0] = val_in*Velocity_Ref; + Inlet_Ptotal[0] = val_in * Velocity_Ref; else if (Kind_Inc_Inlet[0] == INLET_TYPE::PRESSURE_INLET) - Inlet_Ptotal[0] = val_in*Pressure_Ref; + Inlet_Ptotal[0] = val_in * Pressure_Ref; } } su2double CConfig::GetIncTemperature_BC() const { - su2double val_out = 0.0; - if (nMarker_Inlet > 0) - val_out = Inlet_Ttotal[0]/Temperature_Ref; + if (nMarker_Inlet > 0) val_out = Inlet_Ttotal[0] / Temperature_Ref; return val_out; } void CConfig::SetIncTemperature_BC(su2double val_temperature) { - if (nMarker_Inlet > 0) - Inlet_Ttotal[0] = val_temperature*Temperature_Ref; + if (nMarker_Inlet > 0) Inlet_Ttotal[0] = val_temperature * Temperature_Ref; } su2double CConfig::GetIncPressureOut_BC() const { - su2double pressure_out = 0.0; - if (nMarker_FarField > 0){ + if (nMarker_FarField > 0) { pressure_out = Pressure_FreeStreamND; } else if (nMarker_Outlet > 0) { - pressure_out = Outlet_Pressure[0]/Pressure_Ref; + pressure_out = Outlet_Pressure[0] / Pressure_Ref; } return pressure_out; } void CConfig::SetIncPressureOut_BC(su2double val_pressure) { - - if (nMarker_FarField > 0){ + if (nMarker_FarField > 0) { Pressure_FreeStreamND = val_pressure; } else if (nMarker_Outlet > 0) { - Outlet_Pressure[0] = val_pressure*Pressure_Ref; + Outlet_Pressure[0] = val_pressure * Pressure_Ref; } - } su2double CConfig::GetIsothermal_Temperature(const string& val_marker) const { - for (unsigned short iMarker_Isothermal = 0; iMarker_Isothermal < nMarker_Isothermal; iMarker_Isothermal++) - if (Marker_Isothermal[iMarker_Isothermal] == val_marker) - return Isothermal_Temperature[iMarker_Isothermal]; + if (Marker_Isothermal[iMarker_Isothermal] == val_marker) return Isothermal_Temperature[iMarker_Isothermal]; return Isothermal_Temperature[0]; } su2double CConfig::GetWall_HeatFlux(const string& val_marker) const { - for (unsigned short iMarker_HeatFlux = 0; iMarker_HeatFlux < nMarker_HeatFlux; iMarker_HeatFlux++) - if (Marker_HeatFlux[iMarker_HeatFlux] == val_marker) - return Heat_Flux[iMarker_HeatFlux]; + if (Marker_HeatFlux[iMarker_HeatFlux] == val_marker) return Heat_Flux[iMarker_HeatFlux]; return Heat_Flux[0]; } su2double CConfig::GetWall_HeatTransfer_Coefficient(const string& val_marker) const { - for (unsigned short iMarker_HeatTransfer = 0; iMarker_HeatTransfer < nMarker_HeatTransfer; iMarker_HeatTransfer++) - if (Marker_HeatTransfer[iMarker_HeatTransfer] == val_marker) - return HeatTransfer_Coeff[iMarker_HeatTransfer]; + if (Marker_HeatTransfer[iMarker_HeatTransfer] == val_marker) return HeatTransfer_Coeff[iMarker_HeatTransfer]; return HeatTransfer_Coeff[0]; } su2double CConfig::GetWall_HeatTransfer_Temperature(const string& val_marker) const { - for (unsigned short iMarker_HeatTransfer = 0; iMarker_HeatTransfer < nMarker_HeatTransfer; iMarker_HeatTransfer++) - if (Marker_HeatTransfer[iMarker_HeatTransfer] == val_marker) - return HeatTransfer_WallTemp[iMarker_HeatTransfer]; + if (Marker_HeatTransfer[iMarker_HeatTransfer] == val_marker) return HeatTransfer_WallTemp[iMarker_HeatTransfer]; return HeatTransfer_WallTemp[0]; } @@ -9180,11 +9934,10 @@ pair CConfig::GetWallRoughnessProperties(const string& val } WALL_FUNCTIONS CConfig::GetWallFunction_Treatment(const string& val_marker) const { - WALL_FUNCTIONS WallFunction = WALL_FUNCTIONS::NONE; - for(unsigned short iMarker=0; iMarker 0) { @@ -9540,7 +10292,6 @@ su2double CConfig::GetWall_Emissivity(const string& val_marker) const { } bool CConfig::GetMarker_StrongBC(const string& val_marker) const { - unsigned short iMarker_StrongBC = 0; for (iMarker_StrongBC = 0; iMarker_StrongBC < nMarker_StrongBC; iMarker_StrongBC++) @@ -9550,10 +10301,9 @@ bool CConfig::GetMarker_StrongBC(const string& val_marker) const { } short CConfig::FindInterfaceMarker(unsigned short iInterface) const { - /*--- The names of the two markers that form the interface. ---*/ - const auto& sideA = Marker_ZoneInterface[2*iInterface]; - const auto& sideB = Marker_ZoneInterface[2*iInterface+1]; + const auto& sideA = Marker_ZoneInterface[2 * iInterface]; + const auto& sideB = Marker_ZoneInterface[2 * iInterface + 1]; for (unsigned short iMarker = 0; iMarker < nMarker_All; iMarker++) { /*--- If the marker is sideA or sideB of the interface (order does not matter). ---*/ const auto& tag = Marker_All_TagBound[iMarker]; @@ -9562,16 +10312,13 @@ short CConfig::FindInterfaceMarker(unsigned short iInterface) const { return -1; } -void CConfig::Tick(double *val_start_time) { - +void CConfig::Tick(double* val_start_time) { #ifdef PROFILE *val_start_time = SU2_MPI::Wtime(); #endif - } void CConfig::Tock(double val_start_time, const string& val_function_name, int val_group_id) { - #ifdef PROFILE double val_stop_time = 0.0, val_elapsed_time = 0.0; @@ -9587,11 +10334,9 @@ void CConfig::Tock(double val_start_time, const string& val_function_name, int v Profile_ID_tp.push_back(val_group_id); #endif - } void CConfig::SetProfilingCSV() { - #ifdef PROFILE int rank = MASTER_NODE; @@ -9609,21 +10354,18 @@ void CConfig::SetProfilingCSV() { min and max values for each function. ---*/ for (unsigned int i = 0; i < Profile_Function_tp.size(); i++) { - /*--- Add the function and initialize if not already stored (the ID only needs to be stored the first time).---*/ if (Profile_Map_tp.find(Profile_Function_tp[i]) == Profile_Map_tp.end()) { - - vector profile; profile.push_back(i); - Profile_Map_tp.insert(pair >(Profile_Function_tp[i],profile)); + vector profile; + profile.push_back(i); + Profile_Map_tp.insert(pair >(Profile_Function_tp[i], profile)); } else { - /*--- This function has already been added, so simply increment the number of calls and total time for this function. ---*/ Profile_Map_tp[Profile_Function_tp[i]].push_back(i); - } } @@ -9631,33 +10373,31 @@ void CConfig::SetProfilingCSV() { each function and store the min/max times. ---*/ int map_size = 0; - for (map >::iterator it=Profile_Map_tp.begin(); it!=Profile_Map_tp.end(); ++it) { + for (map >::iterator it = Profile_Map_tp.begin(); it != Profile_Map_tp.end(); ++it) { map_size++; } /*--- Allocate and initialize memory ---*/ double *l_min_red = NULL, *l_max_red = NULL, *l_tot_red = NULL, *l_avg_red = NULL; - int *n_calls_red = NULL; + int* n_calls_red = NULL; double* l_min = new double[map_size]; double* l_max = new double[map_size]; double* l_tot = new double[map_size]; double* l_avg = new double[map_size]; - int* n_calls = new int[map_size]; - for (int i = 0; i < map_size; i++) - { - l_min[i] = 1e10; - l_max[i] = 0.0; - l_tot[i] = 0.0; - l_avg[i] = 0.0; + int* n_calls = new int[map_size]; + for (int i = 0; i < map_size; i++) { + l_min[i] = 1e10; + l_max[i] = 0.0; + l_tot[i] = 0.0; + l_avg[i] = 0.0; n_calls[i] = 0; } /*--- Collect the info for each function from the current rank ---*/ int func_counter = 0; - for (map >::iterator it=Profile_Map_tp.begin(); it!=Profile_Map_tp.end(); ++it) { - + for (map >::iterator it = Profile_Map_tp.begin(); it != Profile_Map_tp.end(); ++it) { for (unsigned int i = 0; i < (it->second).size(); i++) { n_calls[func_counter]++; l_tot[func_counter] += Profile_Time_tp[(it->second)[i]]; @@ -9665,9 +10405,8 @@ void CConfig::SetProfilingCSV() { l_min[func_counter] = Profile_Time_tp[(it->second)[i]]; if (Profile_Time_tp[(it->second)[i]] > l_max[func_counter]) l_max[func_counter] = Profile_Time_tp[(it->second)[i]]; - } - l_avg[func_counter] = l_tot[func_counter]/((double)n_calls[func_counter]); + l_avg[func_counter] = l_tot[func_counter] / ((double)n_calls[func_counter]); func_counter++; } @@ -9678,7 +10417,7 @@ void CConfig::SetProfilingCSV() { l_max_red = new double[map_size]; l_tot_red = new double[map_size]; l_avg_red = new double[map_size]; - n_calls_red = new int[map_size]; + n_calls_red = new int[map_size]; } #ifdef HAVE_MPI @@ -9688,23 +10427,22 @@ void CConfig::SetProfilingCSV() { MPI_Reduce(l_min, l_min_red, map_size, MPI_DOUBLE, MPI_MIN, MASTER_NODE, SU2_MPI::GetComm()); MPI_Reduce(l_max, l_max_red, map_size, MPI_DOUBLE, MPI_MAX, MASTER_NODE, SU2_MPI::GetComm()); #else - memcpy(n_calls_red, n_calls, map_size*sizeof(int)); - memcpy(l_tot_red, l_tot, map_size*sizeof(double)); - memcpy(l_avg_red, l_avg, map_size*sizeof(double)); - memcpy(l_min_red, l_min, map_size*sizeof(double)); - memcpy(l_max_red, l_max, map_size*sizeof(double)); + memcpy(n_calls_red, n_calls, map_size * sizeof(int)); + memcpy(l_tot_red, l_tot, map_size * sizeof(double)); + memcpy(l_avg_red, l_avg, map_size * sizeof(double)); + memcpy(l_min_red, l_min, map_size * sizeof(double)); + memcpy(l_max_red, l_max, map_size * sizeof(double)); #endif /*--- The master rank will write the file ---*/ if (rank == MASTER_NODE) { - /*--- Take averages over all ranks on the master ---*/ for (int i = 0; i < map_size; i++) { - l_tot_red[i] = l_tot_red[i]/(double)size; - l_avg_red[i] = l_avg_red[i]/(double)size; - n_calls_red[i] = n_calls_red[i]/size; + l_tot_red[i] = l_tot_red[i] / (double)size; + l_avg_red[i] = l_avg_red[i] / (double)size; + n_calls_red[i] = n_calls_red[i] / size; } /*--- Now write a CSV file with the processed results ---*/ @@ -9715,40 +10453,40 @@ void CConfig::SetProfilingCSV() { /*--- Create the CSV header ---*/ - Profile_File << "\"Function_Name\", \"N_Calls\", \"Avg_Total_Time\", \"Avg_Time\", \"Min_Time\", \"Max_Time\", \"Function_ID\"" << endl; + Profile_File << "\"Function_Name\", \"N_Calls\", \"Avg_Total_Time\", \"Avg_Time\", \"Min_Time\", \"Max_Time\", " + "\"Function_ID\"" + << endl; /*--- Loop through the map and write the results to the file ---*/ func_counter = 0; - for (map >::iterator it=Profile_Map_tp.begin(); it!=Profile_Map_tp.end(); ++it) { - - Profile_File << scientific << it->first << ", " << n_calls_red[func_counter] << ", " << l_tot_red[func_counter] << ", " << l_avg_red[func_counter] << ", " << l_min_red[func_counter] << ", " << l_max_red[func_counter] << ", " << (int)Profile_ID_tp[(it->second)[0]] << endl; + for (map >::iterator it = Profile_Map_tp.begin(); it != Profile_Map_tp.end(); ++it) { + Profile_File << scientific << it->first << ", " << n_calls_red[func_counter] << ", " << l_tot_red[func_counter] + << ", " << l_avg_red[func_counter] << ", " << l_min_red[func_counter] << ", " + << l_max_red[func_counter] << ", " << (int)Profile_ID_tp[(it->second)[0]] << endl; func_counter++; } Profile_File.close(); - } - delete [] l_min; - delete [] l_max; - delete [] l_avg; - delete [] l_tot; - delete [] n_calls; + delete[] l_min; + delete[] l_max; + delete[] l_avg; + delete[] l_tot; + delete[] n_calls; if (rank == MASTER_NODE) { - delete [] l_min_red; - delete [] l_max_red; - delete [] l_avg_red; - delete [] l_tot_red; - delete [] n_calls_red; + delete[] l_min_red; + delete[] l_max_red; + delete[] l_avg_red; + delete[] l_tot_red; + delete[] n_calls_red; } #endif - } -void CConfig::GEMM_Tick(double *val_start_time) const { - +void CConfig::GEMM_Tick(double* val_start_time) const { #ifdef PROFILE #ifdef HAVE_MKL @@ -9758,11 +10496,9 @@ void CConfig::GEMM_Tick(double *val_start_time) const { #endif #endif - } void CConfig::GEMM_Tock(double val_start_time, int M, int N, int K) const { - #ifdef PROFILE /* Determine the timing value. The actual function called depends on @@ -9783,8 +10519,7 @@ void CConfig::GEMM_Tock(double val_start_time, int M, int N, int K) const { CLong3T MNK(M, N, K); map::iterator MI = GEMM_Profile_MNK.find(MNK); - if(MI == GEMM_Profile_MNK.end()) { - + if (MI == GEMM_Profile_MNK.end()) { /* Entry is not present yet. Create it. */ const int ind = GEMM_Profile_MNK.size(); GEMM_Profile_MNK[MNK] = ind; @@ -9793,24 +10528,20 @@ void CConfig::GEMM_Tock(double val_start_time, int M, int N, int K) const { GEMM_Profile_TotTime.push_back(val_elapsed_time); GEMM_Profile_MinTime.push_back(val_elapsed_time); GEMM_Profile_MaxTime.push_back(val_elapsed_time); - } - else { - + } else { /* Entry is already present. Determine its index in the map and update the corresponding vectors. */ const int ind = MI->second; ++GEMM_Profile_NCalls[ind]; GEMM_Profile_TotTime[ind] += val_elapsed_time; - GEMM_Profile_MinTime[ind] = min(GEMM_Profile_MinTime[ind], val_elapsed_time); - GEMM_Profile_MaxTime[ind] = max(GEMM_Profile_MaxTime[ind], val_elapsed_time); + GEMM_Profile_MinTime[ind] = min(GEMM_Profile_MinTime[ind], val_elapsed_time); + GEMM_Profile_MaxTime[ind] = max(GEMM_Profile_MaxTime[ind], val_elapsed_time); } #endif - } void CConfig::GEMMProfilingCSV() { - #ifdef PROFILE /* Initialize the rank to the master node. */ @@ -9824,11 +10555,9 @@ void CConfig::GEMMProfilingCSV() { SU2_MPI::Comm_size(SU2_MPI::GetComm(), &size); /* Check for the master node. */ - if(rank == MASTER_NODE) { - + if (rank == MASTER_NODE) { /* Master node. Loop over the other ranks to receive their data. */ - for(int proc=1; proc recvBufNCalls(nEntries); + vector recvBufNCalls(nEntries); vector recvBufTotTime(nEntries); vector recvBufMinTime(nEntries); vector recvBufMaxTime(nEntries); - vector recvBufMNK(3*nEntries); - - SU2_MPI::Recv(recvBufNCalls.data(), recvBufNCalls.size(), - MPI_LONG, proc, 0, SU2_MPI::GetComm(), &status); - SU2_MPI::Recv(recvBufTotTime.data(), recvBufTotTime.size(), - MPI_DOUBLE, proc, 1, SU2_MPI::GetComm(), &status); - SU2_MPI::Recv(recvBufMinTime.data(), recvBufMinTime.size(), - MPI_DOUBLE, proc, 2, SU2_MPI::GetComm(), &status); - SU2_MPI::Recv(recvBufMaxTime.data(), recvBufMaxTime.size(), - MPI_DOUBLE, proc, 3, SU2_MPI::GetComm(), &status); - SU2_MPI::Recv(recvBufMNK.data(), recvBufMNK.size(), - MPI_LONG, proc, 4, SU2_MPI::GetComm(), &status); + vector recvBufMNK(3 * nEntries); - /* Loop over the number of entries. */ - for(int i=0; i::iterator MI = GEMM_Profile_MNK.find(MNK); - if(MI == GEMM_Profile_MNK.end()) { - + if (MI == GEMM_Profile_MNK.end()) { /* Entry is not present yet. Create it. */ const int ind = GEMM_Profile_MNK.size(); GEMM_Profile_MNK[MNK] = ind; @@ -9874,58 +10596,47 @@ void CConfig::GEMMProfilingCSV() { GEMM_Profile_TotTime.push_back(recvBufTotTime[i]); GEMM_Profile_MinTime.push_back(recvBufMinTime[i]); GEMM_Profile_MaxTime.push_back(recvBufMaxTime[i]); - } - else { - + } else { /* Entry is already present. Determine its index in the map and update the corresponding vectors. */ const int ind = MI->second; - GEMM_Profile_NCalls[ind] += recvBufNCalls[i]; + GEMM_Profile_NCalls[ind] += recvBufNCalls[i]; GEMM_Profile_TotTime[ind] += recvBufTotTime[i]; - GEMM_Profile_MinTime[ind] = min(GEMM_Profile_MinTime[ind], recvBufMinTime[i]); - GEMM_Profile_MaxTime[ind] = max(GEMM_Profile_MaxTime[ind], recvBufMaxTime[i]); + GEMM_Profile_MinTime[ind] = min(GEMM_Profile_MinTime[ind], recvBufMinTime[i]); + GEMM_Profile_MaxTime[ind] = max(GEMM_Profile_MaxTime[ind], recvBufMaxTime[i]); } } } - } - else { - + } else { /* Not the master node. Create the send buffer for the MNK data. */ - vector sendBufMNK(3*GEMM_Profile_NCalls.size()); - for(map::iterator MI =GEMM_Profile_MNK.begin(); - MI!=GEMM_Profile_MNK.end(); ++MI) { - - const int ind = 3*MI->second; - sendBufMNK[ind] = MI->first.long0; - sendBufMNK[ind+1] = MI->first.long1; - sendBufMNK[ind+2] = MI->first.long2; + vector sendBufMNK(3 * GEMM_Profile_NCalls.size()); + for (map::iterator MI = GEMM_Profile_MNK.begin(); MI != GEMM_Profile_MNK.end(); ++MI) { + const int ind = 3 * MI->second; + sendBufMNK[ind] = MI->first.long0; + sendBufMNK[ind + 1] = MI->first.long1; + sendBufMNK[ind + 2] = MI->first.long2; } /* Send the data to the master node using blocking sends. */ - SU2_MPI::Send(GEMM_Profile_NCalls.data(), GEMM_Profile_NCalls.size(), - MPI_LONG, MASTER_NODE, 0, SU2_MPI::GetComm()); - SU2_MPI::Send(GEMM_Profile_TotTime.data(), GEMM_Profile_TotTime.size(), - MPI_DOUBLE, MASTER_NODE, 1, SU2_MPI::GetComm()); - SU2_MPI::Send(GEMM_Profile_MinTime.data(), GEMM_Profile_MinTime.size(), - MPI_DOUBLE, MASTER_NODE, 2, SU2_MPI::GetComm()); - SU2_MPI::Send(GEMM_Profile_MaxTime.data(), GEMM_Profile_MaxTime.size(), - MPI_DOUBLE, MASTER_NODE, 3, SU2_MPI::GetComm()); - SU2_MPI::Send(sendBufMNK.data(), sendBufMNK.size(), - MPI_LONG, MASTER_NODE, 4, SU2_MPI::GetComm()); + SU2_MPI::Send(GEMM_Profile_NCalls.data(), GEMM_Profile_NCalls.size(), MPI_LONG, MASTER_NODE, 0, SU2_MPI::GetComm()); + SU2_MPI::Send(GEMM_Profile_TotTime.data(), GEMM_Profile_TotTime.size(), MPI_DOUBLE, MASTER_NODE, 1, + SU2_MPI::GetComm()); + SU2_MPI::Send(GEMM_Profile_MinTime.data(), GEMM_Profile_MinTime.size(), MPI_DOUBLE, MASTER_NODE, 2, + SU2_MPI::GetComm()); + SU2_MPI::Send(GEMM_Profile_MaxTime.data(), GEMM_Profile_MaxTime.size(), MPI_DOUBLE, MASTER_NODE, 3, + SU2_MPI::GetComm()); + SU2_MPI::Send(sendBufMNK.data(), sendBufMNK.size(), MPI_LONG, MASTER_NODE, 4, SU2_MPI::GetComm()); } #endif /*--- The master rank will write the file ---*/ if (rank == MASTER_NODE) { - /* Store the elements of the map GEMM_Profile_MNK in vectors for post processing reasons. */ const unsigned int nItems = GEMM_Profile_MNK.size(); vector M(nItems), N(nItems), K(nItems); - for(map::iterator MI =GEMM_Profile_MNK.begin(); - MI!=GEMM_Profile_MNK.end(); ++MI) { - + for (map::iterator MI = GEMM_Profile_MNK.begin(); MI != GEMM_Profile_MNK.end(); ++MI) { const int ind = MI->second; M[ind] = MI->first.long0; N[ind] = MI->first.long1; @@ -9937,7 +10648,7 @@ void CConfig::GEMMProfilingCSV() { out this sort. */ vector > sortedTime; - for(unsigned int i=0; i >::reverse_iterator rit =sortedTime.rbegin(); - rit!=sortedTime.rend(); ++rit) { + for (vector >::reverse_iterator rit = sortedTime.rbegin(); rit != sortedTime.rend(); + ++rit) { /* Determine the original index in the profiling vectors. */ const unsigned int ind = rit->second; - const double AvgTime = GEMM_Profile_TotTime[ind]/GEMM_Profile_NCalls[ind]; - const double GFlops = 2.0e-9*M[ind]*N[ind]*K[ind]/AvgTime; + const double AvgTime = GEMM_Profile_TotTime[ind] / GEMM_Profile_NCalls[ind]; + const double GFlops = 2.0e-9 * M[ind] * N[ind] * K[ind] / AvgTime; /* Write the data. */ - Profile_File << scientific << GEMM_Profile_TotTime[ind] << ", " << GEMM_Profile_NCalls[ind] << ", " - << AvgTime << ", " << GEMM_Profile_MinTime[ind] << ", " << GEMM_Profile_MaxTime[ind] << ", " - << M[ind] << ", " << N[ind] << ", " << K[ind] << ", " << GFlops << endl; + Profile_File << scientific << GEMM_Profile_TotTime[ind] << ", " << GEMM_Profile_NCalls[ind] << ", " << AvgTime + << ", " << GEMM_Profile_MinTime[ind] << ", " << GEMM_Profile_MaxTime[ind] << ", " << M[ind] << ", " + << N[ind] << ", " << K[ind] << ", " << GFlops << endl; } /* Close the file. */ @@ -9971,74 +10684,73 @@ void CConfig::GEMMProfilingCSV() { } #endif - } -void CConfig::SetFreeStreamTurboNormal(const su2double* turboNormal){ - +void CConfig::SetFreeStreamTurboNormal(const su2double* turboNormal) { FreeStreamTurboNormal[0] = turboNormal[0]; FreeStreamTurboNormal[1] = turboNormal[1]; FreeStreamTurboNormal[2] = 0.0; - } -void CConfig::SetMultizone(const CConfig *driver_config, const CConfig* const* config_container){ - - for (unsigned short iZone = 0; iZone < nZone; iZone++){ - - if (config_container[iZone]->GetTime_Domain() != GetTime_Domain()){ +void CConfig::SetMultizone(const CConfig* driver_config, const CConfig* const* config_container) { + for (unsigned short iZone = 0; iZone < nZone; iZone++) { + if (config_container[iZone]->GetTime_Domain() != GetTime_Domain()) { SU2_MPI::Error("Option TIME_DOMAIN must be the same in all zones.", CURRENT_FUNCTION); } - if (config_container[iZone]->GetnTime_Iter() != GetnTime_Iter()){ + if (config_container[iZone]->GetnTime_Iter() != GetnTime_Iter()) { SU2_MPI::Error("Option TIME_ITER must be the same in all zones.", CURRENT_FUNCTION); } - if (config_container[iZone]->GetnOuter_Iter() != GetnOuter_Iter()){ + if (config_container[iZone]->GetnOuter_Iter() != GetnOuter_Iter()) { SU2_MPI::Error("Option OUTER_ITER must be the same in all zones.", CURRENT_FUNCTION); } - if (config_container[iZone]->GetTime_Step() != GetTime_Step()){ + if (config_container[iZone]->GetTime_Step() != GetTime_Step()) { SU2_MPI::Error("Option TIME_STEP must be the same in all zones.", CURRENT_FUNCTION); } - if (config_container[iZone]->GetUnst_CFL() != 0.0){ - SU2_MPI::Error("Option UNST_CFL_NUMBER cannot be used in multizone problems (must be 0)," - " use a fixed TIME_STEP instead.", CURRENT_FUNCTION); + if (config_container[iZone]->GetUnst_CFL() != 0.0) { + SU2_MPI::Error( + "Option UNST_CFL_NUMBER cannot be used in multizone problems (must be 0)," + " use a fixed TIME_STEP instead.", + CURRENT_FUNCTION); } - if (config_container[iZone]->GetMultizone_Problem() != GetMultizone_Problem()){ + if (config_container[iZone]->GetMultizone_Problem() != GetMultizone_Problem()) { SU2_MPI::Error("Option MULTIZONE must be the same in all zones.", CURRENT_FUNCTION); } - if (config_container[iZone]->GetMultizone_Mesh() != GetMultizone_Mesh()){ + if (config_container[iZone]->GetMultizone_Mesh() != GetMultizone_Mesh()) { SU2_MPI::Error("Option MULTIZONE_MESH must be the same in all zones.", CURRENT_FUNCTION); } - if(config_container[iZone]->GetWnd_Cauchy_Crit()){ + if (config_container[iZone]->GetWnd_Cauchy_Crit()) { SU2_MPI::Error("Option WINDOW_CAUCHY_CRIT must be deactivated for multizone problems.", CURRENT_FUNCTION); } } - if(driver_config->GetWnd_Cauchy_Crit()){ + if (driver_config->GetWnd_Cauchy_Crit()) { SU2_MPI::Error("Option WINDOW_CAUCHY_CRIT must be deactivated for multizone problems.", CURRENT_FUNCTION); } bool multiblockDriver = false; - for (unsigned short iFiles = 0; iFiles < driver_config->GetnVolumeOutputFiles(); iFiles++){ - if (driver_config->GetVolumeOutputFiles()[iFiles] == OUTPUT_TYPE::PARAVIEW_MULTIBLOCK){ + for (unsigned short iFiles = 0; iFiles < driver_config->GetnVolumeOutputFiles(); iFiles++) { + if (driver_config->GetVolumeOutputFiles()[iFiles] == OUTPUT_TYPE::PARAVIEW_MULTIBLOCK) { multiblockDriver = true; } } bool multiblockZone = false; - for (unsigned short iZone = 0; iZone < nZone; iZone++){ + for (unsigned short iZone = 0; iZone < nZone; iZone++) { multiblockZone = false; - for (unsigned short iFiles = 0; iFiles < config_container[iZone]->GetnVolumeOutputFiles(); iFiles++){ - if (config_container[iZone]->GetVolumeOutputFiles()[iFiles] == OUTPUT_TYPE::PARAVIEW_MULTIBLOCK){ + for (unsigned short iFiles = 0; iFiles < config_container[iZone]->GetnVolumeOutputFiles(); iFiles++) { + if (config_container[iZone]->GetVolumeOutputFiles()[iFiles] == OUTPUT_TYPE::PARAVIEW_MULTIBLOCK) { multiblockZone = true; } } - if (multiblockZone != multiblockDriver){ - SU2_MPI::Error("To enable PARAVIEW_MULTIBLOCK output, add it to OUTPUT_FILES option in main config and\n" - "remove option from sub-config files.", CURRENT_FUNCTION); + if (multiblockZone != multiblockDriver) { + SU2_MPI::Error( + "To enable PARAVIEW_MULTIBLOCK output, add it to OUTPUT_FILES option in main config and\n" + "remove option from sub-config files.", + CURRENT_FUNCTION); } } /*--- Fix the Time Step for all subdomains, for the case of time-dependent problems ---*/ - if (driver_config->GetTime_Domain()){ + if (driver_config->GetTime_Domain()) { Delta_UnstTime = driver_config->GetTime_Step(); Time_Domain = true; From 9f93d6bcfcff902e8a0494997188571165426e25 Mon Sep 17 00:00:00 2001 From: bigfooted Date: Wed, 9 Aug 2023 22:48:18 +0200 Subject: [PATCH 19/34] remove direct_diff, auto_diff --- Common/include/CConfig.hpp | 1 - Common/src/CConfig.cpp | 17 ----------------- config_template.cfg | 6 ------ 3 files changed, 24 deletions(-) diff --git a/Common/include/CConfig.hpp b/Common/include/CConfig.hpp index cb4e14ee96a..f045de02c01 100644 --- a/Common/include/CConfig.hpp +++ b/Common/include/CConfig.hpp @@ -262,7 +262,6 @@ class CConfig { *Marker_Load_Dir, /*!< \brief Load markers defined in cartesian coordinates. */ *Marker_Disp_Dir, /*!< \brief Load markers defined in cartesian coordinates. */ *Marker_Load_Sine, /*!< \brief Sine-wave loaded markers defined in cartesian coordinates. */ - *Marker_FlowLoad, /*!< \brief Flow Load markers. */ *Marker_Internal, /*!< \brief Internal flow markers. */ *Marker_All_TagBound; /*!< \brief Global index for markers using grid information. */ diff --git a/Common/src/CConfig.cpp b/Common/src/CConfig.cpp index 1ee3a4548f2..9213083c98b 100644 --- a/Common/src/CConfig.cpp +++ b/Common/src/CConfig.cpp @@ -1920,8 +1920,6 @@ void CConfig::SetConfig_Options() { /*!\brief RAMP_AND_RELEASE\n DESCRIPTION: release the load after applying the ramp*/ addBoolOption("RAMP_AND_RELEASE_LOAD", RampAndRelease, false); - /* DESCRIPTION: Flow load boundary marker(s) */ - // addStringDoubleListOption("MARKER_FLOWLOAD", nMarker_FlowLoad, Marker_FlowLoad, FlowLoad_Value); /* DESCRIPTION: Damping factor for engine inlet condition */ addDoubleOption("DAMP_ENGINE_INFLOW", Damp_Engine_Inflow, 0.95); /* DESCRIPTION: Damping factor for engine exhaust condition */ @@ -3063,12 +3061,6 @@ void CConfig::SetConfig_Options() { /*--- Options for the automatic differentiation methods ---*/ /*!\par CONFIG_CATEGORY: Automatic Differentation options\ingroup Config*/ - /* DESCRIPTION: Direct differentiation mode (forward) */ - addEnumOption("DIRECT_DIFF", DirectDiff, DirectDiff_Var_Map, NO_DERIVATIVE); - - /* DESCRIPTION: Automatic differentiation mode (reverse) */ - addBoolOption("AUTO_DIFF", AD_Mode, NO); - /* DESCRIPTION: Preaccumulation in the AD mode. */ addBoolOption("PREACC", AD_Preaccumulation, YES); @@ -8007,15 +7999,6 @@ void CConfig::SetOutput(SU2_COMPONENT val_software, unsigned short val_izone) { BoundaryTable.PrintFooter(); } - // if (nMarker_FlowLoad != 0) { - // BoundaryTable << "Flow load boundary"; - // for (iMarker_FlowLoad = 0; iMarker_FlowLoad < nMarker_FlowLoad; iMarker_FlowLoad++) { - // BoundaryTable << Marker_FlowLoad[iMarker_FlowLoad]; - // if (iMarker_FlowLoad < nMarker_FlowLoad-1) BoundaryTable << " "; - // } - // BoundaryTable.PrintFooter(); - // } - if (nMarker_Internal != 0) { BoundaryTable << "Internal boundary"; for (iMarker_Internal = 0; iMarker_Internal < nMarker_Internal; iMarker_Internal++) { diff --git a/config_template.cfg b/config_template.cfg index 746e901edc2..dde9a3969e6 100644 --- a/config_template.cfg +++ b/config_template.cfg @@ -1942,12 +1942,6 @@ STRESS_PENALTY_PARAM= (1.0, 10.0) % ---------------- AUTOMATIC DIFFERENTIATION -------------------% % -% Direct differentiation mode (forward) -DIRECT_DIFF= NONE -% -% Automatic differentiation mode (reverse) -AUTO_DIFF= NO -% % Preaccumulation in the AD mode. PREACC= YES From 93e5fdcf096d1385e1316fa000f9b598dcf43daf Mon Sep 17 00:00:00 2001 From: bigfooted Date: Fri, 11 Aug 2023 09:17:55 +0200 Subject: [PATCH 20/34] update cconfig with clang --- Common/include/CConfig.hpp | 1 - 1 file changed, 1 deletion(-) diff --git a/Common/include/CConfig.hpp b/Common/include/CConfig.hpp index f045de02c01..b3379b587cb 100644 --- a/Common/include/CConfig.hpp +++ b/Common/include/CConfig.hpp @@ -1099,7 +1099,6 @@ class CConfig { distortion[2], /*!< \brief SU2_GEO section locations array for the COption class. */ ea_lim[3], /*!< \brief equivalent area limit array for the COption class. */ grid_fix[6], /*!< \brief fixed grid (non-deforming region) array for the COption class. */ - //htp_axis[2], /*!< \brief HTP axis for the COption class. */ ffd_axis[3], /*!< \brief FFD axis for the COption class. */ inc_crit[3], /*!< \brief incremental criteria array for the COption class. */ extrarelfac[2], /*!< \brief extra relaxation factor for Giles BC in the COption class. */ From 27e9b339a9b32e7d9c5c8fa1efc1a8746e5a7369 Mon Sep 17 00:00:00 2001 From: bigfooted Date: Fri, 11 Aug 2023 09:24:50 +0200 Subject: [PATCH 21/34] update cconfig with clang --- Common/src/CConfig.cpp | 6045 ++++++++++++++++++---------------------- 1 file changed, 2675 insertions(+), 3370 deletions(-) diff --git a/Common/src/CConfig.cpp b/Common/src/CConfig.cpp index 9213083c98b..1365f1a3cd9 100644 --- a/Common/src/CConfig.cpp +++ b/Common/src/CConfig.cpp @@ -50,20 +50,22 @@ vector Profile_Time_tp; /*!< \brief Vector of elapsed time for vector Profile_ID_tp; /*!< \brief Vector of group ID number for profiled functions. */ map > Profile_Map_tp; /*!< \brief Map containing the final results for profiled functions. */ -map GEMM_Profile_MNK; /*!< \brief Map, which maps the GEMM size to the index where - the data for this GEMM is stored in several vectors. */ -vector GEMM_Profile_NCalls; /*!< \brief Vector, which stores the number of calls to this - GEMM size. */ -vector GEMM_Profile_TotTime; /*!< \brief Total time spent for this GEMM size. */ -vector GEMM_Profile_MinTime; /*!< \brief Minimum time spent for this GEMM size. */ -vector GEMM_Profile_MaxTime; /*!< \brief Maximum time spent for this GEMM size. */ +map GEMM_Profile_MNK; /*!< \brief Map, which maps the GEMM size to the index where + the data for this GEMM is stored in several vectors. */ +vector GEMM_Profile_NCalls; /*!< \brief Vector, which stores the number of calls to this + GEMM size. */ +vector GEMM_Profile_TotTime; /*!< \brief Total time spent for this GEMM size. */ +vector GEMM_Profile_MinTime; /*!< \brief Minimum time spent for this GEMM size. */ +vector GEMM_Profile_MaxTime; /*!< \brief Maximum time spent for this GEMM size. */ //#pragma omp threadprivate(Profile_Function_tp, Profile_Time_tp, Profile_ID_tp, Profile_Map_tp) + CConfig::CConfig(char case_filename[MAX_STRING_SIZE], SU2_COMPONENT val_software, bool verb_high) { + /*--- Set the case name to the base config file name without extension ---*/ - caseName = PrintingToolbox::split(string(case_filename), '.')[0]; + caseName = PrintingToolbox::split(string(case_filename),'.')[0]; base_config = true; @@ -99,10 +101,13 @@ CConfig::CConfig(char case_filename[MAX_STRING_SIZE], SU2_COMPONENT val_software /*--- Configuration file output ---*/ - if ((rank == MASTER_NODE) && verb_high) SetOutput(val_software, iZone); + if ((rank == MASTER_NODE) && verb_high) + SetOutput(val_software, iZone); + } -CConfig::CConfig(istream& case_buffer, SU2_COMPONENT val_software, bool verb_high) { +CConfig::CConfig(istream &case_buffer, SU2_COMPONENT val_software, bool verb_high) { + base_config = true; iZone = 0; @@ -132,11 +137,13 @@ CConfig::CConfig(istream& case_buffer, SU2_COMPONENT val_software, bool verb_hig /*--- Configuration file output ---*/ - if ((rank == MASTER_NODE) && verb_high) SetOutput(val_software, iZone); + if ((rank == MASTER_NODE) && verb_high) + SetOutput(val_software, iZone); + } -CConfig::CConfig(CConfig* config, char case_filename[MAX_STRING_SIZE], SU2_COMPONENT val_software, - unsigned short val_iZone, unsigned short val_nZone, bool verb_high) { +CConfig::CConfig(CConfig* config, char case_filename[MAX_STRING_SIZE], SU2_COMPONENT val_software, unsigned short val_iZone, unsigned short val_nZone, bool verb_high) { + caseName = config->GetCaseName(); unsigned short val_nDim; @@ -174,15 +181,18 @@ CConfig::CConfig(CConfig* config, char case_filename[MAX_STRING_SIZE], SU2_COMPO /*--- Configuration file output ---*/ - if ((rank == MASTER_NODE) && verb_high) SetOutput(val_software, val_iZone); + if ((rank == MASTER_NODE) && verb_high) + SetOutput(val_software, val_iZone); Multizone_Problem = config->GetMultizone_Problem(); + } CConfig::CConfig(char case_filename[MAX_STRING_SIZE], SU2_COMPONENT val_software) { + /*--- Set the case name to the base config file name without extension ---*/ - caseName = PrintingToolbox::split(string(case_filename), '.')[0]; + caseName = PrintingToolbox::split(string(case_filename),'.')[0]; base_config = true; @@ -214,12 +224,14 @@ CConfig::CConfig(char case_filename[MAX_STRING_SIZE], SU2_COMPONENT val_software /*--- Print the header --- */ SetHeader(val_software); + } -CConfig::CConfig(char case_filename[MAX_STRING_SIZE], CConfig* config) { +CConfig::CConfig(char case_filename[MAX_STRING_SIZE], CConfig *config) { + /*--- Set the case name to the base config file name without extension ---*/ - caseName = PrintingToolbox::split(string(case_filename), '.')[0]; + caseName = PrintingToolbox::split(string(case_filename),'.')[0]; base_config = true; @@ -238,13 +250,19 @@ CConfig::CConfig(char case_filename[MAX_STRING_SIZE], CConfig* config) { /*--- Update original config file ---*/ if (runtime_file) { - if (all_options.find("TIME_ITER") == all_options.end()) config->SetnTime_Iter(nTimeIter); + if (all_options.find("TIME_ITER") == all_options.end()) + config->SetnTime_Iter(nTimeIter); } } -SU2_MPI::Comm CConfig::GetMPICommunicator() const { return SU2_Communicator; } +SU2_MPI::Comm CConfig::GetMPICommunicator() const { + + return SU2_Communicator; + +} + +void CConfig::Init(){ -void CConfig::Init() { /*--- Store MPI rank and size ---*/ rank = SU2_MPI::GetRank(); @@ -257,11 +275,16 @@ void CConfig::Init() { /*--- Reading config options ---*/ SetConfig_Options(); + } -void CConfig::SetMPICommunicator(SU2_MPI::Comm Communicator) { SU2_Communicator = Communicator; } +void CConfig::SetMPICommunicator(SU2_MPI::Comm Communicator) { + + SU2_Communicator = Communicator; -void CConfig::addDoubleOption(const string& name, su2double& option_field, su2double default_value) { +} + +void CConfig::addDoubleOption(const string& name, su2double & option_field, su2double default_value) { // Check if the key is already in the map. If this fails, it is coder error // and not user error, so throw. assert(option_map.find(name) == option_map.end()); @@ -277,201 +300,198 @@ void CConfig::addDoubleOption(const string& name, su2double& option_field, su2do // Create an association between the option name ("CFL") and the parser generated above. // During configuration, the parsing script will get the option name, and use this map // to find how to parse that option. - option_map.insert(pair(name, val)); + option_map.insert(pair(name, val)); } -void CConfig::addStringOption(const string& name, string& option_field, string default_value) { +void CConfig::addStringOption(const string& name, string & option_field, string default_value) { + assert(option_map.find(name) == option_map.end()); all_options.insert(pair(name, true)); COptionBase* val = new COptionString(name, option_field, std::move(default_value)); - option_map.insert(pair(name, val)); + option_map.insert(pair(name, val)); } -void CConfig::addIntegerOption(const string& name, int& option_field, int default_value) { +void CConfig::addIntegerOption(const string& name, int & option_field, int default_value) { assert(option_map.find(name) == option_map.end()); all_options.insert(pair(name, true)); COptionBase* val = new COptionInt(name, option_field, default_value); - option_map.insert(pair(name, val)); + option_map.insert(pair(name, val)); } -void CConfig::addUnsignedLongOption(const string& name, unsigned long& option_field, unsigned long default_value) { +void CConfig::addUnsignedLongOption(const string& name, unsigned long & option_field, unsigned long default_value) { assert(option_map.find(name) == option_map.end()); all_options.insert(pair(name, true)); COptionBase* val = new COptionULong(name, option_field, default_value); - option_map.insert(pair(name, val)); + option_map.insert(pair(name, val)); } -void CConfig::addUnsignedShortOption(const string& name, unsigned short& option_field, unsigned short default_value) { +void CConfig::addUnsignedShortOption(const string& name, unsigned short & option_field, unsigned short default_value) { assert(option_map.find(name) == option_map.end()); all_options.insert(pair(name, true)); COptionBase* val = new COptionUShort(name, option_field, default_value); - option_map.insert(pair(name, val)); + option_map.insert(pair(name, val)); } -void CConfig::addLongOption(const string& name, long& option_field, long default_value) { +void CConfig::addLongOption(const string& name, long & option_field, long default_value) { assert(option_map.find(name) == option_map.end()); all_options.insert(pair(name, true)); COptionBase* val = new COptionLong(name, option_field, default_value); - option_map.insert(pair(name, val)); + option_map.insert(pair(name, val)); } -void CConfig::addBoolOption(const string& name, bool& option_field, bool default_value) { +void CConfig::addBoolOption(const string& name, bool & option_field, bool default_value) { assert(option_map.find(name) == option_map.end()); all_options.insert(pair(name, true)); COptionBase* val = new COptionBool(name, option_field, default_value); - option_map.insert(pair(name, val)); + option_map.insert(pair(name, val)); } // enum types work differently than all of the others because there are a small number of valid // string entries for the type. One must also provide a list of all the valid strings of that type. template -void CConfig::addEnumOption(const string name, TField& option_field, const map& enum_map, - Tenum default_value) { +void CConfig::addEnumOption(const string name, TField& option_field, const map& enum_map, Tenum default_value) { assert(option_map.find(name) == option_map.end()); all_options.insert(pair(name, true)); COptionBase* val = new COptionEnum(name, enum_map, option_field, default_value); - option_map.insert(pair(name, val)); + option_map.insert(pair(name, val)); } // input_size is the number of options read in from the config file template -void CConfig::addEnumListOption(const string name, unsigned short& input_size, TField*& option_field, - const map& enum_map) { +void CConfig::addEnumListOption(const string name, unsigned short& input_size, TField*& option_field, const map& enum_map) { input_size = 0; assert(option_map.find(name) == option_map.end()); all_options.insert(pair(name, true)); - COptionBase* val = new COptionEnumList(name, enum_map, option_field, input_size); - option_map.insert(pair(name, val)); + COptionBase* val = new COptionEnumList(name, enum_map, option_field, input_size); + option_map.insert( pair(name, val) ); } void CConfig::addDoubleArrayOption(const string& name, const int size, su2double* option_field) { assert(option_map.find(name) == option_map.end()); all_options.insert(pair(name, true)); COptionBase* val = new COptionArray(name, size, option_field); - option_map.insert(pair(name, val)); + option_map.insert(pair(name, val)); } void CConfig::addUShortArrayOption(const string& name, const int size, unsigned short* option_field) { assert(option_map.find(name) == option_map.end()); all_options.insert(pair(name, true)); COptionBase* val = new COptionArray(name, size, option_field); - option_map.insert(pair(name, val)); + option_map.insert(pair(name, val)); } -void CConfig::addDoubleListOption(const string& name, unsigned short& size, su2double*& option_field) { +void CConfig::addDoubleListOption(const string& name, unsigned short & size, su2double * & option_field) { assert(option_map.find(name) == option_map.end()); all_options.insert(pair(name, true)); COptionBase* val = new COptionDoubleList(name, size, option_field); - option_map.insert(pair(name, val)); + option_map.insert(pair(name, val)); } -void CConfig::addShortListOption(const string& name, unsigned short& size, short*& option_field) { +void CConfig::addShortListOption(const string& name, unsigned short & size, short * & option_field) { assert(option_map.find(name) == option_map.end()); all_options.insert(pair(name, true)); COptionBase* val = new COptionShortList(name, size, option_field); - option_map.insert(pair(name, val)); + option_map.insert(pair(name, val)); } -void CConfig::addUShortListOption(const string& name, unsigned short& size, unsigned short*& option_field) { +void CConfig::addUShortListOption(const string& name, unsigned short & size, unsigned short * & option_field) { assert(option_map.find(name) == option_map.end()); all_options.insert(pair(name, true)); COptionBase* val = new COptionUShortList(name, size, option_field); - option_map.insert(pair(name, val)); + option_map.insert(pair(name, val)); } -void CConfig::addULongListOption(const string& name, unsigned short& size, unsigned long*& option_field) { +void CConfig::addULongListOption(const string& name, unsigned short & size, unsigned long * & option_field) { assert(option_map.find(name) == option_map.end()); all_options.insert(pair(name, true)); COptionBase* val = new COptionULongList(name, size, option_field); - option_map.insert(pair(name, val)); + option_map.insert(pair(name, val)); } -void CConfig::addStringListOption(const string& name, unsigned short& num_marker, string*& option_field) { +void CConfig::addStringListOption(const string& name, unsigned short & num_marker, string* & option_field) { assert(option_map.find(name) == option_map.end()); all_options.insert(pair(name, true)); COptionBase* val = new COptionStringList(name, num_marker, option_field); - option_map.insert(pair(name, val)); + option_map.insert(pair(name, val)); } -void CConfig::addConvectOption(const string& name, unsigned short& space_field, CENTERED& centered_field, - UPWIND& upwind_field) { +void CConfig::addConvectOption(const string& name, unsigned short & space_field, CENTERED & centered_field, UPWIND & upwind_field) { assert(option_map.find(name) == option_map.end()); all_options.insert(pair(name, true)); COptionBase* val = new COptionConvect(name, space_field, centered_field, upwind_field); - option_map.insert(pair(name, val)); + option_map.insert(pair(name, val)); } -void CConfig::addConvectFEMOption(const string& name, unsigned short& space_field, unsigned short& fem_field) { +void CConfig::addConvectFEMOption(const string& name, unsigned short & space_field, unsigned short & fem_field) { assert(option_map.find(name) == option_map.end()); all_options.insert(pair(name, true)); COptionBase* val = new COptionFEMConvect(name, space_field, fem_field); - option_map.insert(pair(name, val)); + option_map.insert(pair(name, val)); } -void CConfig::addMathProblemOption(const string& name, bool& ContinuousAdjoint, const bool& ContinuousAdjoint_default, - bool& DiscreteAdjoint, const bool& DiscreteAdjoint_default, bool& Restart_Flow, - const bool& Restart_Flow_default) { +void CConfig::addMathProblemOption(const string& name, bool & ContinuousAdjoint, const bool & ContinuousAdjoint_default, + bool & DiscreteAdjoint, const bool & DiscreteAdjoint_default, + bool & Restart_Flow, const bool & Restart_Flow_default) { assert(option_map.find(name) == option_map.end()); all_options.insert(pair(name, true)); - COptionBase* val = new COptionMathProblem(name, ContinuousAdjoint, ContinuousAdjoint_default, DiscreteAdjoint, - DiscreteAdjoint_default, Restart_Flow, Restart_Flow_default); - option_map.insert(pair(name, val)); + COptionBase* val = new COptionMathProblem(name, ContinuousAdjoint, ContinuousAdjoint_default, DiscreteAdjoint, DiscreteAdjoint_default, Restart_Flow, Restart_Flow_default); + option_map.insert(pair(name, val)); } -void CConfig::addDVParamOption(const string& name, unsigned short& nDV_field, su2double**& paramDV, string*& FFDTag, - unsigned short*& design_variable) { +void CConfig::addDVParamOption(const string& name, unsigned short & nDV_field, su2double** & paramDV, string* & FFDTag, + unsigned short* & design_variable) { assert(option_map.find(name) == option_map.end()); all_options.insert(pair(name, true)); COptionBase* val = new COptionDVParam(name, nDV_field, paramDV, FFDTag, design_variable); - option_map.insert(pair(name, val)); + option_map.insert(pair(name, val)); } -void CConfig::addDVValueOption(const string& name, unsigned short*& nDVValue_field, su2double**& valueDV, - unsigned short& nDV_field, su2double**& paramDV, unsigned short*& design_variable) { +void CConfig::addDVValueOption(const string& name, unsigned short* & nDVValue_field, su2double** & valueDV, unsigned short & nDV_field, su2double** & paramDV, + unsigned short* & design_variable) { assert(option_map.find(name) == option_map.end()); all_options.insert(pair(name, true)); COptionBase* val = new COptionDVValue(name, nDVValue_field, valueDV, nDV_field, paramDV, design_variable); - option_map.insert(pair(name, val)); + option_map.insert(pair(name, val)); } -void CConfig::addFFDDefOption(const string& name, unsigned short& nFFD_field, su2double**& coordFFD, string*& FFDTag) { +void CConfig::addFFDDefOption(const string& name, unsigned short & nFFD_field, su2double** & coordFFD, string* & FFDTag) { assert(option_map.find(name) == option_map.end()); all_options.insert(pair(name, true)); COptionBase* val = new COptionFFDDef(name, nFFD_field, coordFFD, FFDTag); - option_map.insert(pair(name, val)); + option_map.insert(pair(name, val)); } -void CConfig::addFFDDegreeOption(const string& name, unsigned short& nFFD_field, unsigned short**& degreeFFD) { +void CConfig::addFFDDegreeOption(const string& name, unsigned short & nFFD_field, unsigned short** & degreeFFD) { assert(option_map.find(name) == option_map.end()); all_options.insert(pair(name, true)); COptionBase* val = new COptionFFDDegree(name, nFFD_field, degreeFFD); - option_map.insert(pair(name, val)); + option_map.insert(pair(name, val)); } -void CConfig::addStringDoubleListOption(const string& name, unsigned short& list_size, string*& string_field, - su2double*& double_field) { +void CConfig::addStringDoubleListOption(const string& name, unsigned short & list_size, string * & string_field, + su2double* & double_field) { assert(option_map.find(name) == option_map.end()); all_options.insert(pair(name, true)); COptionBase* val = new COptionStringValuesList(name, list_size, string_field, double_field); - option_map.insert(pair(name, val)); + option_map.insert(pair(name, val)); } -void CConfig::addInletOption(const string& name, unsigned short& nMarker_Inlet, string*& Marker_Inlet, - su2double*& Ttotal, su2double*& Ptotal, su2double**& FlowDir) { +void CConfig::addInletOption(const string& name, unsigned short & nMarker_Inlet, string * & Marker_Inlet, + su2double* & Ttotal, su2double* & Ptotal, su2double** & FlowDir) { assert(option_map.find(name) == option_map.end()); all_options.insert(pair(name, true)); COptionBase* val = new COptionInlet(name, nMarker_Inlet, Marker_Inlet, Ttotal, Ptotal, FlowDir); - option_map.insert(pair(name, val)); + option_map.insert(pair(name, val)); } -void CConfig::addInletSpeciesOption(const string& name, unsigned short& nMarker_Inlet_Species, - string*& Marker_Inlet_Species, su2double**& inlet_species_val, - unsigned short& nSpecies_per_Inlet) { +void CConfig::addInletSpeciesOption(const string& name, unsigned short & nMarker_Inlet_Species, + string * & Marker_Inlet_Species, su2double** & inlet_species_val, + unsigned short & nSpecies_per_Inlet) { assert(option_map.find(name) == option_map.end()); all_options.insert(pair(name, true)); COptionBase* val = new COptionStringValuesList(name, nMarker_Inlet_Species, Marker_Inlet_Species, inlet_species_val, nSpecies_per_Inlet); - option_map.insert(pair(name, val)); + option_map.insert(pair(name, val)); } void CConfig::addInletTurbOption(const string& name, unsigned short& nMarker_Inlet_Turb, string*& Marker_Inlet_Turb, @@ -484,87 +504,83 @@ void CConfig::addInletTurbOption(const string& name, unsigned short& nMarker_Inl } template -void CConfig::addRiemannOption(const string name, unsigned short& nMarker_Riemann, string*& Marker_Riemann, - unsigned short*& option_field, const map& enum_map, su2double*& var1, - su2double*& var2, su2double**& FlowDir) { +void CConfig::addRiemannOption(const string name, unsigned short & nMarker_Riemann, string * & Marker_Riemann, unsigned short* & option_field, const map & enum_map, + su2double* & var1, su2double* & var2, su2double** & FlowDir) { assert(option_map.find(name) == option_map.end()); all_options.insert(pair(name, true)); - COptionBase* val = - new COptionRiemann(name, nMarker_Riemann, Marker_Riemann, option_field, enum_map, var1, var2, FlowDir); - option_map.insert(pair(name, val)); + COptionBase* val = new COptionRiemann(name, nMarker_Riemann, Marker_Riemann, option_field, enum_map, var1, var2, FlowDir); + option_map.insert(pair(name, val)); } template -void CConfig::addGilesOption(const string name, unsigned short& nMarker_Giles, string*& Marker_Giles, - unsigned short*& option_field, const map& enum_map, su2double*& var1, - su2double*& var2, su2double**& FlowDir, su2double*& relaxfactor1, - su2double*& relaxfactor2) { +void CConfig::addGilesOption(const string name, unsigned short & nMarker_Giles, string * & Marker_Giles, unsigned short* & option_field, const map & enum_map, + su2double* & var1, su2double* & var2, su2double** & FlowDir, su2double* & relaxfactor1, su2double* & relaxfactor2) { assert(option_map.find(name) == option_map.end()); all_options.insert(pair(name, true)); - COptionBase* val = new COptionGiles(name, nMarker_Giles, Marker_Giles, option_field, enum_map, var1, var2, - FlowDir, relaxfactor1, relaxfactor2); - option_map.insert(pair(name, val)); + COptionBase* val = new COptionGiles(name, nMarker_Giles, Marker_Giles, option_field, enum_map, var1, var2, FlowDir, relaxfactor1, relaxfactor2); + option_map.insert(pair(name, val)); } -void CConfig::addExhaustOption(const string& name, unsigned short& nMarker_Exhaust, string*& Marker_Exhaust, - su2double*& Ttotal, su2double*& Ptotal) { +void CConfig::addExhaustOption(const string& name, unsigned short & nMarker_Exhaust, string * & Marker_Exhaust, + su2double* & Ttotal, su2double* & Ptotal) { assert(option_map.find(name) == option_map.end()); all_options.insert(pair(name, true)); COptionBase* val = new COptionExhaust(name, nMarker_Exhaust, Marker_Exhaust, Ttotal, Ptotal); - option_map.insert(pair(name, val)); + option_map.insert(pair(name, val)); } -void CConfig::addPeriodicOption(const string& name, unsigned short& nMarker_PerBound, string*& Marker_PerBound, - string*& Marker_PerDonor, su2double**& RotCenter, su2double**& RotAngles, - su2double**& Translation) { +void CConfig::addPeriodicOption(const string & name, unsigned short & nMarker_PerBound, + string* & Marker_PerBound, string* & Marker_PerDonor, + su2double** & RotCenter, su2double** & RotAngles, su2double** & Translation) { assert(option_map.find(name) == option_map.end()); all_options.insert(pair(name, true)); - COptionBase* val = - new COptionPeriodic(name, nMarker_PerBound, Marker_PerBound, Marker_PerDonor, RotCenter, RotAngles, Translation); - option_map.insert(pair(name, val)); + COptionBase* val = new COptionPeriodic(name, nMarker_PerBound, Marker_PerBound, Marker_PerDonor, RotCenter, RotAngles, Translation); + option_map.insert(pair(name, val)); } -void CConfig::addTurboPerfOption(const string& name, unsigned short& nMarker_TurboPerf, string*& Marker_TurboBoundIn, - string*& Marker_TurboBoundOut) { +void CConfig::addTurboPerfOption(const string & name, unsigned short & nMarker_TurboPerf, + string* & Marker_TurboBoundIn, string* & Marker_TurboBoundOut) { assert(option_map.find(name) == option_map.end()); all_options.insert(pair(name, true)); COptionBase* val = new COptionTurboPerformance(name, nMarker_TurboPerf, Marker_TurboBoundIn, Marker_TurboBoundOut); - option_map.insert(pair(name, val)); + option_map.insert(pair(name, val)); } -void CConfig::addActDiskOption(const string& name, unsigned short& nMarker_ActDiskInlet, - unsigned short& nMarker_ActDiskOutlet, string*& Marker_ActDiskInlet, - string*& Marker_ActDiskOutlet, su2double**& ActDisk_PressJump, - su2double**& ActDisk_TempJump, su2double**& ActDisk_Omega) { +void CConfig::addActDiskOption(const string & name, unsigned short & nMarker_ActDiskInlet, + unsigned short & nMarker_ActDiskOutlet, string* & Marker_ActDiskInlet, + string* & Marker_ActDiskOutlet, su2double** & ActDisk_PressJump, + su2double** & ActDisk_TempJump, su2double** & ActDisk_Omega) { assert(option_map.find(name) == option_map.end()); all_options.insert(pair(name, true)); COptionBase* val = new COptionActDisk(name, nMarker_ActDiskInlet, nMarker_ActDiskOutlet, Marker_ActDiskInlet, Marker_ActDiskOutlet, ActDisk_PressJump, ActDisk_TempJump, ActDisk_Omega); - option_map.insert(pair(name, val)); + option_map.insert(pair(name, val)); } -void CConfig::addWallFunctionOption(const string& name, unsigned short& list_size, string*& string_field, - WALL_FUNCTIONS*& val_Kind_WF, unsigned short**& val_IntInfo_WF, - su2double**& val_DoubleInfo_WF) { +void CConfig::addWallFunctionOption(const string &name, unsigned short &list_size, string* &string_field, + WALL_FUNCTIONS* &val_Kind_WF, unsigned short** &val_IntInfo_WF, + su2double** &val_DoubleInfo_WF) { assert(option_map.find(name) == option_map.end()); all_options.insert(pair(name, true)); - COptionBase* val = - new COptionWallFunction(name, list_size, string_field, val_Kind_WF, val_IntInfo_WF, val_DoubleInfo_WF); - option_map.insert(pair(name, val)); + COptionBase* val = new COptionWallFunction(name, list_size, string_field, val_Kind_WF, + val_IntInfo_WF, val_DoubleInfo_WF); + option_map.insert(pair(name, val)); } void CConfig::addPythonOption(const string& name) { assert(option_map.find(name) == option_map.end()); all_options.insert(pair(name, true)); COptionBase* val = new COptionPython(name); - option_map.insert(pair(name, val)); + option_map.insert(pair(name, val)); } unsigned short CConfig::GetnZone(const string& val_mesh_filename, unsigned short val_format) { + int nZone = 1; /* Default value if nothing is specified. */ switch (val_format) { case SU2: { + /*--- Local variables for reading the SU2 file. ---*/ string text_line; ifstream mesh_file; @@ -572,32 +588,35 @@ unsigned short CConfig::GetnZone(const string& val_mesh_filename, unsigned short /*--- Check if the mesh file can be opened for reading. ---*/ mesh_file.open(val_mesh_filename.c_str(), ios::in); if (mesh_file.fail()) - SU2_MPI::Error(string("There is no geometry file called ") + val_mesh_filename, CURRENT_FUNCTION); + SU2_MPI::Error(string("There is no geometry file called ") + val_mesh_filename, + CURRENT_FUNCTION); /*--- Read the SU2 mesh file until the zone data is reached or when it can be decided that it is not present. ---*/ - while (getline(mesh_file, text_line)) { + while( getline (mesh_file, text_line) ) { + /*--- Search for the "NZONE" keyword to see if there are multiple Zones ---*/ - if (text_line.find("NZONE=", 0) != string::npos) { - text_line.erase(0, 6); - nZone = atoi(text_line.c_str()); + if(text_line.find ("NZONE=",0) != string::npos) { + text_line.erase (0,6); nZone = atoi(text_line.c_str()); break; } /*--- If one of the keywords IZONE, NELEM or NPOIN, NMARK is encountered, it can be assumed that the NZONE keyword is not present and the loop can be terminated. ---*/ - if (text_line.find("IZONE=", 0) != string::npos) break; - if (text_line.find("NELEM=", 0) != string::npos) break; - if (text_line.find("NPOIN=", 0) != string::npos) break; - if (text_line.find("NMARK=", 0) != string::npos) break; + if(text_line.find ("IZONE=",0) != string::npos) break; + if(text_line.find ("NELEM=",0) != string::npos) break; + if(text_line.find ("NPOIN=",0) != string::npos) break; + if(text_line.find ("NMARK=",0) != string::npos) break; } mesh_file.close(); break; + } case CGNS_GRID: { + #ifdef HAVE_CGNS /*--- Local variables which are needed when calling the CGNS mid-level API. ---*/ @@ -608,9 +627,10 @@ unsigned short CConfig::GetnZone(const string& val_mesh_filename, unsigned short /*--- Check whether the supplied file is truly a CGNS file. ---*/ - if (cg_is_cgns(val_mesh_filename.c_str(), &file_type) != CG_OK) { - SU2_MPI::Error(val_mesh_filename + string(" was not found or is not a properly formatted CGNS file.\n") + - string("Note that SU2 expects unstructured CGNS files in ADF data format."), + if ( cg_is_cgns(val_mesh_filename.c_str(), &file_type) != CG_OK ) { + SU2_MPI::Error(val_mesh_filename + + string(" was not found or is not a properly formatted CGNS file.\n") + + string("Note that SU2 expects unstructured CGNS files in ADF data format."), CURRENT_FUNCTION); } @@ -629,30 +649,34 @@ unsigned short CConfig::GetnZone(const string& val_mesh_filename, unsigned short error if there is because this reader can currently only handle one database. ---*/ - if (nbases > 1) { - SU2_MPI::Error("CGNS reader currently incapable of handling more than 1 database.", CURRENT_FUNCTION); + if ( nbases > 1 ) { + SU2_MPI::Error("CGNS reader currently incapable of handling more than 1 database." , + CURRENT_FUNCTION); } /*--- Read the databases. Note that the indexing starts at 1. ---*/ - for (int i = 1; i <= nbases; i++) { + for ( int i = 1; i <= nbases; i++ ) { + if (cg_base_read(fn, i, basename, &cell_dim, &phys_dim)) cg_error_exit(); /*--- Get the number of zones for this base. ---*/ if (cg_nzones(fn, i, &nzones)) cg_error_exit(); + } /*--- Close the CGNS file. ---*/ - if (cg_close(fn)) cg_error_exit(); + if ( cg_close(fn) ) cg_error_exit(); /*--- Set the number of zones as read from the CGNS file ---*/ nZone = nzones; #else - SU2_MPI::Error(string(" SU2 built without CGNS support. \n") + string(" To use CGNS, build SU2 accordingly."), + SU2_MPI::Error(string(" SU2 built without CGNS support. \n") + + string(" To use CGNS, build SU2 accordingly."), CURRENT_FUNCTION); #endif @@ -668,14 +692,17 @@ unsigned short CConfig::GetnZone(const string& val_mesh_filename, unsigned short } } - return (unsigned short)nZone; + return (unsigned short) nZone; + } unsigned short CConfig::GetnDim(const string& val_mesh_filename, unsigned short val_format) { + short nDim = -1; switch (val_format) { case SU2: { + /*--- Local variables for reading the SU2 file. ---*/ string text_line; ifstream mesh_file; @@ -683,43 +710,41 @@ unsigned short CConfig::GetnDim(const string& val_mesh_filename, unsigned short /*--- Open grid file ---*/ mesh_file.open(val_mesh_filename.c_str(), ios::in); if (mesh_file.fail()) { - SU2_MPI::Error(string("The SU2 mesh file named ") + val_mesh_filename + string(" was not found."), - CURRENT_FUNCTION); + SU2_MPI::Error(string("The SU2 mesh file named ") + val_mesh_filename + string(" was not found."), CURRENT_FUNCTION); } /*--- Read the SU2 mesh file until the dimension data is reached or when it can be decided that it is not present. ---*/ - while (getline(mesh_file, text_line)) { + while( getline (mesh_file, text_line) ) { + /*--- Search for the "NDIME" keyword to determine the number of dimensions. ---*/ - if (text_line.find("NDIME=", 0) != string::npos) { - text_line.erase(0, 6); - nDim = atoi(text_line.c_str()); + if(text_line.find ("NDIME=",0) != string::npos) { + text_line.erase (0,6); nDim = atoi(text_line.c_str()); break; } /*--- If one of the keywords NELEM or NPOIN, NMARK is encountered, it can be assumed that the NZONE keyword is not present and the loop can be terminated. ---*/ - if (text_line.find("NELEM=", 0) != string::npos) break; - if (text_line.find("NPOIN=", 0) != string::npos) break; - if (text_line.find("NMARK=", 0) != string::npos) break; + if(text_line.find ("NELEM=",0) != string::npos) break; + if(text_line.find ("NPOIN=",0) != string::npos) break; + if(text_line.find ("NMARK=",0) != string::npos) break; } mesh_file.close(); /*--- Throw an error if the dimension was not found. ---*/ if (nDim == -1) { - SU2_MPI::Error( - val_mesh_filename + - string(" is not an SU2 mesh file or has the wrong format \n ('NDIME=' not found). Please check."), - CURRENT_FUNCTION); + SU2_MPI::Error(val_mesh_filename + string(" is not an SU2 mesh file or has the wrong format \n ('NDIME=' not found). Please check."), + CURRENT_FUNCTION); } break; } case CGNS_GRID: { + #ifdef HAVE_CGNS /*--- Local variables which are needed when calling the CGNS mid-level API. ---*/ @@ -728,9 +753,10 @@ unsigned short CConfig::GetnDim(const string& val_mesh_filename, unsigned short char basename[CGNS_STRING_SIZE]; /*--- Check whether the supplied file is truly a CGNS file. ---*/ - if (cg_is_cgns(val_mesh_filename.c_str(), &file_type) != CG_OK) { - SU2_MPI::Error(val_mesh_filename + string(" was not found or is not a properly formatted CGNS file.\n") + - string("Note that SU2 expects unstructured CGNS files in ADF data format."), + if ( cg_is_cgns(val_mesh_filename.c_str(), &file_type) != CG_OK ) { + SU2_MPI::Error(val_mesh_filename + + string(" was not found or is not a properly formatted CGNS file.\n") + + string("Note that SU2 expects unstructured CGNS files in ADF data format."), CURRENT_FUNCTION); } @@ -746,8 +772,9 @@ unsigned short CConfig::GetnDim(const string& val_mesh_filename, unsigned short /*--- Check if there is more than one database. Throw an error if there is because this reader can currently only handle one database. ---*/ - if (nbases > 1) - SU2_MPI::Error("CGNS reader currently incapable of handling more than 1 database.", CURRENT_FUNCTION); + if ( nbases > 1 ) + SU2_MPI::Error("CGNS reader currently incapable of handling more than 1 database." , + CURRENT_FUNCTION); /*--- Read the database. Note that the indexing starts at 1. Afterwards close the file again. ---*/ @@ -758,7 +785,8 @@ unsigned short CConfig::GetnDim(const string& val_mesh_filename, unsigned short nDim = cell_dim; #else - SU2_MPI::Error(string(" SU2 built without CGNS support. \n") + string(" To use CGNS, build SU2 accordingly."), + SU2_MPI::Error(string(" SU2 built without CGNS support. \n") + + string(" To use CGNS, build SU2 accordingly."), CURRENT_FUNCTION); #endif @@ -777,326 +805,192 @@ unsigned short CConfig::GetnDim(const string& val_mesh_filename, unsigned short /*--- After reading the mesh, assert that the dimension is equal to 2 or 3. ---*/ assert((nDim == 2) || (nDim == 3)); - return (unsigned short)nDim; + return (unsigned short) nDim; } void CConfig::SetPointersNull() { - Marker_CfgFile_GeoEval = nullptr; - Marker_All_GeoEval = nullptr; - Marker_CfgFile_Monitoring = nullptr; - Marker_All_Monitoring = nullptr; - Marker_CfgFile_Designing = nullptr; - Marker_All_Designing = nullptr; - Marker_CfgFile_Plotting = nullptr; - Marker_All_Plotting = nullptr; - Marker_CfgFile_Analyze = nullptr; - Marker_All_Analyze = nullptr; - Marker_CfgFile_DV = nullptr; - Marker_All_DV = nullptr; - Marker_CfgFile_Moving = nullptr; - Marker_All_Moving = nullptr; - Marker_CfgFile_PerBound = nullptr; - Marker_All_PerBound = nullptr; - Marker_PerBound = nullptr; - Marker_CfgFile_Turbomachinery = nullptr; - Marker_All_Turbomachinery = nullptr; - Marker_CfgFile_TurbomachineryFlag = nullptr; - Marker_All_TurbomachineryFlag = nullptr; - Marker_CfgFile_MixingPlaneInterface = nullptr; - Marker_All_MixingPlaneInterface = nullptr; + + Marker_CfgFile_GeoEval = nullptr; Marker_All_GeoEval = nullptr; + Marker_CfgFile_Monitoring = nullptr; Marker_All_Monitoring = nullptr; + Marker_CfgFile_Designing = nullptr; Marker_All_Designing = nullptr; + Marker_CfgFile_Plotting = nullptr; Marker_All_Plotting = nullptr; + Marker_CfgFile_Analyze = nullptr; Marker_All_Analyze = nullptr; + Marker_CfgFile_DV = nullptr; Marker_All_DV = nullptr; + Marker_CfgFile_Moving = nullptr; Marker_All_Moving = nullptr; + Marker_CfgFile_PerBound = nullptr; Marker_All_PerBound = nullptr; Marker_PerBound = nullptr; + Marker_CfgFile_Turbomachinery = nullptr; Marker_All_Turbomachinery = nullptr; + Marker_CfgFile_TurbomachineryFlag = nullptr; Marker_All_TurbomachineryFlag = nullptr; + Marker_CfgFile_MixingPlaneInterface = nullptr; Marker_All_MixingPlaneInterface = nullptr; Marker_CfgFile_ZoneInterface = nullptr; - Marker_CfgFile_Deform_Mesh = nullptr; - Marker_All_Deform_Mesh = nullptr; - Marker_CfgFile_Deform_Mesh_Sym_Plane = nullptr; - Marker_All_Deform_Mesh_Sym_Plane = nullptr; - Marker_CfgFile_Fluid_Load = nullptr; - Marker_All_Fluid_Load = nullptr; - Marker_CfgFile_SobolevBC = nullptr; - Marker_All_SobolevBC = nullptr; - - Marker_CfgFile_Turbomachinery = nullptr; - Marker_All_Turbomachinery = nullptr; - Marker_CfgFile_TurbomachineryFlag = nullptr; - Marker_All_TurbomachineryFlag = nullptr; - Marker_CfgFile_MixingPlaneInterface = nullptr; - Marker_All_MixingPlaneInterface = nullptr; - - Marker_CfgFile_PyCustom = nullptr; - Marker_All_PyCustom = nullptr; - - Marker_DV = nullptr; - Marker_Moving = nullptr; - Marker_Monitoring = nullptr; - Marker_Designing = nullptr; - Marker_GeoEval = nullptr; - Marker_Plotting = nullptr; - Marker_Analyze = nullptr; - Marker_PyCustom = nullptr; - Marker_WallFunctions = nullptr; - Marker_CfgFile_KindBC = nullptr; - Marker_All_KindBC = nullptr; - Marker_SobolevBC = nullptr; - Marker_StrongBC = nullptr; - - Kind_WallFunctions = nullptr; - IntInfo_WallFunctions = nullptr; + Marker_CfgFile_Deform_Mesh = nullptr; Marker_All_Deform_Mesh = nullptr; + Marker_CfgFile_Deform_Mesh_Sym_Plane = nullptr; Marker_All_Deform_Mesh_Sym_Plane = nullptr; + Marker_CfgFile_Fluid_Load = nullptr; Marker_All_Fluid_Load = nullptr; + Marker_CfgFile_SobolevBC = nullptr; Marker_All_SobolevBC = nullptr; + + Marker_CfgFile_Turbomachinery = nullptr; Marker_All_Turbomachinery = nullptr; + Marker_CfgFile_TurbomachineryFlag = nullptr; Marker_All_TurbomachineryFlag = nullptr; + Marker_CfgFile_MixingPlaneInterface = nullptr; Marker_All_MixingPlaneInterface = nullptr; + + Marker_CfgFile_PyCustom = nullptr; Marker_All_PyCustom = nullptr; + + Marker_DV = nullptr; Marker_Moving = nullptr; Marker_Monitoring = nullptr; + Marker_Designing = nullptr; Marker_GeoEval = nullptr; Marker_Plotting = nullptr; + Marker_Analyze = nullptr; Marker_PyCustom = nullptr; Marker_WallFunctions = nullptr; + Marker_CfgFile_KindBC = nullptr; Marker_All_KindBC = nullptr; Marker_SobolevBC = nullptr; + Marker_StrongBC = nullptr; + + Kind_WallFunctions = nullptr; + IntInfo_WallFunctions = nullptr; DoubleInfo_WallFunctions = nullptr; Config_Filenames = nullptr; /*--- Marker Pointers ---*/ - Marker_Euler = nullptr; - Marker_FarField = nullptr; - Marker_Custom = nullptr; - Marker_SymWall = nullptr; - Marker_PerBound = nullptr; - Marker_PerDonor = nullptr; - Marker_NearFieldBound = nullptr; - Marker_Inlet_Turb = nullptr; - Marker_Deform_Mesh = nullptr; - Marker_Deform_Mesh_Sym_Plane = nullptr; - Marker_Fluid_Load = nullptr; - Marker_Inlet = nullptr; - Marker_Outlet = nullptr; - Marker_Inlet_Species = nullptr; - Marker_Supersonic_Inlet = nullptr; - Marker_Supersonic_Outlet = nullptr; - Marker_Smoluchowski_Maxwell = nullptr; - Marker_Isothermal = nullptr; - Marker_HeatFlux = nullptr; - Marker_EngineInflow = nullptr; - Marker_Load = nullptr; - Marker_Disp_Dir = nullptr; - Marker_RoughWall = nullptr; - Marker_EngineExhaust = nullptr; - Marker_Displacement = nullptr; - Marker_Load = nullptr; - Marker_Load_Dir = nullptr; - Marker_Clamped = nullptr; - Marker_Internal = nullptr; - Marker_All_TagBound = nullptr; - Marker_CfgFile_TagBound = nullptr; - Marker_All_KindBC = nullptr; - Marker_CfgFile_KindBC = nullptr; - Marker_All_SendRecv = nullptr; - Marker_All_PerBound = nullptr; - Marker_ZoneInterface = nullptr; - Marker_All_ZoneInterface = nullptr; - Marker_Riemann = nullptr; - Marker_Fluid_InterfaceBound = nullptr; - Marker_CHTInterface = nullptr; - Marker_Damper = nullptr; - Marker_Emissivity = nullptr; - Marker_HeatTransfer = nullptr; - - /*--- Boundary Condition settings ---*/ - - Isothermal_Temperature = nullptr; - HeatTransfer_Coeff = nullptr; - HeatTransfer_WallTemp = nullptr; - Heat_Flux = nullptr; - Displ_Value = nullptr; - Load_Value = nullptr; - Damper_Constant = nullptr; - Wall_Emissivity = nullptr; - Roughness_Height = nullptr; + Marker_Euler = nullptr; Marker_FarField = nullptr; Marker_Custom = nullptr; + Marker_SymWall = nullptr; Marker_PerBound = nullptr; + Marker_PerDonor = nullptr; Marker_NearFieldBound = nullptr; Marker_Inlet_Turb = nullptr; + Marker_Deform_Mesh = nullptr; Marker_Deform_Mesh_Sym_Plane= nullptr; Marker_Fluid_Load = nullptr; + Marker_Inlet = nullptr; Marker_Outlet = nullptr; Marker_Inlet_Species = nullptr; + Marker_Supersonic_Inlet = nullptr; Marker_Supersonic_Outlet = nullptr; Marker_Smoluchowski_Maxwell= nullptr; + Marker_Isothermal = nullptr; Marker_HeatFlux = nullptr; Marker_EngineInflow = nullptr; + Marker_Load = nullptr; Marker_Disp_Dir = nullptr; Marker_RoughWall = nullptr; + Marker_EngineExhaust = nullptr; Marker_Displacement = nullptr; Marker_Load = nullptr; + Marker_Load_Dir = nullptr; Marker_Clamped = nullptr; + Marker_Internal = nullptr; + Marker_All_TagBound = nullptr; Marker_CfgFile_TagBound = nullptr; Marker_All_KindBC = nullptr; + Marker_CfgFile_KindBC = nullptr; Marker_All_SendRecv = nullptr; Marker_All_PerBound = nullptr; + Marker_ZoneInterface = nullptr; Marker_All_ZoneInterface = nullptr; Marker_Riemann = nullptr; + Marker_Fluid_InterfaceBound = nullptr; Marker_CHTInterface = nullptr; Marker_Damper = nullptr; + Marker_Emissivity = nullptr; Marker_HeatTransfer = nullptr; + + /*--- Boundary Condition settings ---*/ + + Isothermal_Temperature = nullptr; HeatTransfer_Coeff = nullptr; HeatTransfer_WallTemp = nullptr; + Heat_Flux = nullptr; Displ_Value = nullptr; Load_Value = nullptr; + Damper_Constant = nullptr; Wall_Emissivity = nullptr; + Roughness_Height = nullptr; /*--- Inlet Outlet Boundary Condition settings ---*/ - Inlet_Ttotal = nullptr; - Inlet_Ptotal = nullptr; - Inlet_FlowDir = nullptr; - Inlet_Temperature = nullptr; - Inlet_Pressure = nullptr; - Inlet_Velocity = nullptr; - Outlet_Pressure = nullptr; - Inlet_SpeciesVal = nullptr; - Inlet_TurbVal = nullptr; + Inlet_Ttotal = nullptr; Inlet_Ptotal = nullptr; + Inlet_FlowDir = nullptr; Inlet_Temperature = nullptr; Inlet_Pressure = nullptr; + Inlet_Velocity = nullptr; + Outlet_Pressure = nullptr; Inlet_SpeciesVal = nullptr; Inlet_TurbVal = nullptr; /*--- Engine Boundary Condition settings ---*/ - Inflow_Pressure = nullptr; - Inflow_MassFlow = nullptr; - Inflow_ReverseMassFlow = nullptr; - Inflow_TotalPressure = nullptr; - Inflow_Temperature = nullptr; - Inflow_TotalTemperature = nullptr; - Inflow_RamDrag = nullptr; - Inflow_Force = nullptr; - Inflow_Power = nullptr; - Inflow_Mach = nullptr; - - Exhaust_Pressure = nullptr; - Exhaust_Temperature = nullptr; - Exhaust_MassFlow = nullptr; - Exhaust_TotalPressure = nullptr; - Exhaust_TotalTemperature = nullptr; - Exhaust_GrossThrust = nullptr; - Exhaust_Force = nullptr; - Exhaust_Power = nullptr; - Exhaust_Temperature_Target = nullptr; - Exhaust_Pressure_Target = nullptr; + Inflow_Pressure = nullptr; Inflow_MassFlow = nullptr; Inflow_ReverseMassFlow = nullptr; + Inflow_TotalPressure = nullptr; Inflow_Temperature = nullptr; Inflow_TotalTemperature = nullptr; + Inflow_RamDrag = nullptr; Inflow_Force = nullptr; Inflow_Power = nullptr; + Inflow_Mach = nullptr; - Engine_Mach = nullptr; - Engine_Force = nullptr; - Engine_Power = nullptr; - Engine_NetThrust = nullptr; - Engine_GrossThrust = nullptr; - Engine_Area = nullptr; - EngineInflow_Target = nullptr; - - Exhaust_Temperature_Target = nullptr; - Exhaust_Temperature = nullptr; - Exhaust_Pressure = nullptr; + Exhaust_Pressure = nullptr; Exhaust_Temperature = nullptr; Exhaust_MassFlow = nullptr; + Exhaust_TotalPressure = nullptr; Exhaust_TotalTemperature = nullptr; + Exhaust_GrossThrust = nullptr; Exhaust_Force = nullptr; + Exhaust_Power = nullptr; Exhaust_Temperature_Target = nullptr; Exhaust_Pressure_Target = nullptr; - Inlet_Ttotal = nullptr; - Inlet_Ptotal = nullptr; - Inlet_FlowDir = nullptr; - Inlet_Temperature = nullptr; - Inlet_Pressure = nullptr; - Inlet_Velocity = nullptr; - Inflow_Mach = nullptr; - Inflow_Pressure = nullptr; - Outlet_Pressure = nullptr; - Isothermal_Temperature = nullptr; - - ElasticityMod = nullptr; - PoissonRatio = nullptr; - MaterialDensity = nullptr; - - Load_Dir = nullptr; - Load_Dir_Value = nullptr; - Load_Dir_Multiplier = nullptr; - Disp_Dir = nullptr; - Disp_Dir_Value = nullptr; - Disp_Dir_Multiplier = nullptr; - Electric_Field_Mod = nullptr; - Electric_Field_Dir = nullptr; - RefNode_Displacement = nullptr; + + Engine_Mach = nullptr; Engine_Force = nullptr; + Engine_Power = nullptr; Engine_NetThrust = nullptr; Engine_GrossThrust = nullptr; + Engine_Area = nullptr; EngineInflow_Target = nullptr; + + Exhaust_Temperature_Target = nullptr; Exhaust_Temperature = nullptr; Exhaust_Pressure = nullptr; + Exhaust_Pressure_Target = nullptr; Inlet_Ttotal = nullptr; Inlet_Ptotal = nullptr; + Inlet_FlowDir = nullptr; Inlet_Temperature = nullptr; Inlet_Pressure = nullptr; + Inlet_Velocity = nullptr; Inflow_Mach = nullptr; Inflow_Pressure = nullptr; + Outlet_Pressure = nullptr; Isothermal_Temperature = nullptr; + + ElasticityMod = nullptr; PoissonRatio = nullptr; MaterialDensity = nullptr; + + Load_Dir = nullptr; Load_Dir_Value = nullptr; Load_Dir_Multiplier = nullptr; + Disp_Dir = nullptr; Disp_Dir_Value = nullptr; Disp_Dir_Multiplier = nullptr; + Electric_Field_Mod = nullptr; Electric_Field_Dir = nullptr; RefNode_Displacement = nullptr; Electric_Constant = nullptr; /*--- Actuator Disk Boundary Condition settings ---*/ - ActDiskInlet_Pressure = nullptr; - ActDiskInlet_TotalPressure = nullptr; - ActDiskInlet_Temperature = nullptr; - ActDiskInlet_TotalTemperature = nullptr; - ActDiskInlet_MassFlow = nullptr; - ActDiskInlet_RamDrag = nullptr; - ActDiskInlet_Force = nullptr; - ActDiskInlet_Power = nullptr; - - ActDiskOutlet_Pressure = nullptr; - ActDiskOutlet_TotalPressure = nullptr; - ActDiskOutlet_GrossThrust = nullptr; - ActDiskOutlet_Force = nullptr; - ActDiskOutlet_Power = nullptr; - ActDiskOutlet_Temperature = nullptr; - ActDiskOutlet_TotalTemperature = nullptr; - ActDiskOutlet_MassFlow = nullptr; - - ActDisk_DeltaPress = nullptr; - ActDisk_DeltaTemp = nullptr; - ActDisk_TotalPressRatio = nullptr; - ActDisk_TotalTempRatio = nullptr; - ActDisk_StaticPressRatio = nullptr; - ActDisk_StaticTempRatio = nullptr; - ActDisk_NetThrust = nullptr; - ActDisk_GrossThrust = nullptr; - ActDisk_Power = nullptr; - ActDisk_MassFlow = nullptr; - ActDisk_Area = nullptr; - ActDisk_ReverseMassFlow = nullptr; - Surface_MassFlow = nullptr; - Surface_Mach = nullptr; - Surface_Temperature = nullptr; - Surface_Pressure = nullptr; - Surface_Density = nullptr; - Surface_Enthalpy = nullptr; - Surface_NormalVelocity = nullptr; - Surface_TotalTemperature = nullptr; - Surface_TotalPressure = nullptr; - Surface_PressureDrop = nullptr; - Surface_DC60 = nullptr; - Surface_IDC = nullptr; - Surface_Species_Variance = nullptr; - Surface_Species_0 = nullptr; - - Outlet_MassFlow = nullptr; - Outlet_Density = nullptr; - Outlet_Area = nullptr; - - Surface_Uniformity = nullptr; - Surface_SecondaryStrength = nullptr; - Surface_SecondOverUniform = nullptr; + ActDiskInlet_Pressure = nullptr; ActDiskInlet_TotalPressure = nullptr; ActDiskInlet_Temperature = nullptr; + ActDiskInlet_TotalTemperature = nullptr; ActDiskInlet_MassFlow = nullptr; ActDiskInlet_RamDrag = nullptr; + ActDiskInlet_Force = nullptr; ActDiskInlet_Power = nullptr; + + ActDiskOutlet_Pressure = nullptr; + ActDiskOutlet_TotalPressure = nullptr; ActDiskOutlet_GrossThrust = nullptr; ActDiskOutlet_Force = nullptr; + ActDiskOutlet_Power = nullptr; ActDiskOutlet_Temperature = nullptr; ActDiskOutlet_TotalTemperature = nullptr; + ActDiskOutlet_MassFlow = nullptr; + + ActDisk_DeltaPress = nullptr; ActDisk_DeltaTemp = nullptr; + ActDisk_TotalPressRatio = nullptr; ActDisk_TotalTempRatio = nullptr; ActDisk_StaticPressRatio = nullptr; + ActDisk_StaticTempRatio = nullptr; ActDisk_NetThrust = nullptr; ActDisk_GrossThrust = nullptr; + ActDisk_Power = nullptr; ActDisk_MassFlow = nullptr; ActDisk_Area = nullptr; + ActDisk_ReverseMassFlow = nullptr; Surface_MassFlow = nullptr; Surface_Mach = nullptr; + Surface_Temperature = nullptr; Surface_Pressure = nullptr; Surface_Density = nullptr; Surface_Enthalpy = nullptr; + Surface_NormalVelocity = nullptr; Surface_TotalTemperature = nullptr; Surface_TotalPressure = nullptr; Surface_PressureDrop = nullptr; + Surface_DC60 = nullptr; Surface_IDC = nullptr; + Surface_Species_Variance = nullptr; Surface_Species_0 = nullptr; + + Outlet_MassFlow = nullptr; Outlet_Density = nullptr; Outlet_Area = nullptr; + + Surface_Uniformity = nullptr; Surface_SecondaryStrength = nullptr; Surface_SecondOverUniform = nullptr; Surface_MomentumDistortion = nullptr; - Surface_IDC_Mach = nullptr; - Surface_IDR = nullptr; - ActDisk_Mach = nullptr; - ActDisk_Force = nullptr; - ActDisk_BCThrust = nullptr; - ActDisk_BCThrust_Old = nullptr; + Surface_IDC_Mach = nullptr; Surface_IDR = nullptr; ActDisk_Mach = nullptr; + ActDisk_Force = nullptr; ActDisk_BCThrust = nullptr; ActDisk_BCThrust_Old = nullptr; /*--- Miscellaneous/unsorted ---*/ - Aeroelastic_plunge = nullptr; - Aeroelastic_pitch = nullptr; + Aeroelastic_plunge = nullptr; + Aeroelastic_pitch = nullptr; - CFL_AdaptParam = nullptr; - CFL = nullptr; - PlaneTag = nullptr; - ParamDV = nullptr; - DV_Value = nullptr; - Design_Variable = nullptr; + CFL_AdaptParam = nullptr; + CFL = nullptr; + PlaneTag = nullptr; + ParamDV = nullptr; + DV_Value = nullptr; + Design_Variable = nullptr; - TimeDOFsADER_DG = nullptr; - TimeIntegrationADER_DG = nullptr; + TimeDOFsADER_DG = nullptr; + TimeIntegrationADER_DG = nullptr; WeightsIntegrationADER_DG = nullptr; - RK_Alpha_Step = nullptr; - MG_CorrecSmooth = nullptr; - MG_PreSmooth = nullptr; - MG_PostSmooth = nullptr; - Int_Coeffs = nullptr; + RK_Alpha_Step = nullptr; + MG_CorrecSmooth = nullptr; + MG_PreSmooth = nullptr; + MG_PostSmooth = nullptr; + Int_Coeffs = nullptr; Kind_Inc_Inlet = nullptr; Kind_Inc_Outlet = nullptr; - Kind_ObjFunc = nullptr; + Kind_ObjFunc = nullptr; Weight_ObjFunc = nullptr; /*--- Species solver pointers. ---*/ - Species_Init = nullptr; - Species_Clipping_Min = nullptr; - Species_Clipping_Max = nullptr; + Species_Init = nullptr; + Species_Clipping_Min = nullptr; + Species_Clipping_Max = nullptr; /*--- Moving mesh pointers ---*/ nKind_SurfaceMovement = 0; Kind_SurfaceMovement = nullptr; - LocationStations = nullptr; - MarkerMotion_Origin = nullptr; - MarkerTranslation_Rate = nullptr; - MarkerRotation_Rate = nullptr; - MarkerPitching_Omega = nullptr; - MarkerPitching_Ampl = nullptr; - MarkerPitching_Phase = nullptr; - MarkerPlunging_Omega = nullptr; - MarkerPlunging_Ampl = nullptr; - RefOriginMoment_X = nullptr; - RefOriginMoment_Y = nullptr; - RefOriginMoment_Z = nullptr; - MoveMotion_Origin = nullptr; + LocationStations = nullptr; + MarkerMotion_Origin = nullptr; + MarkerTranslation_Rate = nullptr; + MarkerRotation_Rate = nullptr; + MarkerPitching_Omega = nullptr; + MarkerPitching_Ampl = nullptr; + MarkerPitching_Phase = nullptr; + MarkerPlunging_Omega = nullptr; + MarkerPlunging_Ampl = nullptr; + RefOriginMoment_X = nullptr; RefOriginMoment_Y = nullptr; RefOriginMoment_Z = nullptr; + MoveMotion_Origin = nullptr; /*--- Periodic BC pointers. ---*/ - Periodic_Translation = nullptr; - Periodic_RotAngles = nullptr; - Periodic_RotCenter = nullptr; + Periodic_Translation= nullptr; Periodic_RotAngles = nullptr; Periodic_RotCenter = nullptr; /* Harmonic Balance Frequency pointer */ @@ -1104,35 +998,35 @@ void CConfig::SetPointersNull() { /*--- Initialize some default arrays to NULL. ---*/ - Riemann_FlowDir = nullptr; - Giles_FlowDir = nullptr; - CoordFFDBox = nullptr; - DegreeFFDBox = nullptr; - FFDTag = nullptr; - nDV_Value = nullptr; - TagFFDBox = nullptr; - - Kind_Data_Riemann = nullptr; - Riemann_Var1 = nullptr; - Riemann_Var2 = nullptr; - Kind_Data_Giles = nullptr; - Giles_Var1 = nullptr; - Giles_Var2 = nullptr; - RelaxFactorAverage = nullptr; - RelaxFactorFourier = nullptr; - nSpan_iZones = nullptr; - Kind_TurboMachinery = nullptr; - - Marker_MixingPlaneInterface = nullptr; - Marker_TurboBoundIn = nullptr; - Marker_TurboBoundOut = nullptr; - Marker_Giles = nullptr; - Marker_Shroud = nullptr; - - nBlades = nullptr; - FreeStreamTurboNormal = nullptr; - - top_optim_kernels = nullptr; + Riemann_FlowDir = nullptr; + Giles_FlowDir = nullptr; + CoordFFDBox = nullptr; + DegreeFFDBox = nullptr; + FFDTag = nullptr; + nDV_Value = nullptr; + TagFFDBox = nullptr; + + Kind_Data_Riemann = nullptr; + Riemann_Var1 = nullptr; + Riemann_Var2 = nullptr; + Kind_Data_Giles = nullptr; + Giles_Var1 = nullptr; + Giles_Var2 = nullptr; + RelaxFactorAverage = nullptr; + RelaxFactorFourier = nullptr; + nSpan_iZones = nullptr; + Kind_TurboMachinery = nullptr; + + Marker_MixingPlaneInterface = nullptr; + Marker_TurboBoundIn = nullptr; + Marker_TurboBoundOut = nullptr; + Marker_Giles = nullptr; + Marker_Shroud = nullptr; + + nBlades = nullptr; + FreeStreamTurboNormal = nullptr; + + top_optim_kernels = nullptr; top_optim_kernel_params = nullptr; top_optim_filter_radius = nullptr; @@ -1145,10 +1039,10 @@ void CConfig::SetPointersNull() { /*--- Variable initialization ---*/ - TimeIter = 0; - InnerIter = 0; + TimeIter = 0; + InnerIter = 0; nIntCoeffs = 0; - OuterIter = 0; + OuterIter = 0; AoA_Offset = 0; AoS_Offset = 0; @@ -1171,9 +1065,11 @@ void CConfig::SetPointersNull() { Total_UnstTimeND = 0.0; Kind_TimeNumScheme = EULER_IMPLICIT; + } void CConfig::SetConfig_Options() { + // This config file is parsed by a number of programs to make it easy to write SU2 // wrapper scripts (in python, go, etc.) so please do // the best you can to follow the established format. It's very hard to parse c++ code @@ -1185,13 +1081,11 @@ void CConfig::SetConfig_Options() { /*!\par CONFIG_CATEGORY: Problem Definition \ingroup Config */ /*--- Options related to problem definition and partitioning ---*/ - /*!\brief SOLVER \n DESCRIPTION: Type of solver \n Options: see \link Solver_Map \endlink \n DEFAULT: NONE \ingroup - * Config*/ + /*!\brief SOLVER \n DESCRIPTION: Type of solver \n Options: see \link Solver_Map \endlink \n DEFAULT: NONE \ingroup Config*/ addEnumOption("SOLVER", Kind_Solver, Solver_Map, MAIN_SOLVER::NONE); /*!\brief MULTIZONE \n DESCRIPTION: Enable multizone mode \ingroup Config*/ addBoolOption("MULTIZONE", Multizone_Problem, NO); - /*!\brief PHYSICAL_PROBLEM \n DESCRIPTION: Physical governing equations \n Options: see \link Solver_Map \endlink \n - * DEFAULT: NONE \ingroup Config*/ + /*!\brief PHYSICAL_PROBLEM \n DESCRIPTION: Physical governing equations \n Options: see \link Solver_Map \endlink \n DEFAULT: NONE \ingroup Config*/ addEnumOption("MULTIZONE_SOLVER", Kind_MZSolver, Multizone_Map, ENUM_MULTIZONE::MZ_BLOCK_GAUSS_SEIDEL); #ifdef CODI_REVERSE_TYPE const bool discAdjDefault = true; @@ -1199,50 +1093,37 @@ void CConfig::SetConfig_Options() { const bool discAdjDefault = false; #endif /*!\brief MATH_PROBLEM \n DESCRIPTION: Mathematical problem \n Options: DIRECT, ADJOINT \ingroup Config*/ - addMathProblemOption("MATH_PROBLEM", ContinuousAdjoint, false, DiscreteAdjoint, discAdjDefault, Restart_Flow, - discAdjDefault); - /*!\brief KIND_TURB_MODEL \n DESCRIPTION: Specify turbulence model \n Options: see \link Turb_Model_Map \endlink \n - * DEFAULT: NONE \ingroup Config*/ + addMathProblemOption("MATH_PROBLEM", ContinuousAdjoint, false, DiscreteAdjoint, discAdjDefault, Restart_Flow, discAdjDefault); + /*!\brief KIND_TURB_MODEL \n DESCRIPTION: Specify turbulence model \n Options: see \link Turb_Model_Map \endlink \n DEFAULT: NONE \ingroup Config*/ addEnumOption("KIND_TURB_MODEL", Kind_Turb_Model, Turb_Model_Map, TURB_MODEL::NONE); - /*!\brief SST_OPTIONS \n DESCRIPTION: Specify SST turbulence model options/corrections. \n Options: see \link - * SST_Options_Map \endlink \n DEFAULT: NONE \ingroup Config*/ + /*!\brief SST_OPTIONS \n DESCRIPTION: Specify SST turbulence model options/corrections. \n Options: see \link SST_Options_Map \endlink \n DEFAULT: NONE \ingroup Config*/ addEnumListOption("SST_OPTIONS", nSST_Options, SST_Options, SST_Options_Map); - /*!\brief SST_OPTIONS \n DESCRIPTION: Specify SA turbulence model options/corrections. \n Options: see \link - * SA_Options_Map \endlink \n DEFAULT: NONE \ingroup Config*/ + /*!\brief SST_OPTIONS \n DESCRIPTION: Specify SA turbulence model options/corrections. \n Options: see \link SA_Options_Map \endlink \n DEFAULT: NONE \ingroup Config*/ addEnumListOption("SA_OPTIONS", nSA_Options, SA_Options, SA_Options_Map); - /*!\brief KIND_TRANS_MODEL \n DESCRIPTION: Specify transition model OPTIONS: see \link Trans_Model_Map \endlink \n - * DEFAULT: NONE \ingroup Config*/ + /*!\brief KIND_TRANS_MODEL \n DESCRIPTION: Specify transition model OPTIONS: see \link Trans_Model_Map \endlink \n DEFAULT: NONE \ingroup Config*/ addEnumOption("KIND_TRANS_MODEL", Kind_Trans_Model, Trans_Model_Map, TURB_TRANS_MODEL::NONE); - /*!\brief SST_OPTIONS \n DESCRIPTION: Specify LM transition model options/correlations. \n Options: see \link - * LM_Options_Map \endlink \n DEFAULT: NONE \ingroup Config*/ + /*!\brief SST_OPTIONS \n DESCRIPTION: Specify LM transition model options/correlations. \n Options: see \link LM_Options_Map \endlink \n DEFAULT: NONE \ingroup Config*/ addEnumListOption("LM_OPTIONS", nLM_Options, LM_Options, LM_Options_Map); /*!\brief HROUGHNESS \n DESCRIPTION: Value of RMS roughness for transition model \n DEFAULT: 1E-6 \ingroup Config*/ addDoubleOption("HROUGHNESS", hRoughness, 1e-6); - /*!\brief KIND_SCALAR_MODEL \n DESCRIPTION: Specify scalar transport model \n Options: see \link Scalar_Model_Map - * \endlink \n DEFAULT: NONE \ingroup Config*/ + /*!\brief KIND_SCALAR_MODEL \n DESCRIPTION: Specify scalar transport model \n Options: see \link Scalar_Model_Map \endlink \n DEFAULT: NONE \ingroup Config*/ addEnumOption("KIND_SCALAR_MODEL", Kind_Species_Model, Species_Model_Map, SPECIES_MODEL::NONE); - /*!\brief KIND_SGS_MODEL \n DESCRIPTION: Specify subgrid scale model OPTIONS: see \link SGS_Model_Map \endlink \n - * DEFAULT: NONE \ingroup Config*/ + /*!\brief KIND_SGS_MODEL \n DESCRIPTION: Specify subgrid scale model OPTIONS: see \link SGS_Model_Map \endlink \n DEFAULT: NONE \ingroup Config*/ addEnumOption("KIND_SGS_MODEL", Kind_SGS_Model, SGS_Model_Map, TURB_SGS_MODEL::NONE); - /*!\brief KIND_FEM_DG_SHOCK \n DESCRIPTION: Specify shock capturing method for DG OPTIONS: see \link - * ShockCapturingDG_Map \endlink \n DEFAULT: NONE \ingroup Config*/ + /*!\brief KIND_FEM_DG_SHOCK \n DESCRIPTION: Specify shock capturing method for DG OPTIONS: see \link ShockCapturingDG_Map \endlink \n DEFAULT: NONE \ingroup Config*/ addEnumOption("KIND_FEM_DG_SHOCK", Kind_FEM_Shock_Capturing_DG, ShockCapturingDG_Map, FEM_SHOCK_CAPTURING_DG::NONE); - /*!\brief KIND_VERIFICATION_SOLUTION \n DESCRIPTION: Specify the verification solution OPTIONS: see \link - * Verification_Solution_Map \endlink \n DEFAULT: NO_VERIFICATION_SOLUTION \ingroup Config*/ - addEnumOption("KIND_VERIFICATION_SOLUTION", Kind_Verification_Solution, Verification_Solution_Map, - VERIFICATION_SOLUTION::NONE); + /*!\brief KIND_VERIFICATION_SOLUTION \n DESCRIPTION: Specify the verification solution OPTIONS: see \link Verification_Solution_Map \endlink \n DEFAULT: NO_VERIFICATION_SOLUTION \ingroup Config*/ + addEnumOption("KIND_VERIFICATION_SOLUTION", Kind_Verification_Solution, Verification_Solution_Map, VERIFICATION_SOLUTION::NONE); - /*!\brief KIND_MATRIX_COLORING \n DESCRIPTION: Specify the method for matrix coloring for Jacobian computations - * OPTIONS: see \link MatrixColoring_Map \endlink \n DEFAULT GREEDY_COLORING \ingroup Config*/ + /*!\brief KIND_MATRIX_COLORING \n DESCRIPTION: Specify the method for matrix coloring for Jacobian computations OPTIONS: see \link MatrixColoring_Map \endlink \n DEFAULT GREEDY_COLORING \ingroup Config*/ addEnumOption("KIND_MATRIX_COLORING", Kind_Matrix_Coloring, MatrixColoring_Map, GREEDY_COLORING); - /*!\brief WEAKLY_COUPLED_HEAT_EQUATION \n DESCRIPTION: Enable heat equation for incompressible flows. \ingroup - * Config*/ + /*!\brief WEAKLY_COUPLED_HEAT_EQUATION \n DESCRIPTION: Enable heat equation for incompressible flows. \ingroup Config*/ addBoolOption("WEAKLY_COUPLED_HEAT_EQUATION", Weakly_Coupled_Heat, NO); /*\brief AXISYMMETRIC \n DESCRIPTION: Axisymmetric simulation \n DEFAULT: false \ingroup Config */ @@ -1253,61 +1134,46 @@ void CConfig::SetConfig_Options() { addBoolOption("VORTICITY_CONFINEMENT", VorticityConfinement, false); /* DESCRIPTION: Apply a body force as a source term (NO, YES) */ addBoolOption("BODY_FORCE", Body_Force, false); - body_force[0] = 0.0; - body_force[1] = 0.0; - body_force[2] = 0.0; + body_force[0] = 0.0; body_force[1] = 0.0; body_force[2] = 0.0; /* DESCRIPTION: Vector of body force values (BodyForce_X, BodyForce_Y, BodyForce_Z) */ addDoubleArrayOption("BODY_FORCE_VECTOR", 3, body_force); - /* DESCRIPTION: Apply a body force as a source term for periodic boundary conditions \n Options: NONE, PRESSURE_DROP, - * MASSFLOW \n DEFAULT: NONE \ingroup Config */ - addEnumOption("KIND_STREAMWISE_PERIODIC", Kind_Streamwise_Periodic, Streamwise_Periodic_Map, - ENUM_STREAMWISE_PERIODIC::NONE); + /* DESCRIPTION: Apply a body force as a source term for periodic boundary conditions \n Options: NONE, PRESSURE_DROP, MASSFLOW \n DEFAULT: NONE \ingroup Config */ + addEnumOption("KIND_STREAMWISE_PERIODIC", Kind_Streamwise_Periodic, Streamwise_Periodic_Map, ENUM_STREAMWISE_PERIODIC::NONE); /* DESCRIPTION: Use real periodicity for temperature \n Options: NO, YES \n DEFAULT: NO \ingroup Config */ addBoolOption("STREAMWISE_PERIODIC_TEMPERATURE", Streamwise_Periodic_Temperature, false); - /* DESCRIPTION: Heatflux boundary at streamwise periodic 'outlet', choose heat [W] such that net domain heatflux is - * zero. Only active if STREAMWISE_PERIODIC_TEMPERATURE is active. \n DEFAULT: 0.0 \ingroup Config */ + /* DESCRIPTION: Heatflux boundary at streamwise periodic 'outlet', choose heat [W] such that net domain heatflux is zero. Only active if STREAMWISE_PERIODIC_TEMPERATURE is active. \n DEFAULT: 0.0 \ingroup Config */ addDoubleOption("STREAMWISE_PERIODIC_OUTLET_HEAT", Streamwise_Periodic_OutletHeat, 0.0); - /* DESCRIPTION: Delta pressure [Pa] on which basis body force will be computed, serves as initial value if MASSFLOW is - * chosen. \n DEFAULT: 1.0 \ingroup Config */ + /* DESCRIPTION: Delta pressure [Pa] on which basis body force will be computed, serves as initial value if MASSFLOW is chosen. \n DEFAULT: 1.0 \ingroup Config */ addDoubleOption("STREAMWISE_PERIODIC_PRESSURE_DROP", Streamwise_Periodic_PressureDrop, 1.0); - /* DESCRIPTION: Target Massflow [kg/s], Delta P will be adapted until m_dot is met. \n DEFAULT: 0.0 \ingroup Config */ + /* DESCRIPTION: Target Massflow [kg/s], Delta P will be adapted until m_dot is met. \n DEFAULT: 0.0 \ingroup Config */ addDoubleOption("STREAMWISE_PERIODIC_MASSFLOW", Streamwise_Periodic_TargetMassFlow, 0.0); - /*!\brief RESTART_SOL \n DESCRIPTION: Restart solution from native solution file \n Options: NO, YES \ingroup Config - */ + /*!\brief RESTART_SOL \n DESCRIPTION: Restart solution from native solution file \n Options: NO, YES \ingroup Config */ addBoolOption("RESTART_SOL", Restart, false); /*!\brief BINARY_RESTART \n DESCRIPTION: Read binary SU2 native restart files. \n Options: YES, NO \ingroup Config */ addBoolOption("READ_BINARY_RESTART", Read_Binary_Restart, true); - /*!\brief WRT_RESTART_OVERWRITE \n DESCRIPTION: overwrite restart files or append iteration number. \n Options: YES, - * NO \ingroup Config */ + /*!\brief WRT_RESTART_OVERWRITE \n DESCRIPTION: overwrite restart files or append iteration number. \n Options: YES, NO \ingroup Config */ addBoolOption("WRT_RESTART_OVERWRITE", Wrt_Restart_Overwrite, true); - /*!\brief WRT_SURFACE_OVERWRITE \n DESCRIPTION: overwrite visualisation files or append iteration number. \n Options: - * YES, NO \ingroup Config */ + /*!\brief WRT_SURFACE_OVERWRITE \n DESCRIPTION: overwrite visualisation files or append iteration number. \n Options: YES, NO \ingroup Config */ addBoolOption("WRT_SURFACE_OVERWRITE", Wrt_Surface_Overwrite, true); - /*!\brief WRT_VOLUME_OVERWRITE \n DESCRIPTION: overwrite visualisation files or append iteration number. \n Options: - * YES, NO \ingroup Config */ + /*!\brief WRT_VOLUME_OVERWRITE \n DESCRIPTION: overwrite visualisation files or append iteration number. \n Options: YES, NO \ingroup Config */ addBoolOption("WRT_VOLUME_OVERWRITE", Wrt_Volume_Overwrite, true); - /*!\brief SYSTEM_MEASUREMENTS \n DESCRIPTION: System of measurements \n OPTIONS: see \link Measurements_Map \endlink - * \n DEFAULT: SI \ingroup Config*/ + /*!\brief SYSTEM_MEASUREMENTS \n DESCRIPTION: System of measurements \n OPTIONS: see \link Measurements_Map \endlink \n DEFAULT: SI \ingroup Config*/ addEnumOption("SYSTEM_MEASUREMENTS", SystemMeasurements, Measurements_Map, SI); /*!\par CONFIG_CATEGORY: FluidModel \ingroup Config*/ - /*!\brief FLUID_MODEL \n DESCRIPTION: Fluid model \n OPTIONS: See \link FluidModel_Map \endlink \n DEFAULT: - * STANDARD_AIR \ingroup Config*/ + /*!\brief FLUID_MODEL \n DESCRIPTION: Fluid model \n OPTIONS: See \link FluidModel_Map \endlink \n DEFAULT: STANDARD_AIR \ingroup Config*/ addEnumOption("FLUID_MODEL", Kind_FluidModel, FluidModel_Map, STANDARD_AIR); - /*!\brief FLUID_NAME \n DESCRIPTION: Fluid name \n OPTIONS: see coolprop homepage \n DEFAULT: nitrogen \ingroup - * Config*/ + /*!\brief FLUID_NAME \n DESCRIPTION: Fluid name \n OPTIONS: see coolprop homepage \n DEFAULT: nitrogen \ingroup Config*/ addStringOption("FLUID_NAME", FluidName, string("nitrogen")); /*!\par CONFIG_CATEGORY: Data-driven fluid model parameters \ingroup Config*/ - /*!\brief INTERPOLATION_METHOD \n DESCRIPTION: Interpolation method used to determine the thermodynamic state of the - * fluid. \n OPTIONS: See \link DataDrivenMethod_Map \endlink DEFAULT: MLP \ingroup Config*/ - addEnumOption("INTERPOLATION_METHOD", Kind_DataDriven_Method, DataDrivenMethod_Map, ENUM_DATADRIVEN_METHOD::LUT); + /*!\brief INTERPOLATION_METHOD \n DESCRIPTION: Interpolation method used to determine the thermodynamic state of the fluid. \n OPTIONS: See \link DataDrivenMethod_Map \endlink DEFAULT: MLP \ingroup Config*/ + addEnumOption("INTERPOLATION_METHOD",Kind_DataDriven_Method, DataDrivenMethod_Map, ENUM_DATADRIVEN_METHOD::LUT); /*!\brief FILENAME_INTERPOLATOR \n DESCRIPTION: Input file for the interpolation method. \n \ingroup Config*/ addStringListOption("FILENAMES_INTERPOLATOR", n_Datadriven_files, DataDriven_Method_FileNames); - /*!\brief DATADRIVEN_NEWTON_RELAXATION \n DESCRIPTION: Relaxation factor for Newton solvers in data-driven fluid - * model. \n \ingroup Config*/ + /*!\brief DATADRIVEN_NEWTON_RELAXATION \n DESCRIPTION: Relaxation factor for Newton solvers in data-driven fluid model. \n \ingroup Config*/ addDoubleOption("DATADRIVEN_NEWTON_RELAXATION", DataDriven_Relaxation_Factor, 0.05); /*!\brief CONFINEMENT_PARAM \n DESCRIPTION: Input Confinement Parameter for Vorticity Confinement*/ @@ -1316,23 +1182,17 @@ void CConfig::SetConfig_Options() { /*!\par CONFIG_CATEGORY: Freestream Conditions \ingroup Config*/ /*--- Options related to freestream specification ---*/ - /*!\brief GAS_CONSTANT \n DESCRIPTION: Specific gas constant (287.058 J/kg*K (air), only for compressible flows) - * \ingroup Config*/ + /*!\brief GAS_CONSTANT \n DESCRIPTION: Specific gas constant (287.058 J/kg*K (air), only for compressible flows) \ingroup Config*/ addDoubleOption("GAS_CONSTANT", Gas_Constant, 287.058); - /*!\brief GAMMA_VALUE \n DESCRIPTION: Ratio of specific heats (1.4 (air), only for compressible flows) \ingroup - * Config*/ + /*!\brief GAMMA_VALUE \n DESCRIPTION: Ratio of specific heats (1.4 (air), only for compressible flows) \ingroup Config*/ addDoubleOption("GAMMA_VALUE", Gamma, 1.4); - /*!\brief THERMODYNAMIC_PRESSURE \n DESCRIPTION: Thermodynamics(operating) Pressure (101325 Pa), only for - * incompressible flows) \ingroup Config*/ + /*!\brief THERMODYNAMIC_PRESSURE \n DESCRIPTION: Thermodynamics(operating) Pressure (101325 Pa), only for incompressible flows) \ingroup Config*/ addDoubleOption("THERMODYNAMIC_PRESSURE", Pressure_Thermodynamic, 101325.0); - /*!\brief CP_VALUE \n DESCRIPTION: Specific heat at constant pressure, Cp (1004.703 J/kg*K (air), constant density - * incompressible fluids only) \ingroup Config*/ + /*!\brief CP_VALUE \n DESCRIPTION: Specific heat at constant pressure, Cp (1004.703 J/kg*K (air), constant density incompressible fluids only) \ingroup Config*/ addDoubleListOption("SPECIFIC_HEAT_CP", nSpecific_Heat_Cp, Specific_Heat_Cp); - /*!\brief THERMAL_EXPANSION_COEFF \n DESCRIPTION: Thermal expansion coefficient (0.00347 K^-1 (air), used for - * Boussinesq approximation for liquids/non-ideal gases) \ingroup Config*/ + /*!\brief THERMAL_EXPANSION_COEFF \n DESCRIPTION: Thermal expansion coefficient (0.00347 K^-1 (air), used for Boussinesq approximation for liquids/non-ideal gases) \ingroup Config*/ addDoubleOption("THERMAL_EXPANSION_COEFF", Thermal_Expansion_Coeff, 0.00347); - /*!\brief MOLECULAR_WEIGHT \n DESCRIPTION: Molecular weight for an incompressible ideal gas (28.96 g/mol (air) - * default) \ingroup Config*/ + /*!\brief MOLECULAR_WEIGHT \n DESCRIPTION: Molecular weight for an incompressible ideal gas (28.96 g/mol (air) default) \ingroup Config*/ addDoubleListOption("MOLECULAR_WEIGHT", nMolecular_Weight, Molecular_Weight); ///* DESCRIPTION: Specify if Mutation++ library is used */ @@ -1345,8 +1205,7 @@ void CConfig::SetConfig_Options() { addDoubleListOption("GAS_COMPOSITION", nSpecies, Gas_Composition); /* DESCRIPTION: Specify mass fraction of each species for NEMO inlet*/ addDoubleListOption("INLET_GAS_COMPOSITION", nSpecies_inlet, Inlet_MassFrac); - /*!\brief INLET_TEMPERATURE_VE \n DESCRIPTION: NEMO inlet temperature_ve (K), if left 0 K, set to Ttr value \ingroup - * Config*/ + /*!\brief INLET_TEMPERATURE_VE \n DESCRIPTION: NEMO inlet temperature_ve (K), if left 0 K, set to Ttr value \ingroup Config*/ addDoubleOption("INLET_TEMPERATURE_VE", Inlet_Temperature_ve, 0.0); /* DESCRIPTION: Specify if mixture is frozen */ addBoolOption("FROZEN_MIXTURE", frozen, false); @@ -1362,8 +1221,7 @@ void CConfig::SetConfig_Options() { addDoubleListOption("SUPERCATALYTIC_WALL_COMPOSITION", nSpecies_Cat_Wall, Supercatalytic_Wall_Composition); /* DESCRIPTION: Specfify catalytic efficiency of wall if using gamma model */ addDoubleOption("CATALYTIC_EFFICIENCY", CatalyticEfficiency, 1.0); - /*!\brief MARKER_MONITORING\n DESCRIPTION: Marker(s) of the surface where evaluate the non-dimensional coefficients - * \ingroup Config*/ + /*!\brief MARKER_MONITORING\n DESCRIPTION: Marker(s) of the surface where evaluate the non-dimensional coefficients \ingroup Config*/ /*--- Options related to VAN der WAALS MODEL and PENG ROBINSON ---*/ @@ -1376,11 +1234,10 @@ void CConfig::SetConfig_Options() { /*--- Options related to VAN der WAALS MODEL and PENG ROBINSON ---*/ /* DESCRIPTION: Critical Density, default value for MDM */ - addDoubleOption("ACENTRIC_FACTOR", Acentric_Factor, 0.035); + addDoubleOption("ACENTRIC_FACTOR", Acentric_Factor, 0.035); - /*--- Options related to Viscosity Model ---*/ - /*!\brief VISCOSITY_MODEL \n DESCRIPTION: model of the viscosity \n OPTIONS: See \link ViscosityModel_Map \endlink \n - * DEFAULT: SUTHERLAND \ingroup Config*/ + /*--- Options related to Viscosity Model ---*/ + /*!\brief VISCOSITY_MODEL \n DESCRIPTION: model of the viscosity \n OPTIONS: See \link ViscosityModel_Map \endlink \n DEFAULT: SUTHERLAND \ingroup Config*/ addEnumOption("VISCOSITY_MODEL", Kind_ViscosityModel, ViscosityModel_Map, VISCOSITYMODEL::SUTHERLAND); /*--- Options related to Constant Viscosity Model ---*/ @@ -1398,24 +1255,20 @@ void CConfig::SetConfig_Options() { addDoubleListOption("SUTHERLAND_CONSTANT", nMu_S, Mu_S); /*--- Options related to Viscosity Model ---*/ - /*!\brief MIXINGVISCOSITY_MODEL \n DESCRIPTION: Mixing model of the viscosity \n OPTIONS: See \link ViscosityModel_Map - * \endlink \n DEFAULT: DAVIDSON \ingroup Config*/ - addEnumOption("MIXING_VISCOSITY_MODEL", Kind_MixingViscosityModel, MixingViscosityModel_Map, - MIXINGVISCOSITYMODEL::DAVIDSON); + /*!\brief MIXINGVISCOSITY_MODEL \n DESCRIPTION: Mixing model of the viscosity \n OPTIONS: See \link ViscosityModel_Map \endlink \n DEFAULT: DAVIDSON \ingroup Config*/ + addEnumOption("MIXING_VISCOSITY_MODEL", Kind_MixingViscosityModel, MixingViscosityModel_Map, MIXINGVISCOSITYMODEL::DAVIDSON); /*--- Options related to Thermal Conductivity Model ---*/ - addEnumOption("CONDUCTIVITY_MODEL", Kind_ConductivityModel, ConductivityModel_Map, - CONDUCTIVITYMODEL::CONSTANT_PRANDTL); + addEnumOption("CONDUCTIVITY_MODEL", Kind_ConductivityModel, ConductivityModel_Map, CONDUCTIVITYMODEL::CONSTANT_PRANDTL); /* DESCRIPTION: Definition of the turbulent thermal conductivity model (CONSTANT_PRANDTL_TURB (default), NONE). */ - addEnumOption("TURBULENT_CONDUCTIVITY_MODEL", Kind_ConductivityModel_Turb, TurbConductivityModel_Map, - CONDUCTIVITYMODEL_TURB::CONSTANT_PRANDTL); + addEnumOption("TURBULENT_CONDUCTIVITY_MODEL", Kind_ConductivityModel_Turb, TurbConductivityModel_Map, CONDUCTIVITYMODEL_TURB::CONSTANT_PRANDTL); - /*--- Options related to Constant Thermal Conductivity Model ---*/ + /*--- Options related to Constant Thermal Conductivity Model ---*/ - /* DESCRIPTION: default value for AIR */ - addDoubleListOption("THERMAL_CONDUCTIVITY_CONSTANT", nThermal_Conductivity_Constant, Thermal_Conductivity_Constant); + /* DESCRIPTION: default value for AIR */ + addDoubleListOption("THERMAL_CONDUCTIVITY_CONSTANT", nThermal_Conductivity_Constant , Thermal_Conductivity_Constant); /*--- Options related to temperature polynomial coefficients for fluid models. ---*/ @@ -1426,31 +1279,24 @@ void CConfig::SetConfig_Options() { /* DESCRIPTION: Definition of the temperature polynomial coefficients for specific heat Cp. */ addDoubleArrayOption("KT_POLYCOEFFS", N_POLY_COEFFS, kt_polycoeffs.data()); - /*!\brief REYNOLDS_NUMBER \n DESCRIPTION: Reynolds number (non-dimensional, based on the free-stream values). Needed - * for viscous solvers. For incompressible solvers the Reynolds length will always be 1.0 \n DEFAULT: 0.0 \ingroup - * Config */ + /*!\brief REYNOLDS_NUMBER \n DESCRIPTION: Reynolds number (non-dimensional, based on the free-stream values). Needed for viscous solvers. For incompressible solvers the Reynolds length will always be 1.0 \n DEFAULT: 0.0 \ingroup Config */ addDoubleOption("REYNOLDS_NUMBER", Reynolds, 0.0); - /*!\brief REYNOLDS_LENGTH \n DESCRIPTION: Reynolds length (1 m by default). Used for compressible solver: - * incompressible solver will use 1.0. \ingroup Config */ + /*!\brief REYNOLDS_LENGTH \n DESCRIPTION: Reynolds length (1 m by default). Used for compressible solver: incompressible solver will use 1.0. \ingroup Config */ addDoubleOption("REYNOLDS_LENGTH", Length_Reynolds, 1.0); - /*!\brief PRANDTL_LAM \n DESCRIPTION: Laminar Prandtl number (0.72 (air), only for compressible flows) \n DEFAULT: - * 0.72 \ingroup Config*/ - addDoubleListOption("PRANDTL_LAM", nPrandtl_Lam, Prandtl_Lam); - /*!\brief PRANDTL_TURB \n DESCRIPTION: Turbulent Prandtl number (0.9 (air), only for compressible flows) \n DEFAULT - * 0.90 \ingroup Config*/ - addDoubleListOption("PRANDTL_TURB", nPrandtl_Turb, Prandtl_Turb); + /*!\brief PRANDTL_LAM \n DESCRIPTION: Laminar Prandtl number (0.72 (air), only for compressible flows) \n DEFAULT: 0.72 \ingroup Config*/ + addDoubleListOption("PRANDTL_LAM", nPrandtl_Lam , Prandtl_Lam); + /*!\brief PRANDTL_TURB \n DESCRIPTION: Turbulent Prandtl number (0.9 (air), only for compressible flows) \n DEFAULT 0.90 \ingroup Config*/ + addDoubleListOption("PRANDTL_TURB", nPrandtl_Turb , Prandtl_Turb); /*--- Options related to wall models. ---*/ - /*!\brief WALLMODEL_KAPPA \n DESCRIPTION: von Karman constant used for the wall model \n DEFAULT 0.41 \ingroup - * Config*/ + /*!\brief WALLMODEL_KAPPA \n DESCRIPTION: von Karman constant used for the wall model \n DEFAULT 0.41 \ingroup Config*/ addDoubleOption("WALLMODEL_KAPPA", wallModel_Kappa, 0.41); /*!\brief WALLMODEL_MAXITER \n DESCRIPTION: Max iterations used for the wall model \n DEFAULT 200 \ingroup Config*/ addUnsignedShortOption("WALLMODEL_MAXITER", wallModel_MaxIter, 200); /*!\brief WALLMODEL_RELFAC \n DESCRIPTION: Relaxation factor used for the wall model \n DEFAULT 0.5 \ingroup Config*/ addDoubleOption("WALLMODEL_RELFAC", wallModel_RelFac, 0.5); - /*!\brief WALLMODEL_MINYPLUS \n DESCRIPTION: lower limit for Y+ used for the wall model \n DEFAULT 5.0 \ingroup - * Config*/ + /*!\brief WALLMODEL_MINYPLUS \n DESCRIPTION: lower limit for Y+ used for the wall model \n DEFAULT 5.0 \ingroup Config*/ addDoubleOption("WALLMODEL_MINYPLUS", wallModel_MinYplus, 5.0); /*!\brief WALLMODEL_B \n DESCRIPTION: constant B used for the wall model \n DEFAULT 5.5 \ingroup Config*/ addDoubleOption("WALLMODEL_B", wallModel_B, 5.5); @@ -1459,70 +1305,55 @@ void CConfig::SetConfig_Options() { addDoubleOption("BULK_MODULUS", Bulk_Modulus, 1.42E5); /* DESCRIPTION: Epsilon^2 multipier in Beta calculation for incompressible preconditioner. */ addDoubleOption("BETA_FACTOR", Beta_Factor, 4.1); - /*!\brief MACH_NUMBER \n DESCRIPTION: Mach number (non-dimensional, based on the free-stream values). 0.0 by default - * \ingroup Config*/ + /*!\brief MACH_NUMBER \n DESCRIPTION: Mach number (non-dimensional, based on the free-stream values). 0.0 by default \ingroup Config*/ addDoubleOption("MACH_NUMBER", Mach, 0.0); - /*!\brief INIT_OPTION \n DESCRIPTION: Init option to choose between Reynolds or thermodynamics quantities for - * initializing the solution \n OPTIONS: see \link InitOption_Map \endlink \n DEFAULT REYNOLDS \ingroup Config*/ + /*!\brief INIT_OPTION \n DESCRIPTION: Init option to choose between Reynolds or thermodynamics quantities for initializing the solution \n OPTIONS: see \link InitOption_Map \endlink \n DEFAULT REYNOLDS \ingroup Config*/ addEnumOption("INIT_OPTION", Kind_InitOption, InitOption_Map, REYNOLDS); /* DESCRIPTION: Free-stream option to choose between density and temperature for initializing the solution */ addEnumOption("FREESTREAM_OPTION", Kind_FreeStreamOption, FreeStreamOption_Map, FREESTREAM_OPTION::TEMPERATURE_FS); /*!\brief FREESTREAM_PRESSURE\n DESCRIPTION: Free-stream pressure (101325.0 N/m^2 by default) \ingroup Config*/ addDoubleOption("FREESTREAM_PRESSURE", Pressure_FreeStream, 101325.0); - /*!\brief FREESTREAM_DENSITY\n DESCRIPTION: Free-stream density (1.2886 Kg/m^3 (air), 998.2 Kg/m^3 (water)) \n DEFAULT - * -1.0 (calculated from others) \ingroup Config*/ + /*!\brief FREESTREAM_DENSITY\n DESCRIPTION: Free-stream density (1.2886 Kg/m^3 (air), 998.2 Kg/m^3 (water)) \n DEFAULT -1.0 (calculated from others) \ingroup Config*/ addDoubleOption("FREESTREAM_DENSITY", Density_FreeStream, -1.0); /*!\brief FREESTREAM_TEMPERATURE\n DESCRIPTION: Free-stream temperature (288.15 K by default) \ingroup Config*/ addDoubleOption("FREESTREAM_TEMPERATURE", Temperature_FreeStream, 288.15); - /*!\brief FREESTREAM_TEMPERATURE_VE\n DESCRIPTION: Free-stream vibrational-electronic temperature (288.15 K by - * default) \ingroup Config*/ + /*!\brief FREESTREAM_TEMPERATURE_VE\n DESCRIPTION: Free-stream vibrational-electronic temperature (288.15 K by default) \ingroup Config*/ addDoubleOption("FREESTREAM_TEMPERATURE_VE", Temperature_ve_FreeStream, 288.15); + /*--- Options related to incompressible flow solver ---*/ /* DESCRIPTION: Option to choose the density model used in the incompressible flow solver. */ addEnumOption("INC_DENSITY_MODEL", Kind_DensityModel, DensityModel_Map, INC_DENSITYMODEL::CONSTANT); - /*!\brief ENERGY_EQUATION \n DESCRIPTION: Solve the energy equation in the incompressible flow solver. \ingroup - * Config*/ + /*!\brief ENERGY_EQUATION \n DESCRIPTION: Solve the energy equation in the incompressible flow solver. \ingroup Config*/ addBoolOption("INC_ENERGY_EQUATION", Energy_Equation, false); /*!\brief INC_DENSITY_REF \n DESCRIPTION: Reference density for incompressible flows \ingroup Config*/ addDoubleOption("INC_DENSITY_REF", Inc_Density_Ref, 1.0); - /*!\brief INC_VELOCITY_REF \n DESCRIPTION: Reference velocity for incompressible flows (1.0 by default) \ingroup - * Config*/ + /*!\brief INC_VELOCITY_REF \n DESCRIPTION: Reference velocity for incompressible flows (1.0 by default) \ingroup Config*/ addDoubleOption("INC_VELOCITY_REF", Inc_Velocity_Ref, 1.0); - /*!\brief INC_TEMPERATURE_REF \n DESCRIPTION: Reference temperature for incompressible flows with the energy equation - * (1.0 by default) \ingroup Config*/ + /*!\brief INC_TEMPERATURE_REF \n DESCRIPTION: Reference temperature for incompressible flows with the energy equation (1.0 by default) \ingroup Config*/ addDoubleOption("INC_TEMPERATURE_REF", Inc_Temperature_Ref, 1.0); - /*!\brief INC_DENSITY_INIT \n DESCRIPTION: Initial density for incompressible flows (1.2886 kg/m^3 by default) - * \ingroup Config*/ + /*!\brief INC_DENSITY_INIT \n DESCRIPTION: Initial density for incompressible flows (1.2886 kg/m^3 by default) \ingroup Config*/ addDoubleOption("INC_DENSITY_INIT", Inc_Density_Init, 1.2886); - /*!\brief INC_VELOCITY_INIT \n DESCRIPTION: Initial velocity for incompressible flows (1.0,0,0 m/s by default) - * \ingroup Config*/ - vel_init[0] = 1.0; - vel_init[1] = 0.0; - vel_init[2] = 0.0; + /*!\brief INC_VELOCITY_INIT \n DESCRIPTION: Initial velocity for incompressible flows (1.0,0,0 m/s by default) \ingroup Config*/ + vel_init[0] = 1.0; vel_init[1] = 0.0; vel_init[2] = 0.0; addDoubleArrayOption("INC_VELOCITY_INIT", 3, vel_init); - /*!\brief INC_TEMPERATURE_INIT \n DESCRIPTION: Initial temperature for incompressible flows with the energy equation - * (288.15 K by default) \ingroup Config*/ + /*!\brief INC_TEMPERATURE_INIT \n DESCRIPTION: Initial temperature for incompressible flows with the energy equation (288.15 K by default) \ingroup Config*/ addDoubleOption("INC_TEMPERATURE_INIT", Inc_Temperature_Init, 288.15); /*!\brief INC_NONDIM \n DESCRIPTION: Non-dimensionalization scheme for incompressible flows. \ingroup Config*/ addEnumOption("INC_NONDIM", Ref_Inc_NonDim, NonDim_Map, INITIAL_VALUES); - /*!\brief INC_INLET_USENORMAL \n DESCRIPTION: Use the local boundary normal for the flow direction with the - * incompressible pressure inlet. \ingroup Config*/ + /*!\brief INC_INLET_USENORMAL \n DESCRIPTION: Use the local boundary normal for the flow direction with the incompressible pressure inlet. \ingroup Config*/ addBoolOption("INC_INLET_USENORMAL", Inc_Inlet_UseNormal, false); - /*!\brief INC_INLET_DAMPING \n DESCRIPTION: Damping factor applied to the iterative updates to the velocity at a - * pressure inlet in incompressible flow (0.1 by default). \ingroup Config*/ + /*!\brief INC_INLET_DAMPING \n DESCRIPTION: Damping factor applied to the iterative updates to the velocity at a pressure inlet in incompressible flow (0.1 by default). \ingroup Config*/ addDoubleOption("INC_INLET_DAMPING", Inc_Inlet_Damping, 0.1); - /*!\brief INC_OUTLET_DAMPING \n DESCRIPTION: Damping factor applied to the iterative updates to the pressure at a mass - * flow outlet in incompressible flow (0.1 by default). \ingroup Config*/ + /*!\brief INC_OUTLET_DAMPING \n DESCRIPTION: Damping factor applied to the iterative updates to the pressure at a mass flow outlet in incompressible flow (0.1 by default). \ingroup Config*/ addDoubleOption("INC_OUTLET_DAMPING", Inc_Outlet_Damping, 0.1); /*--- Options related to the species solver. ---*/ /*!\brief SPECIES_INIT \n DESCRIPTION: Initial values for scalar transport \ingroup Config*/ addDoubleListOption("SPECIES_INIT", nSpecies_Init, Species_Init); - /*!\brief SPECIES_CLIPPING \n DESCRIPTION: Activate clipping for scalar transport equations \n DEFAULT: false \ingroup - * Config*/ + /*!\brief SPECIES_CLIPPING \n DESCRIPTION: Activate clipping for scalar transport equations \n DEFAULT: false \ingroup Config*/ addBoolOption("SPECIES_CLIPPING", Species_Clipping, false); /*!\brief SPECIES_CLIPPING_MAX \n DESCRIPTION: Maximum values for scalar clipping \ingroup Config*/ addDoubleListOption("SPECIES_CLIPPING_MAX", nSpecies_Clipping_Max, Species_Clipping_Max); @@ -1531,38 +1362,27 @@ void CConfig::SetConfig_Options() { /*!\brief FLAME_INIT \n DESCRIPTION: flame initialization using the flamelet model \ingroup Config*/ /*--- flame offset (x,y,z) ---*/ - flame_init[0] = 0.0; - flame_init[1] = 0.0; - flame_init[2] = 0.0; + flame_init[0] = 0.0; flame_init[1] = 0.0; flame_init[2] = 0.0; /*--- flame normal (nx, ny, nz) ---*/ - flame_init[3] = 1.0; - flame_init[4] = 0.0; - flame_init[5] = 0.0; + flame_init[3] = 1.0; flame_init[4] = 0.0; flame_init[5] = 0.0; /*--- flame thickness (x) and flame burnt thickness (after this thickness, we have unburnt conditions again) ---*/ - flame_init[6] = 0.5e-3; - flame_init[7] = 1.0; - addDoubleArrayOption("FLAME_INIT", 8, flame_init); + flame_init[6] = 0.5e-3; flame_init[7] = 1.0; + addDoubleArrayOption("FLAME_INIT", 8,flame_init); /*--- Options related to mass diffusivity and thereby the species solver. ---*/ /*!\brief DIFFUSIVITY_MODEL\n DESCRIPTION: mass diffusivity model \n DEFAULT constant disffusivity \ingroup Config*/ - addEnumOption("DIFFUSIVITY_MODEL", Kind_Diffusivity_Model, Diffusivity_Model_Map, - DIFFUSIVITYMODEL::CONSTANT_DIFFUSIVITY); - /*!\brief DIFFUSIVITY_CONSTANT\n DESCRIPTION: mass diffusivity if DIFFUSIVITYMODEL::CONSTANT_DIFFUSIVITY is chosen \n - * DEFAULT 0.001 (Air) \ingroup Config*/ - addDoubleOption("DIFFUSIVITY_CONSTANT", Diffusivity_Constant, 0.001); - /*!\brief SCHMIDT_LAM \n DESCRIPTION: Laminar Schmidt number of mass diffusion \n DEFAULT 1.0 (~for Gases) \ingroup - * Config*/ + addEnumOption("DIFFUSIVITY_MODEL", Kind_Diffusivity_Model, Diffusivity_Model_Map, DIFFUSIVITYMODEL::CONSTANT_DIFFUSIVITY); + /*!\brief DIFFUSIVITY_CONSTANT\n DESCRIPTION: mass diffusivity if DIFFUSIVITYMODEL::CONSTANT_DIFFUSIVITY is chosen \n DEFAULT 0.001 (Air) \ingroup Config*/ + addDoubleOption("DIFFUSIVITY_CONSTANT", Diffusivity_Constant , 0.001); + /*!\brief SCHMIDT_LAM \n DESCRIPTION: Laminar Schmidt number of mass diffusion \n DEFAULT 1.0 (~for Gases) \ingroup Config*/ addDoubleOption("SCHMIDT_NUMBER_LAMINAR", Schmidt_Number_Laminar, 1.0); - /*!\brief SCHMIDT_TURB \n DESCRIPTION: Turbulent Schmidt number of mass diffusion \n DEFAULT 0.70 (more or less - * experimental value) \ingroup Config*/ + /*!\brief SCHMIDT_TURB \n DESCRIPTION: Turbulent Schmidt number of mass diffusion \n DEFAULT 0.70 (more or less experimental value) \ingroup Config*/ addDoubleOption("SCHMIDT_NUMBER_TURBULENT", Schmidt_Number_Turbulent, 0.7); /*!\brief DESCRIPTION: Constant Lewis number for mass diffusion */ addDoubleListOption("CONSTANT_LEWIS_NUMBER", nConstant_Lewis_Number, Constant_Lewis_Number); - vel_inf[0] = 1.0; - vel_inf[1] = 0.0; - vel_inf[2] = 0.0; + vel_inf[0] = 1.0; vel_inf[1] = 0.0; vel_inf[2] = 0.0; /*!\brief FREESTREAM_VELOCITY\n DESCRIPTION: Free-stream velocity (m/s) */ addDoubleArrayOption("FREESTREAM_VELOCITY", 3, vel_inf); /* DESCRIPTION: Free-stream viscosity (1.853E-5 Ns/m^2 (air), 0.798E-3 Ns/m^2 (water)) */ @@ -1608,10 +1428,11 @@ void CConfig::SetConfig_Options() { /* DESCRIPTION: Number of times Alpha is updated in a fix CL problem. */ addUnsignedLongOption("UPDATE_BCTHRUST", Update_BCThrust, 5); + /*!\par CONFIG_CATEGORY: Reference Conditions \ingroup Config*/ /*--- Options related to reference values for nondimensionalization ---*/ - Length_Ref = 1.0; //<---- NOTE: this should be given an option or set as a const + Length_Ref = 1.0; //<---- NOTE: this should be given an option or set as a const /*!\brief REF_ORIGIN_MOMENT_X\n DESCRIPTION: X Reference origin for moment computation \ingroup Config*/ addDoubleListOption("REF_ORIGIN_MOMENT_X", nRefOriginMoment_X, RefOriginMoment_X); @@ -1619,13 +1440,11 @@ void CConfig::SetConfig_Options() { addDoubleListOption("REF_ORIGIN_MOMENT_Y", nRefOriginMoment_Y, RefOriginMoment_Y); /*!\brief REF_ORIGIN_MOMENT_Z\n DESCRIPTION: Z Reference origin for moment computation \ingroup Config*/ addDoubleListOption("REF_ORIGIN_MOMENT_Z", nRefOriginMoment_Z, RefOriginMoment_Z); - /*!\brief REF_AREA\n DESCRIPTION: Reference area for force coefficients (0 implies automatic calculation) \ingroup - * Config*/ + /*!\brief REF_AREA\n DESCRIPTION: Reference area for force coefficients (0 implies automatic calculation) \ingroup Config*/ addDoubleOption("REF_AREA", RefArea, 1.0); /*!\brief SEMI_SPAN\n DESCRIPTION: Wing semi-span (0 implies automatic calculation) \ingroup Config*/ addDoubleOption("SEMI_SPAN", SemiSpan, 0.0); - /*!\brief REF_LENGTH\n DESCRIPTION: Reference length for pitching, rolling, and yawing non-dimensional moment \ingroup - * Config*/ + /*!\brief REF_LENGTH\n DESCRIPTION: Reference length for pitching, rolling, and yawing non-dimensional moment \ingroup Config*/ addDoubleOption("REF_LENGTH", RefLength, 1.0); /*!\brief REF_SHARP_EDGES\n DESCRIPTION: Reference coefficient for detecting sharp edges \ingroup Config*/ addDoubleOption("REF_SHARP_EDGES", RefSharpEdges, 3.0); @@ -1640,22 +1459,18 @@ void CConfig::SetConfig_Options() { /*--- Options related to various boundary markers ---*/ /*!\brief HTP_AXIS\n DESCRIPTION: Location of the HTP axis*/ - // htp_axis[0] = 0.0; htp_axis[1] = 0.0; - // addDoubleArrayOption("HTP_AXIS", 2, htp_axis); + //htp_axis[0] = 0.0; htp_axis[1] = 0.0; + //addDoubleArrayOption("HTP_AXIS", 2, htp_axis); /*!\brief MARKER_PLOTTING\n DESCRIPTION: Marker(s) of the surface in the surface flow solution file \ingroup Config*/ addStringListOption("MARKER_PLOTTING", nMarker_Plotting, Marker_Plotting); - /*!\brief MARKER_MONITORING\n DESCRIPTION: Marker(s) of the surface where evaluate the non-dimensional coefficients - * \ingroup Config*/ + /*!\brief MARKER_MONITORING\n DESCRIPTION: Marker(s) of the surface where evaluate the non-dimensional coefficients \ingroup Config*/ addStringListOption("MARKER_MONITORING", nMarker_Monitoring, Marker_Monitoring); - /*!\brief MARKER_CONTROL_VOLUME\n DESCRIPTION: Marker(s) of the surface in the surface flow solution file \ingroup - * Config*/ + /*!\brief MARKER_CONTROL_VOLUME\n DESCRIPTION: Marker(s) of the surface in the surface flow solution file \ingroup Config*/ addStringListOption("MARKER_ANALYZE", nMarker_Analyze, Marker_Analyze); - /*!\brief MARKER_DESIGNING\n DESCRIPTION: Marker(s) of the surface where objective function (design problem) will be - * evaluated \ingroup Config*/ + /*!\brief MARKER_DESIGNING\n DESCRIPTION: Marker(s) of the surface where objective function (design problem) will be evaluated \ingroup Config*/ addStringListOption("MARKER_DESIGNING", nMarker_Designing, Marker_Designing); - /*!\brief GEO_MARKER\n DESCRIPTION: Marker(s) of the surface where evaluate the geometrical functions \ingroup - * Config*/ + /*!\brief GEO_MARKER\n DESCRIPTION: Marker(s) of the surface where evaluate the geometrical functions \ingroup Config*/ addStringListOption("GEO_MARKER", nMarker_GeoEval, Marker_GeoEval); /*!\brief MARKER_EULER\n DESCRIPTION: Euler wall boundary marker(s) \ingroup Config*/ addStringListOption("MARKER_EULER", nMarker_Euler, Marker_Euler); @@ -1685,41 +1500,37 @@ void CConfig::SetConfig_Options() { Format: ( periodic marker, donor marker, rotation_center_x, rotation_center_y, rotation_center_z, rotation_angle_x-axis, rotation_angle_y-axis, rotation_angle_z-axis, translation_x, translation_y, translation_z, ... ) */ - addPeriodicOption("MARKER_PERIODIC", nMarker_PerBound, Marker_PerBound, Marker_PerDonor, Periodic_RotCenter, - Periodic_RotAngles, Periodic_Translation); + addPeriodicOption("MARKER_PERIODIC", nMarker_PerBound, Marker_PerBound, Marker_PerDonor, + Periodic_RotCenter, Periodic_RotAngles, Periodic_Translation); /*!\brief MARKER_PYTHON_CUSTOM\n DESCRIPTION: Python customizable marker(s) \ingroup Config*/ addStringListOption("MARKER_PYTHON_CUSTOM", nMarker_PyCustom, Marker_PyCustom); /*!\brief MARKER_WALL_FUNCTIONS\n DESCRIPTION: Viscous wall markers for which wall functions must be applied. Format: (Wall function marker, wall function type, ...) \ingroup Config*/ - addWallFunctionOption("MARKER_WALL_FUNCTIONS", nMarker_WallFunctions, Marker_WallFunctions, Kind_WallFunctions, - IntInfo_WallFunctions, DoubleInfo_WallFunctions); + addWallFunctionOption("MARKER_WALL_FUNCTIONS", nMarker_WallFunctions, Marker_WallFunctions, + Kind_WallFunctions, IntInfo_WallFunctions, DoubleInfo_WallFunctions); /*!\brief MARKER_STRONG_BC\n DESCRIPTION: Markers where a strong BC must be applied.*/ addStringListOption("MARKER_SPECIES_STRONG_BC", nMarker_StrongBC, Marker_StrongBC); - /*!\brief ACTDISK_TYPE \n DESCRIPTION: Actuator Disk boundary type \n OPTIONS: see \link ActDisk_Map \endlink \n - * Default: VARIABLES_JUMP \ingroup Config*/ + /*!\brief ACTDISK_TYPE \n DESCRIPTION: Actuator Disk boundary type \n OPTIONS: see \link ActDisk_Map \endlink \n Default: VARIABLES_JUMP \ingroup Config*/ addEnumOption("ACTDISK_TYPE", Kind_ActDisk, ActDisk_Map, VARIABLES_JUMP); /*!\brief MARKER_ACTDISK\n DESCRIPTION: \ingroup Config*/ - addActDiskOption("MARKER_ACTDISK", nMarker_ActDiskInlet, nMarker_ActDiskOutlet, Marker_ActDiskInlet, - Marker_ActDiskOutlet, ActDisk_PressJump, ActDisk_TempJump, ActDisk_Omega); + addActDiskOption("MARKER_ACTDISK", + nMarker_ActDiskInlet, nMarker_ActDiskOutlet, Marker_ActDiskInlet, Marker_ActDiskOutlet, + ActDisk_PressJump, ActDisk_TempJump, ActDisk_Omega); - /*!\brief ACTDISK_FILENAME \n DESCRIPTION: Input file for a specified actuator disk (w/ extension) \n DEFAULT: - * actdiskinput.dat \ingroup Config*/ + /*!\brief ACTDISK_FILENAME \n DESCRIPTION: Input file for a specified actuator disk (w/ extension) \n DEFAULT: actdiskinput.dat \ingroup Config*/ addStringOption("ACTDISK_FILENAME", ActDisk_FileName, string("actdiskinput.dat")); - /*!\brief INLET_TYPE \n DESCRIPTION: Inlet boundary type \n OPTIONS: see \link Inlet_Map \endlink \n DEFAULT: - * TOTAL_CONDITIONS \ingroup Config*/ + /*!\brief INLET_TYPE \n DESCRIPTION: Inlet boundary type \n OPTIONS: see \link Inlet_Map \endlink \n DEFAULT: TOTAL_CONDITIONS \ingroup Config*/ addEnumOption("INLET_TYPE", Kind_Inlet, Inlet_Map, INLET_TYPE::TOTAL_CONDITIONS); - /*!\brief INC_INLET_TYPE \n DESCRIPTION: List of inlet types for incompressible flows. List length must match number - * of inlet markers. Options: VELOCITY_INLET, PRESSURE_INLET, INPUT_FILE. \ingroup Config*/ + /*!\brief INC_INLET_TYPE \n DESCRIPTION: List of inlet types for incompressible flows. List length must match number of inlet markers. Options: VELOCITY_INLET, PRESSURE_INLET, INPUT_FILE. \ingroup Config*/ addEnumListOption("INC_INLET_TYPE", nInc_Inlet, Kind_Inc_Inlet, Inlet_Map); addBoolOption("SPECIFIED_INLET_PROFILE", Inlet_From_File, false); - /*!\brief INLET_FILENAME \n DESCRIPTION: Input file for a specified inlet profile (w/ extension) \n DEFAULT: inlet.dat - * \ingroup Config*/ + /*!\brief INLET_FILENAME \n DESCRIPTION: Input file for a specified inlet profile (w/ extension) \n DEFAULT: inlet.dat \ingroup Config*/ addStringOption("INLET_FILENAME", Inlet_Filename, string("inlet.dat")); /*!\brief INLET_MATCHING_TOLERANCE * \n DESCRIPTION: If a file is provided to specify the inlet profile, @@ -1736,29 +1547,22 @@ void CConfig::SetConfig_Options() { addInletOption("MARKER_INLET", nMarker_Inlet, Marker_Inlet, Inlet_Ttotal, Inlet_Ptotal, Inlet_FlowDir); /*!\brief MARKER_INLET_SPECIES \n DESCRIPTION: Inlet Species boundary marker(s) with the following format Inlet Species: (inlet_marker, Species1, Species2, ..., SpeciesN-1, inlet_marker2, Species1, Species2, ...) */ - addInletSpeciesOption("MARKER_INLET_SPECIES", nMarker_Inlet_Species, Marker_Inlet_Species, Inlet_SpeciesVal, - nSpecies_per_Inlet); + addInletSpeciesOption("MARKER_INLET_SPECIES",nMarker_Inlet_Species, Marker_Inlet_Species, Inlet_SpeciesVal, nSpecies_per_Inlet); /*!\brief MARKER_INLET_TURBULENT \n DESCRIPTION: Inlet Turbulence boundary marker(s) with the following format Inlet Turbulent: (inlet_marker, TurbulentIntensity1, ViscosityRatio1, inlet_marker2, TurbulentIntensity2, ViscosityRatio2, ...) */ addInletTurbOption("MARKER_INLET_TURBULENT", nMarker_Inlet_Turb, Marker_Inlet_Turb, Inlet_TurbVal, nTurb_Properties); /*!\brief MARKER_RIEMANN \n DESCRIPTION: Riemann boundary marker(s) with the following formats, a unit vector. - * \n OPTIONS: See \link Riemann_Map \endlink. The variables indicated by the option and the flow direction unit - * vector must be specified. \ingroup Config*/ - addRiemannOption("MARKER_RIEMANN", nMarker_Riemann, Marker_Riemann, Kind_Data_Riemann, Riemann_Map, Riemann_Var1, - Riemann_Var2, Riemann_FlowDir); + * \n OPTIONS: See \link Riemann_Map \endlink. The variables indicated by the option and the flow direction unit vector must be specified. \ingroup Config*/ + addRiemannOption("MARKER_RIEMANN", nMarker_Riemann, Marker_Riemann, Kind_Data_Riemann, Riemann_Map, Riemann_Var1, Riemann_Var2, Riemann_FlowDir); /*!\brief MARKER_GILES \n DESCRIPTION: Giles boundary marker(s) with the following formats, a unit vector. */ - /* \n OPTIONS: See \link Giles_Map \endlink. The variables indicated by the option and the flow direction unit vector - * must be specified. \ingroup Config*/ - addGilesOption("MARKER_GILES", nMarker_Giles, Marker_Giles, Kind_Data_Giles, Giles_Map, Giles_Var1, Giles_Var2, - Giles_FlowDir, RelaxFactorAverage, RelaxFactorFourier); + /* \n OPTIONS: See \link Giles_Map \endlink. The variables indicated by the option and the flow direction unit vector must be specified. \ingroup Config*/ + addGilesOption("MARKER_GILES", nMarker_Giles, Marker_Giles, Kind_Data_Giles, Giles_Map, Giles_Var1, Giles_Var2, Giles_FlowDir, RelaxFactorAverage, RelaxFactorFourier); /*!\brief SPATIAL_FOURIER \n DESCRIPTION: Option to compute the spatial fourier trasformation for the Giles BC. */ addBoolOption("SPATIAL_FOURIER", SpatialFourier, false); - /*!\brief GILES_EXTRA_RELAXFACTOR \n DESCRIPTION: the 1st coeff the value of the under relaxation factor to apply to - * the shroud and hub, the 2nd coefficient is the the percentage of span-wise height influenced by this extra under - * relaxation factor.*/ - extrarelfac[0] = 0.1; - extrarelfac[1] = 0.1; + /*!\brief GILES_EXTRA_RELAXFACTOR \n DESCRIPTION: the 1st coeff the value of the under relaxation factor to apply to the shroud and hub, + * the 2nd coefficient is the the percentage of span-wise height influenced by this extra under relaxation factor.*/ + extrarelfac[0] = 0.1; extrarelfac[1] = 0.1; addDoubleArrayOption("GILES_EXTRA_RELAXFACTOR", 2, extrarelfac); /*!\brief AVERAGE_PROCESS_TYPE \n DESCRIPTION: types of mixing process for averaging quantities at the boundaries. \n OPTIONS: see \link MixingProcess_Map \endlink \n DEFAULT: AREA_AVERAGE \ingroup Config*/ @@ -1766,68 +1570,54 @@ void CConfig::SetConfig_Options() { /*!\brief AVERAGE_PROCESS_KIND \n DESCRIPTION: types of mixing process for averaging quantities at the boundaries. \n OPTIONS: see \link MixingProcess_Map \endlink \n DEFAULT: AREA_AVERAGE \ingroup Config*/ addEnumOption("AVERAGE_PROCESS_KIND", Kind_AverageProcess, AverageProcess_Map, AREA); - /*!\brief PERFORMANCE_AVERAGE_PROCESS_KIND \n DESCRIPTION: types of mixing process for averaging quantities at the - boundaries for performance computation. \n OPTIONS: see \link MixingProcess_Map \endlink \n DEFAULT: AREA_AVERAGE - \ingroup Config*/ + /*!\brief PERFORMANCE_AVERAGE_PROCESS_KIND \n DESCRIPTION: types of mixing process for averaging quantities at the boundaries for performance computation. + \n OPTIONS: see \link MixingProcess_Map \endlink \n DEFAULT: AREA_AVERAGE \ingroup Config*/ addEnumOption("PERFORMANCE_AVERAGE_PROCESS_KIND", Kind_PerformanceAverageProcess, AverageProcess_Map, AREA); - mixedout_coeff[0] = 1.0; - mixedout_coeff[1] = 1.0E-05; - mixedout_coeff[2] = 15.0; + mixedout_coeff[0] = 1.0; mixedout_coeff[1] = 1.0E-05; mixedout_coeff[2] = 15.0; /*!\brief MIXEDOUT_COEFF \n DESCRIPTION: the 1st coeff is an under relaxation factor for the Newton method, * the 2nd coefficient is the tolerance for the Newton method, 3rd coefficient is the maximum number of * iteration for the Newton Method.*/ addDoubleArrayOption("MIXEDOUT_COEFF", 3, mixedout_coeff); /*!\brief RAMP_ROTATING_FRAME\n DESCRIPTION: option to ramp up or down the rotating frame velocity value*/ addBoolOption("RAMP_ROTATING_FRAME", RampRotatingFrame, false); - rampRotFrame_coeff[0] = 0; - rampRotFrame_coeff[1] = 1.0; - rampRotFrame_coeff[2] = 1000.0; - /*!\brief RAMP_ROTATING_FRAME_COEFF \n DESCRIPTION: the 1st coeff is the staring velocity, + rampRotFrame_coeff[0] = 0; rampRotFrame_coeff[1] = 1.0; rampRotFrame_coeff[2] = 1000.0; + /*!\brief RAMP_ROTATING_FRAME_COEFF \n DESCRIPTION: the 1st coeff is the staring velocity, * the 2nd coeff is the number of iterations for the update, 3rd is the number of iteration */ addDoubleArrayOption("RAMP_ROTATING_FRAME_COEFF", 3, rampRotFrame_coeff); /* DESCRIPTION: AVERAGE_MACH_LIMIT is a limit value for average procedure based on the mass flux. */ addDoubleOption("AVERAGE_MACH_LIMIT", AverageMachLimit, 0.03); /*!\brief RAMP_OUTLET_PRESSURE\n DESCRIPTION: option to ramp up or down the rotating frame velocity value*/ addBoolOption("RAMP_OUTLET_PRESSURE", RampOutletPressure, false); - rampOutPres_coeff[0] = 100000.0; - rampOutPres_coeff[1] = 1.0; - rampOutPres_coeff[2] = 1000.0; + rampOutPres_coeff[0] = 100000.0; rampOutPres_coeff[1] = 1.0; rampOutPres_coeff[2] = 1000.0; /*!\brief RAMP_OUTLET_PRESSURE_COEFF \n DESCRIPTION: the 1st coeff is the staring outlet pressure, - * the 2nd coeff is the number of iterations for the update, 3rd is the number of total iteration till reaching the - * final outlet pressure value */ + * the 2nd coeff is the number of iterations for the update, 3rd is the number of total iteration till reaching the final outlet pressure value */ addDoubleArrayOption("RAMP_OUTLET_PRESSURE_COEFF", 3, rampOutPres_coeff); - /*!\brief MARKER_MIXINGPLANE \n DESCRIPTION: Identify the boundaries in which the mixing plane is applied. \ingroup - * Config*/ + /*!\brief MARKER_MIXINGPLANE \n DESCRIPTION: Identify the boundaries in which the mixing plane is applied. \ingroup Config*/ addStringListOption("MARKER_MIXINGPLANE_INTERFACE", nMarker_MixingPlaneInterface, Marker_MixingPlaneInterface); /*!\brief TURBULENT_MIXINGPLANE \n DESCRIPTION: Activate mixing plane also for turbulent quantities \ingroup Config*/ addBoolOption("TURBULENT_MIXINGPLANE", turbMixingPlane, false); - /*!\brief MARKER_TURBOMACHINERY \n DESCRIPTION: Identify the inflow and outflow boundaries in which the turbomachinery - * settings are applied. \ingroup Config*/ + /*!\brief MARKER_TURBOMACHINERY \n DESCRIPTION: Identify the inflow and outflow boundaries in which the turbomachinery settings are applied. \ingroup Config*/ addTurboPerfOption("MARKER_TURBOMACHINERY", nMarker_Turbomachinery, Marker_TurboBoundIn, Marker_TurboBoundOut); - /*!\brief NUM_SPANWISE_SECTIONS \n DESCRIPTION: Integer number of spanwise sections to compute 3D turbo BC and - * Performance for turbomachinery */ + /*!\brief NUM_SPANWISE_SECTIONS \n DESCRIPTION: Integer number of spanwise sections to compute 3D turbo BC and Performance for turbomachinery */ addUnsignedShortOption("NUM_SPANWISE_SECTIONS", nSpanWiseSections_User, 1); /*!\brief SPANWISE_KIND \n DESCRIPTION: type of algorithm to identify the span-wise sections at the turbo boundaries. \n OPTIONS: see \link SpanWise_Map \endlink \n Default: AUTOMATIC */ addEnumOption("SPANWISE_KIND", Kind_SpanWise, SpanWise_Map, AUTOMATIC); /*!\brief TURBOMACHINERY_KIND \n DESCRIPTION: types of turbomachinery architecture. \n OPTIONS: see \link TurboMachinery_Map \endlink \n Default: AXIAL */ - addEnumListOption("TURBOMACHINERY_KIND", nTurboMachineryKind, Kind_TurboMachinery, TurboMachinery_Map); + addEnumListOption("TURBOMACHINERY_KIND",nTurboMachineryKind, Kind_TurboMachinery, TurboMachinery_Map); /*!\brief MARKER_SHROUD \n DESCRIPTION: markers in which velocity is forced to 0.0. * \n Format: (shroud1, shroud2, ...)*/ addStringListOption("MARKER_SHROUD", nMarker_Shroud, Marker_Shroud); /*!\brief MARKER_SUPERSONIC_INLET \n DESCRIPTION: Supersonic inlet boundary marker(s) - * \n Format: (inlet marker, temperature, static pressure, velocity_x, velocity_y, velocity_z, ... ), i.e. - * primitive variables specified. \ingroup Config*/ - addInletOption("MARKER_SUPERSONIC_INLET", nMarker_Supersonic_Inlet, Marker_Supersonic_Inlet, Inlet_Temperature, - Inlet_Pressure, Inlet_Velocity); + * \n Format: (inlet marker, temperature, static pressure, velocity_x, velocity_y, velocity_z, ... ), i.e. primitive variables specified. \ingroup Config*/ + addInletOption("MARKER_SUPERSONIC_INLET", nMarker_Supersonic_Inlet, Marker_Supersonic_Inlet, Inlet_Temperature, Inlet_Pressure, Inlet_Velocity); /*!\brief MARKER_SUPERSONIC_OUTLET \n DESCRIPTION: Supersonic outlet boundary marker(s) \ingroup Config*/ addStringListOption("MARKER_SUPERSONIC_OUTLET", nMarker_Supersonic_Outlet, Marker_Supersonic_Outlet); /*!\brief MARKER_OUTLET \n DESCRIPTION: Outlet boundary marker(s)\n Format: ( outlet marker, back pressure (static), ... ) \ingroup Config*/ addStringDoubleListOption("MARKER_OUTLET", nMarker_Outlet, Marker_Outlet, Outlet_Pressure); - /*!\brief INC_INLET_TYPE \n DESCRIPTION: List of outlet types for incompressible flows. List length must match number - * of inlet markers. Options: PRESSURE_OUTLET, MASS_FLOW_OUTLET. \ingroup Config*/ + /*!\brief INC_INLET_TYPE \n DESCRIPTION: List of outlet types for incompressible flows. List length must match number of inlet markers. Options: PRESSURE_OUTLET, MASS_FLOW_OUTLET. \ingroup Config*/ addEnumListOption("INC_OUTLET_TYPE", nInc_Outlet, Kind_Inc_Outlet, Inc_Outlet_Map); /*!\brief MARKER_ISOTHERMAL DESCRIPTION: Isothermal wall boundary marker(s)\n * Format: ( isothermal marker, wall temperature (static), ... ) \ingroup Config */ @@ -1835,18 +1625,14 @@ void CConfig::SetConfig_Options() { /*!\brief MARKER_HEATFLUX \n DESCRIPTION: Specified heat flux wall boundary marker(s) Format: ( Heat flux marker, wall heat flux (static), ... ) \ingroup Config*/ addStringDoubleListOption("MARKER_HEATFLUX", nMarker_HeatFlux, Marker_HeatFlux, Heat_Flux); - /*!\brief INTEGRATED_HEATFLUX \n DESCRIPTION: Prescribe Heatflux in [W] instead of [W/m^2] \ingroup Config \default - * false */ + /*!\brief INTEGRATED_HEATFLUX \n DESCRIPTION: Prescribe Heatflux in [W] instead of [W/m^2] \ingroup Config \default false */ addBoolOption("INTEGRATED_HEATFLUX", Integrated_HeatFlux, false); /*!\brief MARKER_HEATTRANSFER DESCRIPTION: Heat flux with specified heat transfer coefficient boundary marker(s)\n * Format: ( Heat transfer marker, heat transfer coefficient, wall temperature (static), ... ) \ingroup Config */ - addExhaustOption("MARKER_HEATTRANSFER", nMarker_HeatTransfer, Marker_HeatTransfer, HeatTransfer_Coeff, - HeatTransfer_WallTemp); - /*!\brief Smoluchowski/Maxwell wall boundary marker(s) \n DESCRIPTION: Slip velocity and temperature jump wall - boundary marker(s) Format: ( Heat flux marker, wall temperature (static), momentum accomodation coefficient, thermal - accomodation coefficient ... ) \ingroup Config*/ - addStringDoubleListOption("MARKER_SMOLUCHOWSKI_MAXWELL", nMarker_Smoluchowski_Maxwell, Marker_Smoluchowski_Maxwell, - Isothermal_Temperature); // Missing TMAC and TAC + addExhaustOption("MARKER_HEATTRANSFER", nMarker_HeatTransfer, Marker_HeatTransfer, HeatTransfer_Coeff, HeatTransfer_WallTemp); + /*!\brief Smoluchowski/Maxwell wall boundary marker(s) \n DESCRIPTION: Slip velocity and temperature jump wall boundary marker(s) + Format: ( Heat flux marker, wall temperature (static), momentum accomodation coefficient, thermal accomodation coefficient ... ) \ingroup Config*/ + addStringDoubleListOption("MARKER_SMOLUCHOWSKI_MAXWELL", nMarker_Smoluchowski_Maxwell, Marker_Smoluchowski_Maxwell, Isothermal_Temperature); //Missing TMAC and TAC /*!\brief WALL_ROUGHNESS \n DESCRIPTION: Specified roughness heights at wall boundary marker(s) Format: ( Wall marker, roughness_height (static), ... ) \ingroup Config*/ addStringDoubleListOption("WALL_ROUGHNESS", nRough_Wall, Marker_RoughWall, Roughness_Height); @@ -1866,30 +1652,18 @@ void CConfig::SetConfig_Options() { // /* DESCRIPTION: Actuator disk double surface */ // addBoolOption("ACTDISK_SU2_DEF", ActDisk_SU2_DEF, false); /* DESCRIPTION: Definition of the distortion rack (radial number of proves / circumferential density (degree) */ - distortion[0] = 5.0; - distortion[1] = 15.0; + distortion[0] = 5.0; distortion[1] = 15.0; addDoubleArrayOption("DISTORTION_RACK", 2, distortion); /* DESCRIPTION: Values of the box to impose a subsonic nacellle (mach, Pressure, Temperature) */ - eng_val[0] = 0.0; - eng_val[1] = 0.0; - eng_val[2] = 0.0; - eng_val[3] = 0.0; - eng_val[4] = 0.0; + eng_val[0]=0.0; eng_val[1]=0.0; eng_val[2]=0.0; eng_val[3]=0.0; eng_val[4]=0.0; addDoubleArrayOption("SUBSONIC_ENGINE_VALUES", 5, eng_val); - /* DESCRIPTION: Coordinates of the box to impose a subsonic nacellle cylinder (Xmin, Ymin, Zmin, Xmax, Ymax, Zmax, - * Radius) */ - eng_cyl[0] = 0.0; - eng_cyl[1] = 0.0; - eng_cyl[2] = 0.0; - eng_cyl[3] = 1E15; - eng_cyl[4] = 1E15; - eng_cyl[5] = 1E15; - eng_cyl[6] = 1E15; + /* DESCRIPTION: Coordinates of the box to impose a subsonic nacellle cylinder (Xmin, Ymin, Zmin, Xmax, Ymax, Zmax, Radius) */ + eng_cyl[0] = 0.0; eng_cyl[1] = 0.0; eng_cyl[2] = 0.0; + eng_cyl[3] = 1E15; eng_cyl[4] = 1E15; eng_cyl[5] = 1E15; eng_cyl[6] = 1E15; addDoubleArrayOption("SUBSONIC_ENGINE_CYL", 7, eng_cyl); /* DESCRIPTION: Engine exhaust boundary marker(s) Format: (nacelle exhaust marker, total nozzle temp, total nozzle pressure, ... )*/ - addExhaustOption("MARKER_ENGINE_EXHAUST", nMarker_EngineExhaust, Marker_EngineExhaust, Exhaust_Temperature_Target, - Exhaust_Pressure_Target); + addExhaustOption("MARKER_ENGINE_EXHAUST", nMarker_EngineExhaust, Marker_EngineExhaust, Exhaust_Temperature_Target, Exhaust_Pressure_Target); /* DESCRIPTION: Clamped boundary marker(s) */ addStringListOption("MARKER_CLAMPED", nMarker_Clamped, Marker_Clamped); /* DESCRIPTION: Displacement boundary marker(s) */ @@ -1903,29 +1677,25 @@ void CConfig::SetConfig_Options() { addInletOption("MARKER_LOAD", nMarker_Load_Dir, Marker_Load_Dir, Load_Dir_Value, Load_Dir_Multiplier, Load_Dir); /* DESCRIPTION: Load boundary marker(s) Format: (inlet marker, load, multiplier, dir_x, dir_y, dir_z, ... ), i.e. primitive variables specified. */ - addInletOption("MARKER_DISPLACEMENT", nMarker_Disp_Dir, Marker_Disp_Dir, Disp_Dir_Value, Disp_Dir_Multiplier, - Disp_Dir); + addInletOption("MARKER_DISPLACEMENT", nMarker_Disp_Dir, Marker_Disp_Dir, Disp_Dir_Value, Disp_Dir_Multiplier, Disp_Dir); /* DESCRIPTION: Sine load boundary marker(s) Format: (inlet marker, load, multiplier, dir_x, dir_y, dir_z, ... ), i.e. primitive variables specified. */ - // addInletOption("MARKER_SINE_LOAD", nMarker_Load_Sine, Marker_Load_Sine, Load_Sine_Amplitude, Load_Sine_Frequency, - // Load_Sine_Dir); + //addInletOption("MARKER_SINE_LOAD", nMarker_Load_Sine, Marker_Load_Sine, Load_Sine_Amplitude, Load_Sine_Frequency, Load_Sine_Dir); /*!\brief SINE_LOAD\n DESCRIPTION: option to apply the load as a sine*/ addBoolOption("SINE_LOAD", Sine_Load, false); - sineload_coeff[0] = 0.0; - sineload_coeff[1] = 0.0; - sineload_coeff[2] = 0.0; - /*!\brief SINE_LOAD_COEFF \n DESCRIPTION: the 1st coeff is the amplitude, the 2nd is the frequency, 3rd is the phase - * in radians */ + sineload_coeff[0] = 0.0; sineload_coeff[1] = 0.0; sineload_coeff[2] = 0.0; + /*!\brief SINE_LOAD_COEFF \n DESCRIPTION: the 1st coeff is the amplitude, the 2nd is the frequency, 3rd is the phase in radians */ addDoubleArrayOption("SINE_LOAD_COEFF", 3, sineload_coeff); /*!\brief RAMP_AND_RELEASE\n DESCRIPTION: release the load after applying the ramp*/ addBoolOption("RAMP_AND_RELEASE_LOAD", RampAndRelease, false); + /* DESCRIPTION: Flow load boundary marker(s) */ + //addStringDoubleListOption("MARKER_FLOWLOAD", nMarker_FlowLoad, Marker_FlowLoad, FlowLoad_Value); /* DESCRIPTION: Damping factor for engine inlet condition */ addDoubleOption("DAMP_ENGINE_INFLOW", Damp_Engine_Inflow, 0.95); /* DESCRIPTION: Damping factor for engine exhaust condition */ addDoubleOption("DAMP_ENGINE_EXHAUST", Damp_Engine_Exhaust, 0.95); - /*!\brief ENGINE_INFLOW_TYPE \n DESCRIPTION: Inlet boundary type \n OPTIONS: see \link Engine_Inflow_Map \endlink \n - * Default: FAN_FACE_MACH \ingroup Config*/ + /*!\brief ENGINE_INFLOW_TYPE \n DESCRIPTION: Inlet boundary type \n OPTIONS: see \link Engine_Inflow_Map \endlink \n Default: FAN_FACE_MACH \ingroup Config*/ addEnumOption("ENGINE_INFLOW_TYPE", Kind_Engine_Inflow, Engine_Inflow_Map, FAN_FACE_MACH); /* DESCRIPTION: Evaluate a problem with engines */ addBoolOption("ENGINE", Engine, false); @@ -1939,8 +1709,7 @@ void CConfig::SetConfig_Options() { addBoolOption("NEWTON_KRYLOV", NewtonKrylov, false); /* DESCRIPTION: Integer parameters {startup iters, precond iters, initial tolerance relaxation}. */ addUShortArrayOption("NEWTON_KRYLOV_IPARAM", NK_IntParam.size(), NK_IntParam.data()); - /* DESCRIPTION: Double parameters {startup residual drop, precond tolerance, full tolerance residual drop, findiff - * step}. */ + /* DESCRIPTION: Double parameters {startup residual drop, precond tolerance, full tolerance residual drop, findiff step}. */ addDoubleArrayOption("NEWTON_KRYLOV_DPARAM", NK_DblParam.size(), NK_DblParam.data()); /* DESCRIPTION: Number of samples for quasi-Newton methods. */ @@ -1960,14 +1729,10 @@ void CConfig::SetConfig_Options() { /* DESCRIPTION: Activate The adaptive CFL number. */ addBoolOption("CFL_ADAPT", CFL_Adapt, false); /* !\brief CFL_ADAPT_PARAM - * DESCRIPTION: Parameters of the adaptive CFL number (factor down, factor up, CFL limit (min and max), acceptable - * linear residual ) Factor down generally <1.0, factor up generally > 1.0 to cause the CFL to increase when the - * under-relaxation parameter is 1.0 and to decrease when the under-relaxation parameter is less than 0.1. Factor is - * multiplicative. \ingroup Config*/ - default_cfl_adapt[0] = 1.0; - default_cfl_adapt[1] = 1.0; - default_cfl_adapt[2] = 10.0; - default_cfl_adapt[3] = 100.0; + * DESCRIPTION: Parameters of the adaptive CFL number (factor down, factor up, CFL limit (min and max), acceptable linear residual ) + * Factor down generally <1.0, factor up generally > 1.0 to cause the CFL to increase when the under-relaxation parameter is 1.0 + * and to decrease when the under-relaxation parameter is less than 0.1. Factor is multiplicative. \ingroup Config*/ + default_cfl_adapt[0] = 1.0; default_cfl_adapt[1] = 1.0; default_cfl_adapt[2] = 10.0; default_cfl_adapt[3] = 100.0; default_cfl_adapt[4] = 0.001; addDoubleListOption("CFL_ADAPT_PARAM", nCFL_AdaptParam, CFL_AdaptParam); /* DESCRIPTION: Reduction factor of the CFL coefficient in the adjoint problem */ @@ -1976,8 +1741,7 @@ void CConfig::SetConfig_Options() { addDoubleOption("CFL_REDUCTION_TURB", CFLRedCoeff_Turb, 1.0); /* DESCRIPTION: Reduction factor of the CFL coefficient in the turbulent adjoint problem */ addDoubleOption("CFL_REDUCTION_ADJTURB", CFLRedCoeff_AdjTurb, 1.0); - /*!\brief CFL_REDUCTION_SPECIES \n DESCRIPTION: Reduction factor of the CFL coefficient in the species problem \n - * DEFAULT: 1.0 */ + /*!\brief CFL_REDUCTION_SPECIES \n DESCRIPTION: Reduction factor of the CFL coefficient in the species problem \n DEFAULT: 1.0 */ addDoubleOption("CFL_REDUCTION_SPECIES", CFLRedCoeff_Species, 1.0); /* DESCRIPTION: External iteration offset due to restart */ addUnsignedLongOption("EXT_ITER_OFFSET", ExtIter_OffSet, 0); @@ -1999,7 +1763,7 @@ void CConfig::SetConfig_Options() { /* DESCRIPTION: Starting direct solver iteration for the unsteady adjoint */ addLongOption("UNST_ADJOINT_ITER", Unst_AdjointIter, 0); /* DESCRIPTION: Number of iterations to average the objective */ - addLongOption("ITER_AVERAGE_OBJ", Iter_Avg_Objective, 0); + addLongOption("ITER_AVERAGE_OBJ", Iter_Avg_Objective , 0); /* DESCRIPTION: Time discretization */ addEnumOption("TIME_DISCRE_FLOW", Kind_TimeIntScheme_Flow, Time_Int_Map, EULER_IMPLICIT); /* DESCRIPTION: Time discretization */ @@ -2027,12 +1791,10 @@ void CConfig::SetConfig_Options() { /*--- Options related to the linear solvers ---*/ /*!\brief LINEAR_SOLVER - * \n DESCRIPTION: Linear solver for the implicit, mesh deformation, or discrete adjoint systems \n OPTIONS: see - * \link Linear_Solver_Map \endlink \n DEFAULT: FGMRES \ingroup Config*/ + * \n DESCRIPTION: Linear solver for the implicit, mesh deformation, or discrete adjoint systems \n OPTIONS: see \link Linear_Solver_Map \endlink \n DEFAULT: FGMRES \ingroup Config*/ addEnumOption("LINEAR_SOLVER", Kind_Linear_Solver, Linear_Solver_Map, FGMRES); /*!\brief LINEAR_SOLVER_PREC - * \n DESCRIPTION: Preconditioner for the Krylov linear solvers \n OPTIONS: see \link Linear_Solver_Prec_Map \endlink - * \n DEFAULT: LU_SGS \ingroup Config*/ + * \n DESCRIPTION: Preconditioner for the Krylov linear solvers \n OPTIONS: see \link Linear_Solver_Prec_Map \endlink \n DEFAULT: LU_SGS \ingroup Config*/ addEnumOption("LINEAR_SOLVER_PREC", Kind_Linear_Solver_Prec, Linear_Solver_Prec_Map, ILU); /* DESCRIPTION: Minimum error threshold for the linear solver for the implicit formulation */ addDoubleOption("LINEAR_SOLVER_ERROR", Linear_Solver_Error, 1E-6); @@ -2073,39 +1835,31 @@ void CConfig::SetConfig_Options() { /*!\brief CONV_FIELD\n DESCRIPTION: Output field to monitor \n Default: depends on solver \ingroup Config*/ addStringListOption("CONV_FIELD", nConvField, ConvField); - /*!\brief CONV_RESIDUAL_MINVAL\n DESCRIPTION: Min value of the residual (log10 of the residual)\n DEFAULT: -14.0 - * \ingroup Config*/ + /*!\brief CONV_RESIDUAL_MINVAL\n DESCRIPTION: Min value of the residual (log10 of the residual)\n DEFAULT: -14.0 \ingroup Config*/ addDoubleOption("CONV_RESIDUAL_MINVAL", MinLogResidual, -14.0); - /*!\brief CONV_STARTITER\n DESCRIPTION: Iteration number to begin convergence monitoring\n DEFAULT: 5 \ingroup - * Config*/ + /*!\brief CONV_STARTITER\n DESCRIPTION: Iteration number to begin convergence monitoring\n DEFAULT: 5 \ingroup Config*/ addUnsignedLongOption("CONV_STARTITER", StartConv_Iter, 5); /*!\brief CONV_CAUCHY_ELEMS\n DESCRIPTION: Number of elements to apply the criteria. \n DEFAULT 100 \ingroup Config*/ addUnsignedShortOption("CONV_CAUCHY_ELEMS", Cauchy_Elems, 100); /*!\brief CONV_CAUCHY_EPS\n DESCRIPTION: Epsilon to control the series convergence \n DEFAULT: 1e-10 \ingroup Config*/ addDoubleOption("CONV_CAUCHY_EPS", Cauchy_Eps, 1E-10); - /*!\brief CONV_WINDOW_STARTITER\n DESCRIPTION: Iteration number after START_ITER_WND to begin convergence - * monitoring\n DEFAULT: 15 \ingroup Config*/ + /*!\brief CONV_WINDOW_STARTITER\n DESCRIPTION: Iteration number after START_ITER_WND to begin convergence monitoring\n DEFAULT: 15 \ingroup Config*/ addUnsignedLongOption("CONV_WINDOW_STARTITER", Wnd_StartConv_Iter, 15); - /*!\brief CONV_WINDOW_CAUCHY_EPS\n DESCRIPTION: Epsilon to control the series convergence \n DEFAULT: 1e-3 \ingroup - * Config*/ + /*!\brief CONV_WINDOW_CAUCHY_EPS\n DESCRIPTION: Epsilon to control the series convergence \n DEFAULT: 1e-3 \ingroup Config*/ addDoubleOption("CONV_WINDOW_CAUCHY_EPS", Wnd_Cauchy_Eps, 1E-3); - /*!\brief CONV_WINDOW_CAUCHY_ELEMS\n DESCRIPTION: Number of elements to apply the criteria. \n DEFAULT 100 \ingroup - * Config*/ + /*!\brief CONV_WINDOW_CAUCHY_ELEMS\n DESCRIPTION: Number of elements to apply the criteria. \n DEFAULT 100 \ingroup Config*/ addUnsignedShortOption("CONV_WINDOW_CAUCHY_ELEMS", Wnd_Cauchy_Elems, 100); - /*!\brief WINDOW_CAUCHY_CRIT \n DESCRIPTION: Determines, if the cauchy convergence criterion should be used for - * windowed time averaged objective functions*/ - addBoolOption("WINDOW_CAUCHY_CRIT", Wnd_Cauchy_Crit, false); + /*!\brief WINDOW_CAUCHY_CRIT \n DESCRIPTION: Determines, if the cauchy convergence criterion should be used for windowed time averaged objective functions*/ + addBoolOption("WINDOW_CAUCHY_CRIT",Wnd_Cauchy_Crit, false); /*!\brief CONV_WINDOW_FIELD - * \n DESCRIPTION: Output fields for the Cauchy criterium for the TIME iteration. The criterium is applied to the - * windowed time average of the chosen funcion. */ - addStringListOption("CONV_WINDOW_FIELD", nWndConvField, WndConvField); + * \n DESCRIPTION: Output fields for the Cauchy criterium for the TIME iteration. The criterium is applied to the windowed time average of the chosen funcion. */ + addStringListOption("CONV_WINDOW_FIELD",nWndConvField, WndConvField); /*!\par CONFIG_CATEGORY: Multi-grid \ingroup Config*/ /*!\brief MGLEVEL\n DESCRIPTION: Multi-grid Levels. DEFAULT: 0 \ingroup Config*/ addUnsignedShortOption("MGLEVEL", nMGLevels, 0); - /*!\brief MGCYCLE\n DESCRIPTION: Multi-grid cycle. OPTIONS: See \link MG_Cycle_Map \endlink. Defualt V_CYCLE \ingroup - * Config*/ + /*!\brief MGCYCLE\n DESCRIPTION: Multi-grid cycle. OPTIONS: See \link MG_Cycle_Map \endlink. Defualt V_CYCLE \ingroup Config*/ addEnumOption("MGCYCLE", MGCycle, MG_Cycle_Map, V_CYCLE); /*!\brief MG_PRE_SMOOTH\n DESCRIPTION: Multi-grid pre-smoothing level \ingroup Config*/ addUShortListOption("MG_PRE_SMOOTH", nMG_PreSmooth, MG_PreSmooth); @@ -2113,96 +1867,74 @@ void CConfig::SetConfig_Options() { addUShortListOption("MG_POST_SMOOTH", nMG_PostSmooth, MG_PostSmooth); /*!\brief MG_CORRECTION_SMOOTH\n DESCRIPTION: Jacobi implicit smoothing of the correction \ingroup Config*/ addUShortListOption("MG_CORRECTION_SMOOTH", nMG_CorrecSmooth, MG_CorrecSmooth); - /*!\brief MG_DAMP_RESTRICTION\n DESCRIPTION: Damping factor for the residual restriction. DEFAULT: 0.75 \ingroup - * Config*/ + /*!\brief MG_DAMP_RESTRICTION\n DESCRIPTION: Damping factor for the residual restriction. DEFAULT: 0.75 \ingroup Config*/ addDoubleOption("MG_DAMP_RESTRICTION", Damp_Res_Restric, 0.75); - /*!\brief MG_DAMP_PROLONGATION\n DESCRIPTION: Damping factor for the correction prolongation. DEFAULT 0.75 \ingroup - * Config*/ + /*!\brief MG_DAMP_PROLONGATION\n DESCRIPTION: Damping factor for the correction prolongation. DEFAULT 0.75 \ingroup Config*/ addDoubleOption("MG_DAMP_PROLONGATION", Damp_Correc_Prolong, 0.75); /*!\par CONFIG_CATEGORY: Spatial Discretization \ingroup Config*/ /*--- Options related to the spatial discretization ---*/ /*!\brief NUM_METHOD_GRAD - * \n DESCRIPTION: Numerical method for spatial gradients \n OPTIONS: See \link Gradient_Map \endlink. \n DEFAULT: - * WEIGHTED_LEAST_SQUARES. \ingroup Config*/ + * \n DESCRIPTION: Numerical method for spatial gradients \n OPTIONS: See \link Gradient_Map \endlink. \n DEFAULT: WEIGHTED_LEAST_SQUARES. \ingroup Config*/ addEnumOption("NUM_METHOD_GRAD", Kind_Gradient_Method, Gradient_Map, WEIGHTED_LEAST_SQUARES); /*!\brief NUM_METHOD_GRAD - * \n DESCRIPTION: Numerical method for spatial gradients used only for upwind reconstruction \n OPTIONS: See \link - * Gradient_Map \endlink. \n DEFAULT: NO_GRADIENT. \ingroup Config*/ + * \n DESCRIPTION: Numerical method for spatial gradients used only for upwind reconstruction \n OPTIONS: See \link Gradient_Map \endlink. \n DEFAULT: NO_GRADIENT. \ingroup Config*/ addEnumOption("NUM_METHOD_GRAD_RECON", Kind_Gradient_Method_Recon, Gradient_Map, NO_GRADIENT); /*!\brief VENKAT_LIMITER_COEFF - * \n DESCRIPTION: Coefficient for the limiter. DEFAULT value 0.5. Larger values decrease the extent of limiting, - * values approaching zero cause lower-order approximation to the solution. \ingroup Config */ + * \n DESCRIPTION: Coefficient for the limiter. DEFAULT value 0.5. Larger values decrease the extent of limiting, values approaching zero cause lower-order approximation to the solution. \ingroup Config */ addDoubleOption("VENKAT_LIMITER_COEFF", Venkat_LimiterCoeff, 0.05); /*!\brief ADJ_SHARP_LIMITER_COEFF - * \n DESCRIPTION: Coefficient for detecting the limit of the sharp edges. DEFAULT value 3.0. Use with sharp edges - * limiter. \ingroup Config*/ + * \n DESCRIPTION: Coefficient for detecting the limit of the sharp edges. DEFAULT value 3.0. Use with sharp edges limiter. \ingroup Config*/ addDoubleOption("ADJ_SHARP_LIMITER_COEFF", AdjSharp_LimiterCoeff, 3.0); /*!\brief LIMITER_ITER - * \n DESCRIPTION: Freeze the value of the limiter after a number of iterations. DEFAULT value 999999. \ingroup - * Config*/ + * \n DESCRIPTION: Freeze the value of the limiter after a number of iterations. DEFAULT value 999999. \ingroup Config*/ addUnsignedLongOption("LIMITER_ITER", LimiterIter, 999999); /*!\brief CONV_NUM_METHOD_FLOW - * \n DESCRIPTION: Convective numerical method \n OPTIONS: See \link Upwind_Map \endlink , \link Centered_Map - * \endlink. \ingroup Config*/ + * \n DESCRIPTION: Convective numerical method \n OPTIONS: See \link Upwind_Map \endlink , \link Centered_Map \endlink. \ingroup Config*/ addConvectOption("CONV_NUM_METHOD_FLOW", Kind_ConvNumScheme_Flow, Kind_Centered_Flow, Kind_Upwind_Flow); /*!\brief NUM_METHOD_FEM_FLOW - * \n DESCRIPTION: Numerical method \n OPTIONS: See \link FEM_Map \endlink , \link Centered_Map \endlink. \ingroup - * Config*/ + * \n DESCRIPTION: Numerical method \n OPTIONS: See \link FEM_Map \endlink , \link Centered_Map \endlink. \ingroup Config*/ addConvectFEMOption("NUM_METHOD_FEM_FLOW", Kind_ConvNumScheme_FEM_Flow, Kind_FEM_Flow); /*!\brief MUSCL_FLOW \n DESCRIPTION: Check if the MUSCL scheme should be used \ingroup Config*/ addBoolOption("MUSCL_FLOW", MUSCL_Flow, true); /*!\brief SLOPE_LIMITER_FLOW - * DESCRIPTION: Slope limiter for the direct solution. \n OPTIONS: See \link Limiter_Map \endlink \n DEFAULT - * VENKATAKRISHNAN \ingroup Config*/ + * DESCRIPTION: Slope limiter for the direct solution. \n OPTIONS: See \link Limiter_Map \endlink \n DEFAULT VENKATAKRISHNAN \ingroup Config*/ addEnumOption("SLOPE_LIMITER_FLOW", Kind_SlopeLimit_Flow, Limiter_Map, LIMITER::VENKATAKRISHNAN); - jst_coeff[0] = 0.5; - jst_coeff[1] = 0.02; - /*!\brief JST_SENSOR_COEFF \n DESCRIPTION: 2nd and 4th order artificial dissipation coefficients for the JST method - * \ingroup Config*/ + jst_coeff[0] = 0.5; jst_coeff[1] = 0.02; + /*!\brief JST_SENSOR_COEFF \n DESCRIPTION: 2nd and 4th order artificial dissipation coefficients for the JST method \ingroup Config*/ addDoubleArrayOption("JST_SENSOR_COEFF", 2, jst_coeff); - /*!\brief LAX_SENSOR_COEFF \n DESCRIPTION: 1st order artificial dissipation coefficients for the Lax-Friedrichs - * method. \ingroup Config*/ + /*!\brief LAX_SENSOR_COEFF \n DESCRIPTION: 1st order artificial dissipation coefficients for the Lax-Friedrichs method. \ingroup Config*/ addDoubleOption("LAX_SENSOR_COEFF", Kappa_1st_Flow, 0.15); - /*!\brief USE_ACCURATE_FLUX_JACOBIANS \n DESCRIPTION: Use numerically computed Jacobians for AUSM+up(2) and SLAU(2) - * \ingroup Config*/ + /*!\brief USE_ACCURATE_FLUX_JACOBIANS \n DESCRIPTION: Use numerically computed Jacobians for AUSM+up(2) and SLAU(2) \ingroup Config*/ addBoolOption("USE_ACCURATE_FLUX_JACOBIANS", Use_Accurate_Jacobians, false); - /*!\brief CENTRAL_JACOBIAN_FIX_FACTOR \n DESCRIPTION: Improve the numerical properties (diagonal dominance) of the - * global Jacobian matrix, 3 to 4 is "optimum" (central schemes) \ingroup Config*/ + /*!\brief CENTRAL_JACOBIAN_FIX_FACTOR \n DESCRIPTION: Improve the numerical properties (diagonal dominance) of the global Jacobian matrix, 3 to 4 is "optimum" (central schemes) \ingroup Config*/ addDoubleOption("CENTRAL_JACOBIAN_FIX_FACTOR", Cent_Jac_Fix_Factor, 4.0); - /*!\brief CENTRAL_JACOBIAN_FIX_FACTOR \n DESCRIPTION: Control numerical properties of the global Jacobian matrix using - * a multiplication factor for incompressible central schemes \ingroup Config*/ + /*!\brief CENTRAL_JACOBIAN_FIX_FACTOR \n DESCRIPTION: Control numerical properties of the global Jacobian matrix using a multiplication factor for incompressible central schemes \ingroup Config*/ addDoubleOption("CENTRAL_INC_JACOBIAN_FIX_FACTOR", Cent_Inc_Jac_Fix_Factor, 1.0); /*!\brief CONV_NUM_METHOD_ADJFLOW * \n DESCRIPTION: Convective numerical method for the adjoint solver. - * \n OPTIONS: See \link Upwind_Map \endlink , \link Centered_Map \endlink. Note: not all methods are guaranteed to - * be implemented for the adjoint solver. \ingroup Config */ + * \n OPTIONS: See \link Upwind_Map \endlink , \link Centered_Map \endlink. Note: not all methods are guaranteed to be implemented for the adjoint solver. \ingroup Config */ addConvectOption("CONV_NUM_METHOD_ADJFLOW", Kind_ConvNumScheme_AdjFlow, Kind_Centered_AdjFlow, Kind_Upwind_AdjFlow); /*!\brief MUSCL_ADJFLOW \n DESCRIPTION: Check if the MUSCL scheme should be used \ingroup Config*/ addBoolOption("MUSCL_ADJFLOW", MUSCL_AdjFlow, true); /*!\brief SLOPE_LIMITER_ADJFLOW - * DESCRIPTION: Slope limiter for the adjoint solution. \n OPTIONS: See \link Limiter_Map \endlink \n DEFAULT - * VENKATAKRISHNAN \ingroup Config*/ + * DESCRIPTION: Slope limiter for the adjoint solution. \n OPTIONS: See \link Limiter_Map \endlink \n DEFAULT VENKATAKRISHNAN \ingroup Config*/ addEnumOption("SLOPE_LIMITER_ADJFLOW", Kind_SlopeLimit_AdjFlow, Limiter_Map, LIMITER::VENKATAKRISHNAN); - jst_adj_coeff[0] = 0.5; - jst_adj_coeff[1] = 0.02; - /*!\brief ADJ_JST_SENSOR_COEFF \n DESCRIPTION: 2nd and 4th order artificial dissipation coefficients for the adjoint - * JST method. \ingroup Config*/ + jst_adj_coeff[0] = 0.5; jst_adj_coeff[1] = 0.02; + /*!\brief ADJ_JST_SENSOR_COEFF \n DESCRIPTION: 2nd and 4th order artificial dissipation coefficients for the adjoint JST method. \ingroup Config*/ addDoubleArrayOption("ADJ_JST_SENSOR_COEFF", 2, jst_adj_coeff); - /*!\brief LAX_SENSOR_COEFF \n DESCRIPTION: 1st order artificial dissipation coefficients for the adjoint - * Lax-Friedrichs method. \ingroup Config*/ + /*!\brief LAX_SENSOR_COEFF \n DESCRIPTION: 1st order artificial dissipation coefficients for the adjoint Lax-Friedrichs method. \ingroup Config*/ addDoubleOption("ADJ_LAX_SENSOR_COEFF", Kappa_1st_AdjFlow, 0.15); /*!\brief MUSCL_TURB \n DESCRIPTION: Check if the MUSCL scheme should be used \ingroup Config*/ addBoolOption("MUSCL_TURB", MUSCL_Turb, false); /*!\brief SLOPE_LIMITER_TURB - * \n DESCRIPTION: Slope limiter \n OPTIONS: See \link Limiter_Map \endlink \n DEFAULT VENKATAKRISHNAN \ingroup - * Config*/ + * \n DESCRIPTION: Slope limiter \n OPTIONS: See \link Limiter_Map \endlink \n DEFAULT VENKATAKRISHNAN \ingroup Config*/ addEnumOption("SLOPE_LIMITER_TURB", Kind_SlopeLimit_Turb, Limiter_Map, LIMITER::VENKATAKRISHNAN); /*!\brief CONV_NUM_METHOD_TURB * \n DESCRIPTION: Convective numerical method \ingroup Config*/ @@ -2211,25 +1943,21 @@ void CConfig::SetConfig_Options() { /*!\brief MUSCL_ADJTURB \n DESCRIPTION: Check if the MUSCL scheme should be used \ingroup Config*/ addBoolOption("MUSCL_ADJTURB", MUSCL_AdjTurb, false); /*!\brief SLOPE_LIMITER_ADJTURB - * \n DESCRIPTION: Slope limiter \n OPTIONS: See \link Limiter_Map \endlink \n DEFAULT VENKATAKRISHNAN \ingroup - * Config */ + * \n DESCRIPTION: Slope limiter \n OPTIONS: See \link Limiter_Map \endlink \n DEFAULT VENKATAKRISHNAN \ingroup Config */ addEnumOption("SLOPE_LIMITER_ADJTURB", Kind_SlopeLimit_AdjTurb, Limiter_Map, LIMITER::VENKATAKRISHNAN); - /*!\brief CONV_NUM_METHOD_ADJTURB\n DESCRIPTION: Convective numerical method for the adjoint/turbulent problem - * \ingroup Config*/ + /*!\brief CONV_NUM_METHOD_ADJTURB\n DESCRIPTION: Convective numerical method for the adjoint/turbulent problem \ingroup Config*/ addConvectOption("CONV_NUM_METHOD_ADJTURB", Kind_ConvNumScheme_AdjTurb, Kind_Centered_AdjTurb, Kind_Upwind_AdjTurb); /*!\brief MUSCL_SPECIES \n DESCRIPTION: Check if the MUSCL scheme should be used \n DEFAULT false \ingroup Config*/ addBoolOption("MUSCL_SPECIES", MUSCL_Species, false); - /*!\brief SLOPE_LIMITER_SPECIES \n DESCRIPTION: Slope limiter \n OPTIONS: See \link Limiter_Map \endlink \n DEFAULT - * NONE \ingroup Config*/ + /*!\brief SLOPE_LIMITER_SPECIES \n DESCRIPTION: Slope limiter \n OPTIONS: See \link Limiter_Map \endlink \n DEFAULT NONE \ingroup Config*/ addEnumOption("SLOPE_LIMITER_SPECIES", Kind_SlopeLimit_Species, Limiter_Map, LIMITER::NONE); /*!\brief CONV_NUM_METHOD_SPECIES \n DESCRIPTION: Convective numerical method for species transport \ingroup Config*/ addConvectOption("CONV_NUM_METHOD_SPECIES", Kind_ConvNumScheme_Species, Kind_Centered_Species, Kind_Upwind_Species); /*!\brief MUSCL_HEAT \n DESCRIPTION: Check if the MUSCL scheme should be used \ingroup Config*/ addBoolOption("MUSCL_HEAT", MUSCL_Heat, false); - /*!\brief SLOPE_LIMITER_HEAT \n DESCRIPTION: Slope limiter \n OPTIONS: See \link Limiter_Map \endlink \n DEFAULT NONE - * \ingroup Config*/ + /*!\brief SLOPE_LIMITER_HEAT \n DESCRIPTION: Slope limiter \n OPTIONS: See \link Limiter_Map \endlink \n DEFAULT NONE \ingroup Config*/ addEnumOption("SLOPE_LIMITER_HEAT", Kind_SlopeLimit_Heat, Limiter_Map, LIMITER::NONE); /*!\brief CONV_NUM_METHOD_HEAT \n DESCRIPTION: Convective numerical method */ addConvectOption("CONV_NUM_METHOD_HEAT", Kind_ConvNumScheme_Heat, Kind_Centered_Heat, Kind_Upwind_Heat); @@ -2242,11 +1970,9 @@ void CConfig::SetConfig_Options() { /*!\brief MG_ADJFLOW\n DESCRIPTION: Multigrid with the adjoint problem. \n Defualt: YES \ingroup Config*/ addBoolOption("MG_ADJFLOW", MG_AdjointFlow, true); - /*!\brief OBJECTIVE_WEIGHT \n DESCRIPTION: Adjoint problem boundary condition weights. Applies scaling factor to - * objective(s) \ingroup Config*/ + /*!\brief OBJECTIVE_WEIGHT \n DESCRIPTION: Adjoint problem boundary condition weights. Applies scaling factor to objective(s) \ingroup Config*/ addDoubleListOption("OBJECTIVE_WEIGHT", nObjW, Weight_ObjFunc); - /*!\brief OBJECTIVE_FUNCTION \n DESCRIPTION: Adjoint problem boundary condition \n OPTIONS: see \link Objective_Map - * \endlink \n DEFAULT: DRAG_COEFFICIENT \ingroup Config*/ + /*!\brief OBJECTIVE_FUNCTION \n DESCRIPTION: Adjoint problem boundary condition \n OPTIONS: see \link Objective_Map \endlink \n DEFAULT: DRAG_COEFFICIENT \ingroup Config*/ addEnumListOption("OBJECTIVE_FUNCTION", nObj, Kind_ObjFunc, Objective_Map); /*!\brief CUSTOM_OBJFUNC \n DESCRIPTION: User-provided definition of a custom objective function. \ingroup Config*/ @@ -2263,8 +1989,7 @@ void CConfig::SetConfig_Options() { /* DESCRIPTION: parameter for the definition of a complex objective function */ addDoubleOption("DCMZ_DCL_VALUE", dCMz_dCL, 0.0); - geo_loc[0] = 0.0; - geo_loc[1] = 1.0; + geo_loc[0] = 0.0; geo_loc[1] = 1.0; /* DESCRIPTION: Definition of the airfoil section */ addDoubleArrayOption("GEO_BOUNDS", 2, geo_loc); /* DESCRIPTION: Identify the body to slice */ @@ -2275,11 +2000,8 @@ void CConfig::SetConfig_Options() { addUnsignedShortOption("GEO_NUMBER_STATIONS", nWingStations, 25); /* DESCRIPTION: Definition of the airfoil sections */ addDoubleListOption("GEO_LOCATION_STATIONS", nLocationStations, LocationStations); - nacelle_location[0] = 0.0; - nacelle_location[1] = 0.0; - nacelle_location[2] = 0.0; - nacelle_location[3] = 0.0; - nacelle_location[4] = 0.0; + nacelle_location[0] = 0.0; nacelle_location[1] = 0.0; nacelle_location[2] = 0.0; + nacelle_location[3] = 0.0; nacelle_location[4] = 0.0; /* DESCRIPTION: Definition of the nacelle location (higlite coordinates, tilt angle, toe angle) */ addDoubleArrayOption("GEO_NACELLE_LOCATION", 5, nacelle_location); /* DESCRIPTION: Output sectional forces for specified markers. */ @@ -2299,29 +2021,28 @@ void CConfig::SetConfig_Options() { addBoolOption("FROZEN_LIMITER_DISC", Frozen_Limiter_Disc, false); /* DESCRIPTION: Use an inconsistent (primal/dual) discrete adjoint formulation */ addBoolOption("INCONSISTENT_DISC", Inconsistent_Disc, false); - /* DESCRIPTION: */ + /* DESCRIPTION: */ addDoubleOption("FIX_AZIMUTHAL_LINE", FixAzimuthalLine, 90.0); /*!\brief SENS_REMOVE_SHARP - * \n DESCRIPTION: Remove sharp edges from the sensitivity evaluation \n Format: SENS_REMOVE_SHARP = YES \n DEFAULT: - * NO \ingroup Config*/ + * \n DESCRIPTION: Remove sharp edges from the sensitivity evaluation \n Format: SENS_REMOVE_SHARP = YES \n DEFAULT: NO \ingroup Config*/ addBoolOption("SENS_REMOVE_SHARP", Sens_Remove_Sharp, false); /* DESCRIPTION: Automatically reorient elements that seem flipped */ - addBoolOption("REORIENT_ELEMENTS", ReorientElements, true); + addBoolOption("REORIENT_ELEMENTS",ReorientElements, true); /*!\par CONFIG_CATEGORY: Sobolev Gradient Solver Parameters \ingroup Config */ /*--- Options related to the Sobolev smoothing solver ---*/ /* DESCRIPTION: Switch to activate gradient smoothing */ - addBoolOption("SMOOTH_GRADIENT", SmoothGradient, false); + addBoolOption("SMOOTH_GRADIENT",SmoothGradient, false); /* DESCRIPTION: Epsilon of the identity term in the Laplace Beltrami Operator */ - addDoubleOption("SMOOTHING_EPSILON1", SmoothingEps1, 1.0); + addDoubleOption("SMOOTHING_EPSILON1",SmoothingEps1, 1.0); /* DESCRIPTION: Epsilon of the Laplace term in the Laplace Beltrami Operator */ - addDoubleOption("SMOOTHING_EPSILON2", SmoothingEps2, 1.0); + addDoubleOption("SMOOTHING_EPSILON2",SmoothingEps2, 1.0); /* DESCRIPTION: Switch to calculate for each dimension separately */ addBoolOption("SEPARATE_DIMENSIONS", SmoothSepDim, false); /* DESCRIPTION: Switch to activate working on the design surfaces only */ - addBoolOption("SMOOTH_ON_SURFACE", SmoothOnSurface, false); + addBoolOption("SMOOTH_ON_SURFACE",SmoothOnSurface, false); /* DESCRIPTION: Switch to activate zero Dirichlet boundary for surface mode */ addBoolOption("DIRICHLET_SURFACE_BOUNDARY", SmoothDirichletSurfaceBound, false); /* DESCRIPTION: Switch to activate the debbuging modus */ @@ -2330,11 +2051,9 @@ void CConfig::SetConfig_Options() { * \n DESCRIPTION: Output filename for the Sobolev Hessian approximation. \ingroup Config*/ addStringOption("HESS_OBJFUNC_FILENAME", ObjFunc_Hess_FileName, string("of_hess.dat")); - /* DESCRIPTION: Linear solver for the gradient smoothing\n OPTIONS: see \link Linear_Solver_Map \endlink \n DEFAULT: - * FGMRES \ingroup Config*/ + /* DESCRIPTION: Linear solver for the gradient smoothing\n OPTIONS: see \link Linear_Solver_Map \endlink \n DEFAULT: FGMRES \ingroup Config*/ addEnumOption("GRAD_LINEAR_SOLVER", Kind_Grad_Linear_Solver, Linear_Solver_Map, FGMRES); - /* \n DESCRIPTION: Preconditioner for the Krylov linear solvers \n OPTIONS: see \link Linear_Solver_Prec_Map \endlink - * \n DEFAULT: ILU \ingroup Config*/ + /* \n DESCRIPTION: Preconditioner for the Krylov linear solvers \n OPTIONS: see \link Linear_Solver_Prec_Map \endlink \n DEFAULT: ILU \ingroup Config*/ addEnumOption("GRAD_LINEAR_SOLVER_PREC", Kind_Grad_Linear_Solver_Prec, Linear_Solver_Prec_Map, ILU); /* DESCRIPTION: Minimum error threshold for the linear solver for the implicit formulation */ addDoubleOption("GRAD_LINEAR_SOLVER_ERROR", Grad_Linear_Solver_Error, 1E-14); @@ -2344,52 +2063,39 @@ void CConfig::SetConfig_Options() { /*!\par CONFIG_CATEGORY: Input/output files and formats \ingroup Config */ /*--- Options related to input/output files and formats ---*/ - /*!\brief OUTPUT_FORMAT \n DESCRIPTION: I/O format for output plots. \n OPTIONS: see \link TabOutput_Map \endlink \n - * DEFAULT: TECPLOT \ingroup Config */ + /*!\brief OUTPUT_FORMAT \n DESCRIPTION: I/O format for output plots. \n OPTIONS: see \link TabOutput_Map \endlink \n DEFAULT: TECPLOT \ingroup Config */ addEnumOption("TABULAR_FORMAT", Tab_FileFormat, TabOutput_Map, TAB_OUTPUT::TAB_CSV); - /*!\brief OUTPUT_PRECISION \n DESCRIPTION: Set .precision(value) to specified value for SU2_DOT and HISTORY - * output. Useful for exact gradient validation. \n DEFAULT: 6 \ingroup Config */ + /*!\brief OUTPUT_PRECISION \n DESCRIPTION: Set .precision(value) to specified value for SU2_DOT and HISTORY output. Useful for exact gradient validation. \n DEFAULT: 6 \ingroup Config */ addUnsignedShortOption("OUTPUT_PRECISION", output_precision, 10); /*!\brief ACTDISK_JUMP \n DESCRIPTION: The jump is given by the difference in values or a ratio */ addEnumOption("ACTDISK_JUMP", ActDisk_Jump, Jump_Map, DIFFERENCE); - /*!\brief MESH_FORMAT \n DESCRIPTION: Mesh input file format \n OPTIONS: see \link Input_Map \endlink \n DEFAULT: SU2 - * \ingroup Config*/ + /*!\brief MESH_FORMAT \n DESCRIPTION: Mesh input file format \n OPTIONS: see \link Input_Map \endlink \n DEFAULT: SU2 \ingroup Config*/ addEnumOption("MESH_FORMAT", Mesh_FileFormat, Input_Map, SU2); /* DESCRIPTION: Mesh input file */ addStringOption("MESH_FILENAME", Mesh_FileName, string("mesh.su2")); - /*!\brief MESH_OUT_FILENAME \n DESCRIPTION: Mesh output file name. Used when converting, scaling, or deforming a mesh. - * \n DEFAULT: mesh_out.su2 \ingroup Config*/ + /*!\brief MESH_OUT_FILENAME \n DESCRIPTION: Mesh output file name. Used when converting, scaling, or deforming a mesh. \n DEFAULT: mesh_out.su2 \ingroup Config*/ addStringOption("MESH_OUT_FILENAME", Mesh_Out_FileName, string("mesh_out.su2")); - /* DESCRIPTION: List of the number of grid points in the RECTANGLE or BOX grid in the x,y,z directions. (default: - * (33,33,33) ). */ + /* DESCRIPTION: List of the number of grid points in the RECTANGLE or BOX grid in the x,y,z directions. (default: (33,33,33) ). */ addShortListOption("MESH_BOX_SIZE", nMesh_Box_Size, Mesh_Box_Size); - /* DESCRIPTION: List of the length of the RECTANGLE or BOX grid in the x,y,z directions. (default: (1.0,1.0,1.0) ). */ - mesh_box_length[0] = 1.0; - mesh_box_length[1] = 1.0; - mesh_box_length[2] = 1.0; + /* DESCRIPTION: List of the length of the RECTANGLE or BOX grid in the x,y,z directions. (default: (1.0,1.0,1.0) ). */ + mesh_box_length[0] = 1.0; mesh_box_length[1] = 1.0; mesh_box_length[2] = 1.0; addDoubleArrayOption("MESH_BOX_LENGTH", 3, mesh_box_length); - /* DESCRIPTION: List of the offset from 0.0 of the RECTANGLE or BOX grid in the x,y,z directions. (default: - * (0.0,0.0,0.0) ). */ - mesh_box_offset[0] = 0.0; - mesh_box_offset[1] = 0.0; - mesh_box_offset[2] = 0.0; + /* DESCRIPTION: List of the offset from 0.0 of the RECTANGLE or BOX grid in the x,y,z directions. (default: (0.0,0.0,0.0) ). */ + mesh_box_offset[0] = 0.0; mesh_box_offset[1] = 0.0; mesh_box_offset[2] = 0.0; addDoubleArrayOption("MESH_BOX_OFFSET", 3, mesh_box_offset); /* DESCRIPTION: Determine if the mesh file supports multizone. \n DEFAULT: true (temporarily) */ addBoolOption("MULTIZONE_MESH", Multizone_Mesh, true); - /* DESCRIPTION: Determine if we need to allocate memory to store the multizone residual. \n DEFAULT: false - * (temporarily) */ + /* DESCRIPTION: Determine if we need to allocate memory to store the multizone residual. \n DEFAULT: false (temporarily) */ addBoolOption("MULTIZONE_RESIDUAL", Multizone_Residual, false); - /* !\brief CONTROLLING_VARIABLE_NAMES \n DESCRIPTION: Names of the variables used as inputs for the data regression - * method in flamelet or data-driven fluid models. */ + /* !\brief CONTROLLING_VARIABLE_NAMES \n DESCRIPTION: Names of the variables used as inputs for the data regression method in flamelet or data-driven fluid models. */ addStringListOption("CONTROLLING_VARIABLE_NAMES", n_control_vars, controlling_variable_names); - /* !\brief CONTROLLING_VARIABLE_SOURCE_NAMES \n DESCRIPTION: Names of the variables in the flamelet manifold - * corresponding to the source terms of the controlling variables. */ + /* !\brief CONTROLLING_VARIABLE_SOURCE_NAMES \n DESCRIPTION: Names of the variables in the flamelet manifold corresponding to the source terms of the controlling variables. */ addStringListOption("CONTROLLING_VARIABLE_SOURCE_NAMES", n_control_vars, cv_source_names); /* DESCRIPTION: Names of the passive lookup variables for flamelet LUT */ @@ -2401,21 +2107,17 @@ void CConfig::SetConfig_Options() { /* DESCRIPTION: Names of the user scalar source terms. */ addStringListOption("USER_SOURCE_NAMES", n_user_sources, user_source_names); - /*!\brief CONV_FILENAME \n DESCRIPTION: Output file convergence history (w/o extension) \n DEFAULT: history \ingroup - * Config*/ + /*!\brief CONV_FILENAME \n DESCRIPTION: Output file convergence history (w/o extension) \n DEFAULT: history \ingroup Config*/ addStringOption("CONV_FILENAME", Conv_FileName, string("history")); /*!\brief BREAKDOWN_FILENAME \n DESCRIPTION: Output file forces breakdown \ingroup Config*/ addStringOption("BREAKDOWN_FILENAME", Breakdown_FileName, string("forces_breakdown.dat")); - /*!\brief SOLUTION_FLOW_FILENAME \n DESCRIPTION: Restart flow input file (the file output under the filename set by - * RESTART_FLOW_FILENAME) \n DEFAULT: solution_flow.dat \ingroup Config */ + /*!\brief SOLUTION_FLOW_FILENAME \n DESCRIPTION: Restart flow input file (the file output under the filename set by RESTART_FLOW_FILENAME) \n DEFAULT: solution_flow.dat \ingroup Config */ addStringOption("SOLUTION_FILENAME", Solution_FileName, string("solution.dat")); - /*!\brief SOLUTION_ADJ_FILENAME\n DESCRIPTION: Restart adjoint input file. Objective function abbreviation is - * expected. \ingroup Config*/ + /*!\brief SOLUTION_ADJ_FILENAME\n DESCRIPTION: Restart adjoint input file. Objective function abbreviation is expected. \ingroup Config*/ addStringOption("SOLUTION_ADJ_FILENAME", Solution_AdjFileName, string("solution_adj.dat")); /*!\brief RESTART_FLOW_FILENAME \n DESCRIPTION: Output file restart flow \ingroup Config*/ addStringOption("RESTART_FILENAME", Restart_FileName, string("restart.dat")); - /*!\brief RESTART_ADJ_FILENAME \n DESCRIPTION: Output file restart adjoint. Objective function abbreviation will be - * appended. \ingroup Config*/ + /*!\brief RESTART_ADJ_FILENAME \n DESCRIPTION: Output file restart adjoint. Objective function abbreviation will be appended. \ingroup Config*/ addStringOption("RESTART_ADJ_FILENAME", Restart_AdjFileName, string("restart_adj.dat")); /*!\brief VOLUME_FLOW_FILENAME \n DESCRIPTION: Output file flow (w/o extension) variables \ingroup Config */ addStringOption("VOLUME_FILENAME", Volume_FileName, string("vol_solution")); @@ -2459,7 +2161,7 @@ void CConfig::SetConfig_Options() { /* DESCRIPTION: Type of mesh motion */ addEnumOption("GRID_MOVEMENT", Kind_GridMovement, GridMovement_Map, NO_MOVEMENT); /* DESCRIPTION: Type of surface motion */ - addEnumListOption("SURFACE_MOVEMENT", nKind_SurfaceMovement, Kind_SurfaceMovement, SurfaceMovement_Map); + addEnumListOption("SURFACE_MOVEMENT",nKind_SurfaceMovement, Kind_SurfaceMovement, SurfaceMovement_Map); /* DESCRIPTION: Marker(s) of moving surfaces (MOVING_WALL or DEFORMING grid motion). */ addStringListOption("MARKER_MOVING", nMarker_Moving, Marker_Moving); /* DESCRIPTION: Marker(s) of gradient problem boundaries. */ @@ -2516,8 +2218,7 @@ void CConfig::SetConfig_Options() { addDoubleOption("AIRFOIL_MASS_RATIO", AirfoilMassRatio, 60); /* DESCRIPTION: Distance in semichords by which the center of gravity lies behind the elastic axis. */ addDoubleOption("CG_LOCATION", CG_Location, 1.8); - /* DESCRIPTION: The radius of gyration squared (expressed in semichords) of the typical section about the elastic - * axis. */ + /* DESCRIPTION: The radius of gyration squared (expressed in semichords) of the typical section about the elastic axis. */ addDoubleOption("RADIUS_GYRATION_SQUARED", RadiusGyrationSquared, 3.48); /* DESCRIPTION: Solve the aeroelastic equations every given number of internal iterations. */ addUnsignedShortOption("AEROELASTIC_ITER", AeroelasticIter, 3); @@ -2565,9 +2266,7 @@ void CConfig::SetConfig_Options() { /* DESCRIPTION: Evaluate equivalent area on the Near-Field */ addBoolOption("EQUIV_AREA", EquivArea, false); - ea_lim[0] = 0.0; - ea_lim[1] = 1.0; - ea_lim[2] = 1.0; + ea_lim[0] = 0.0; ea_lim[1] = 1.0; ea_lim[2] = 1.0; /* DESCRIPTION: Integration limits of the equivalent area ( xmin, xmax, Dist_NearField ) */ addDoubleArrayOption("EA_INT_LIMIT", 3, ea_lim); /* DESCRIPTION: Equivalent area scaling factor */ @@ -2606,23 +2305,16 @@ void CConfig::SetConfig_Options() { addDVValueOption("DV_VALUE", nDV_Value, DV_Value, nDV, ParamDV, Design_Variable); /* DESCRIPTION: Provide a file of surface positions from an external parameterization. */ addStringOption("DV_FILENAME", DV_Filename, string("surface_positions.dat")); - /* DESCRIPTION: File of sensitivities as an unordered ASCII file with rows of x, y, z, dJ/dx, dJ/dy, dJ/dz for each - * volume grid point. */ + /* DESCRIPTION: File of sensitivities as an unordered ASCII file with rows of x, y, z, dJ/dx, dJ/dy, dJ/dz for each volume grid point. */ addStringOption("DV_UNORDERED_SENS_FILENAME", DV_Unordered_Sens_Filename, string("unordered_sensitivity.dat")); - /* DESCRIPTION: File of sensitivities as an ASCII file with rows of x, y, z, dJ/dx, dJ/dy, dJ/dz for each surface grid - * point. */ + /* DESCRIPTION: File of sensitivities as an ASCII file with rows of x, y, z, dJ/dx, dJ/dy, dJ/dz for each surface grid point. */ addStringOption("DV_SENS_FILENAME", DV_Sens_Filename, string("surface_sensitivity.dat")); - /*!\brief OUTPUT_FORMAT \n DESCRIPTION: I/O format for output plots. \n OPTIONS: see \link Output_Map \endlink \n - * DEFAULT: TECPLOT \ingroup Config */ + /*!\brief OUTPUT_FORMAT \n DESCRIPTION: I/O format for output plots. \n OPTIONS: see \link Output_Map \endlink \n DEFAULT: TECPLOT \ingroup Config */ addEnumOption("DV_SENSITIVITY_FORMAT", Sensitivity_FileFormat, Sensitivity_Map, SU2_NATIVE); /* DESCRIPTION: Hold the grid fixed in a region */ addBoolOption("HOLD_GRID_FIXED", Hold_GridFixed, false); - grid_fix[0] = -1E15; - grid_fix[1] = -1E15; - grid_fix[2] = -1E15; - grid_fix[3] = 1E15; - grid_fix[4] = 1E15; - grid_fix[5] = 1E15; + grid_fix[0] = -1E15; grid_fix[1] = -1E15; grid_fix[2] = -1E15; + grid_fix[3] = 1E15; grid_fix[4] = 1E15; grid_fix[5] = 1E15; /* DESCRIPTION: Coordinates of the box where the grid will be deformed (Xmin, Ymin, Zmin, Xmax, Ymax, Zmax) */ addDoubleArrayOption("HOLD_GRID_FIXED_COORD", 6, grid_fix); @@ -2638,8 +2330,7 @@ void CConfig::SetConfig_Options() { addDoubleOption("DEFORM_COEFF", Deform_Coeff, 1E6); /* DESCRIPTION: Deform limit in m or inches */ addDoubleOption("DEFORM_LIMIT", Deform_Limit, 1E6); - /* DESCRIPTION: Type of element stiffness imposed for FEA mesh deformation (INVERSE_VOLUME, WALL_DISTANCE, - * CONSTANT_STIFFNESS) */ + /* DESCRIPTION: Type of element stiffness imposed for FEA mesh deformation (INVERSE_VOLUME, WALL_DISTANCE, CONSTANT_STIFFNESS) */ addEnumOption("DEFORM_STIFFNESS_TYPE", Deform_StiffnessType, Deform_Stiffness_Map, SOLID_WALL_DISTANCE); /* DESCRIPTION: Young's modulus for constant stiffness FEA method of grid deformation */ addDoubleOption("DEFORM_ELASTICITY_MODULUS", Deform_ElasticityMod, 2E11); @@ -2647,11 +2338,9 @@ void CConfig::SetConfig_Options() { addDoubleOption("DEFORM_POISSONS_RATIO", Deform_PoissonRatio, 0.3); /* DESCRIPTION: Size of the layer of highest stiffness for wall distance-based mesh stiffness */ addDoubleOption("DEFORM_STIFF_LAYER_SIZE", Deform_StiffLayerSize, 0.0); - /* DESCRIPTION: Linear solver for the mesh deformation\n OPTIONS: see \link Linear_Solver_Map \endlink \n DEFAULT: - * FGMRES \ingroup Config*/ + /* DESCRIPTION: Linear solver for the mesh deformation\n OPTIONS: see \link Linear_Solver_Map \endlink \n DEFAULT: FGMRES \ingroup Config*/ addEnumOption("DEFORM_LINEAR_SOLVER", Kind_Deform_Linear_Solver, Linear_Solver_Map, FGMRES); - /* \n DESCRIPTION: Preconditioner for the Krylov linear solvers \n OPTIONS: see \link Linear_Solver_Prec_Map \endlink - * \n DEFAULT: LU_SGS \ingroup Config*/ + /* \n DESCRIPTION: Preconditioner for the Krylov linear solvers \n OPTIONS: see \link Linear_Solver_Prec_Map \endlink \n DEFAULT: LU_SGS \ingroup Config*/ addEnumOption("DEFORM_LINEAR_SOLVER_PREC", Kind_Deform_Linear_Solver_Prec, Linear_Solver_Prec_Map, ILU); /* DESCRIPTION: Minimum error threshold for the linear solver for the implicit formulation */ addDoubleOption("DEFORM_LINEAR_SOLVER_ERROR", Deform_Linear_Solver_Error, 1E-14); @@ -2692,11 +2381,9 @@ void CConfig::SetConfig_Options() { /*!\par CONFIG_CATEGORY: FEA solver \ingroup Config*/ /*--- Options related to the FEA solver ---*/ - /*!\brief FEA_FILENAME \n DESCRIPTION: Filename to input for element-based properties \n Default: - * default_element_properties.dat \ingroup Config */ + /*!\brief FEA_FILENAME \n DESCRIPTION: Filename to input for element-based properties \n Default: default_element_properties.dat \ingroup Config */ addStringOption("FEA_FILENAME", FEA_FileName, string("default_element_properties.dat")); - /* DESCRIPTION: Determine if advanced features are used from the element-based FEA analysis (NO, YES = experimental) - */ + /* DESCRIPTION: Determine if advanced features are used from the element-based FEA analysis (NO, YES = experimental) */ addBoolOption("FEA_ADVANCED_MODE", FEAAdvancedMode, false); /* DESCRIPTION: Modulus of elasticity */ @@ -2711,7 +2398,7 @@ void CConfig::SetConfig_Options() { addDoubleOption("KNOWLES_N", Knowles_N, 1.0); /* DESCRIPTION: Include DE effects - * Options: NO, YES \ingroup Config */ + * Options: NO, YES \ingroup Config */ addBoolOption("DE_EFFECTS", DE_Effects, false); /*!\brief ELECTRIC_FIELD_CONST \n DESCRIPTION: Value of the Dielectric Elastomer constant */ addDoubleListOption("ELECTRIC_FIELD_CONST", nElectric_Constant, Electric_Constant); @@ -2721,22 +2408,18 @@ void CConfig::SetConfig_Options() { addDoubleListOption("ELECTRIC_FIELD_DIR", nDim_Electric_Field, Electric_Field_Dir); /*!\brief DESIGN_VARIABLE_FEA - * \n DESCRIPTION: Design variable for FEA problems \n OPTIONS: See \link DVFEA_Map \endlink \n DEFAULT - * VENKATAKRISHNAN \ingroup Config */ + * \n DESCRIPTION: Design variable for FEA problems \n OPTIONS: See \link DVFEA_Map \endlink \n DEFAULT VENKATAKRISHNAN \ingroup Config */ addEnumOption("DESIGN_VARIABLE_FEA", Kind_DV_FEA, DVFEA_Map, NODV_FEA); /* DESCRIPTION: Consider a reference solution for the structure (optimization applications) - * Options: NO, YES \ingroup Config */ + * Options: NO, YES \ingroup Config */ addBoolOption("REFERENCE_GEOMETRY", RefGeom, false); /*!\brief REFERENCE_GEOMETRY_PENALTY\n DESCRIPTION: Penalty weight value for the objective function \ingroup Config*/ addDoubleOption("REFERENCE_GEOMETRY_PENALTY", RefGeom_Penalty, 1E6); - /*!\brief REFERENCE_GEOMETRY_FILENAME \n DESCRIPTION: Reference geometry filename \n Default: reference_geometry.dat - * \ingroup Config */ + /*!\brief REFERENCE_GEOMETRY_FILENAME \n DESCRIPTION: Reference geometry filename \n Default: reference_geometry.dat \ingroup Config */ addStringOption("REFERENCE_GEOMETRY_FILENAME", RefGeom_FEMFileName, string("reference_geometry.dat")); - /*!\brief REFERENCE_GEOMETRY_FORMAT \n DESCRIPTION: Format of the reference geometry file \n OPTIONS: see \link - * Input_Ref_Map \endlink \n DEFAULT: SU2 \ingroup Config*/ + /*!\brief REFERENCE_GEOMETRY_FORMAT \n DESCRIPTION: Format of the reference geometry file \n OPTIONS: see \link Input_Ref_Map \endlink \n DEFAULT: SU2 \ingroup Config*/ addEnumOption("REFERENCE_GEOMETRY_FORMAT", RefGeom_FileFormat, Input_Ref_Map, SU2_REF); - /*!\brief REFERENCE_GEOMETRY_SURFACE\n DESCRIPTION: If true consider only the surfaces where loads are applied. - * \ingroup Config*/ + /*!\brief REFERENCE_GEOMETRY_SURFACE\n DESCRIPTION: If true consider only the surfaces where loads are applied. \ingroup Config*/ addBoolOption("REFERENCE_GEOMETRY_SURFACE", RefGeomSurf, false); /*!\brief REFERENCE_NODE\n DESCRIPTION: Reference node for the structure (optimization applications) */ @@ -2746,27 +2429,23 @@ void CConfig::SetConfig_Options() { /*!\brief REFERENCE_NODE_PENALTY\n DESCRIPTION: Penalty weight value for the objective function \ingroup Config*/ addDoubleOption("REFERENCE_NODE_PENALTY", RefNode_Penalty, 1E3); - /*!\brief TOTAL_DV_PENALTY\n DESCRIPTION: Penalty weight value to maintain the total sum of DV constant \ingroup - * Config*/ + /*!\brief TOTAL_DV_PENALTY\n DESCRIPTION: Penalty weight value to maintain the total sum of DV constant \ingroup Config*/ addDoubleOption("TOTAL_DV_PENALTY", DV_Penalty, 0); - /*!\brief STRESS_PENALTY_PARAM\n DESCRIPTION: Maximum allowed stress and KS exponent for structural optimization - * \ingroup Config*/ + /*!\brief STRESS_PENALTY_PARAM\n DESCRIPTION: Maximum allowed stress and KS exponent for structural optimization \ingroup Config*/ addDoubleArrayOption("STRESS_PENALTY_PARAM", 2, StressPenaltyParam.data()); /*!\brief REGIME_TYPE \n DESCRIPTION: Geometric condition \n OPTIONS: see \link Struct_Map \endlink \ingroup Config*/ addEnumOption("GEOMETRIC_CONDITIONS", Kind_Struct_Solver, Struct_Map, STRUCT_DEFORMATION::SMALL); /*!\brief REGIME_TYPE \n DESCRIPTION: Material model \n OPTIONS: see \link Material_Map \endlink \ingroup Config*/ addEnumOption("MATERIAL_MODEL", Kind_Material, Material_Map, STRUCT_MODEL::LINEAR_ELASTIC); - /*!\brief REGIME_TYPE \n DESCRIPTION: Compressibility of the material \n OPTIONS: see \link MatComp_Map \endlink - * \ingroup Config*/ + /*!\brief REGIME_TYPE \n DESCRIPTION: Compressibility of the material \n OPTIONS: see \link MatComp_Map \endlink \ingroup Config*/ addEnumOption("MATERIAL_COMPRESSIBILITY", Kind_Material_Compress, MatComp_Map, STRUCT_COMPRESS::COMPRESSIBLE); /* DESCRIPTION: Consider a prestretch in the structural domain - * Options: NO, YES \ingroup Config */ + * Options: NO, YES \ingroup Config */ addBoolOption("PRESTRETCH", Prestretch, false); - /*!\brief PRESTRETCH_FILENAME \n DESCRIPTION: Filename to input for prestretching membranes \n Default: - * prestretch_file.dat \ingroup Config */ + /*!\brief PRESTRETCH_FILENAME \n DESCRIPTION: Filename to input for prestretching membranes \n Default: prestretch_file.dat \ingroup Config */ addStringOption("PRESTRETCH_FILENAME", Prestretch_FEMFileName, string("prestretch_file.dat")); /* DESCRIPTION: Iterative method for non-linear structural analysis */ @@ -2774,10 +2453,10 @@ void CConfig::SetConfig_Options() { /* DESCRIPTION: Formulation for bidimensional elasticity solver */ addEnumOption("FORMULATION_ELASTICITY_2D", Kind_2DElasForm, ElasForm_2D, STRUCT_2DFORM::PLANE_STRAIN); /* DESCRIPTION: Apply dead loads - * Options: NO, YES \ingroup Config */ + * Options: NO, YES \ingroup Config */ addBoolOption("DEAD_LOAD", DeadLoad, false); /* DESCRIPTION: Temporary: pseudo static analysis (no density in dynamic analysis) - * Options: NO, YES \ingroup Config */ + * Options: NO, YES \ingroup Config */ addBoolOption("PSEUDO_STATIC", PseudoStatic, false); /* DESCRIPTION: Parameter alpha for Newmark scheme (s) */ addDoubleOption("NEWMARK_BETA", Newmark_beta, 0.25); @@ -2798,9 +2477,7 @@ void CConfig::SetConfig_Options() { /* DESCRIPTION: Maximum number of increments of the */ addUnsignedLongOption("NUMBER_INCREMENTS", IncLoad_Nincrements, 10); - inc_crit[0] = 0.0; - inc_crit[1] = 0.0; - inc_crit[2] = 0.0; + inc_crit[0] = 0.0; inc_crit[1] = 0.0; inc_crit[2] = 0.0; /* DESCRIPTION: Definition of the UTOL RTOL ETOL*/ addDoubleArrayOption("INCREMENTAL_CRITERIA", 3, inc_crit); @@ -2818,8 +2495,7 @@ void CConfig::SetConfig_Options() { addDoubleListOption("TOPOL_OPTIM_FILTER_RADIUS", top_optim_nRadius, top_optim_filter_radius); addDoubleListOption("TOPOL_OPTIM_KERNEL_PARAM", top_optim_nKernelParams, top_optim_kernel_params); addUnsignedShortOption("TOPOL_OPTIM_SEARCH_LIMIT", top_optim_search_lim, 0); - addEnumOption("TOPOL_OPTIM_PROJECTION_TYPE", top_optim_proj_type, Projection_Function_Map, - ENUM_PROJECTION_FUNCTION::NONE); + addEnumOption("TOPOL_OPTIM_PROJECTION_TYPE", top_optim_proj_type, Projection_Function_Map, ENUM_PROJECTION_FUNCTION::NONE); addDoubleOption("TOPOL_OPTIM_PROJECTION_PARAM", top_optim_proj_param, 0.0); /* CONFIG_CATEGORY: FSI solver */ @@ -2865,6 +2541,7 @@ void CConfig::SetConfig_Options() { /* DESCRIPTION: Determines if the forces breakdown is written out */ addBoolOption("WRT_FORCES_BREAKDOWN", Wrt_ForcesBreakdown, false); + /*!\par KIND_INTERPOLATION \n * DESCRIPTION: Type of interpolation to use for multi-zone problems. \n OPTIONS: see \link Interpolator_Map \endlink * Sets Kind_Interpolation \ingroup Config @@ -2877,14 +2554,13 @@ void CConfig::SetConfig_Options() { addUnsignedShortOption("NUM_NEAREST_NEIGHBORS", NumNearestNeighbors, 1); /*!\par KIND_INTERPOLATION \n - * DESCRIPTION: Type of radial basis function to use for radial basis function interpolation. \n OPTIONS: see \link - * RadialBasis_Map \endlink Sets Kind_RadialBasis \ingroup Config + * DESCRIPTION: Type of radial basis function to use for radial basis function interpolation. \n OPTIONS: see \link RadialBasis_Map \endlink + * Sets Kind_RadialBasis \ingroup Config */ - addEnumOption("KIND_RADIAL_BASIS_FUNCTION", Kind_RadialBasisFunction, RadialBasisFunction_Map, - RADIAL_BASIS::WENDLAND_C2); + addEnumOption("KIND_RADIAL_BASIS_FUNCTION", Kind_RadialBasisFunction, RadialBasisFunction_Map, RADIAL_BASIS::WENDLAND_C2); /* DESCRIPTION: Use polynomial term in radial basis function interpolation. - * Options: NO, YES \ingroup Config */ + * Options: NO, YES \ingroup Config */ addBoolOption("RADIAL_BASIS_FUNCTION_POLYNOMIAL_TERM", RadialBasisFunction_PolynomialOption, true); /* DESCRIPTION: Radius for radial basis function. */ @@ -2893,19 +2569,17 @@ void CConfig::SetConfig_Options() { /* DESCRIPTION: Tolerance to prune small coefficients from the RBF interpolation matrix. */ addDoubleOption("RADIAL_BASIS_FUNCTION_PRUNE_TOLERANCE", RadialBasisFunction_PruneTol, 1e-6); - /*!\par INLETINTERPOLATION \n - * DESCRIPTION: Type of spanwise interpolation to use for the inlet face. \n OPTIONS: see \link - * Inlet_SpanwiseInterpolation_Map \endlink Sets Kind_InletInterpolation \ingroup Config + /*!\par INLETINTERPOLATION \n + * DESCRIPTION: Type of spanwise interpolation to use for the inlet face. \n OPTIONS: see \link Inlet_SpanwiseInterpolation_Map \endlink + * Sets Kind_InletInterpolation \ingroup Config */ - addEnumOption("INLET_INTERPOLATION_FUNCTION", Kind_InletInterpolationFunction, Inlet_SpanwiseInterpolation_Map, - INLET_SPANWISE_INTERP::NONE); + addEnumOption("INLET_INTERPOLATION_FUNCTION",Kind_InletInterpolationFunction, Inlet_SpanwiseInterpolation_Map, INLET_SPANWISE_INTERP::NONE); - /*!\par INLETINTERPOLATION \n - * DESCRIPTION: Type of spanwise interpolation to use for the inlet face. \n OPTIONS: see \link - * Inlet_SpanwiseInterpolation_Map \endlink Sets Kind_InletInterpolation \ingroup Config + /*!\par INLETINTERPOLATION \n + * DESCRIPTION: Type of spanwise interpolation to use for the inlet face. \n OPTIONS: see \link Inlet_SpanwiseInterpolation_Map \endlink + * Sets Kind_InletInterpolation \ingroup Config */ - addEnumOption("INLET_INTERPOLATION_DATA_TYPE", Kind_Inlet_InterpolationType, Inlet_SpanwiseInterpolationType_Map, - INLET_INTERP_TYPE::VR_VTHETA); + addEnumOption("INLET_INTERPOLATION_DATA_TYPE", Kind_Inlet_InterpolationType, Inlet_SpanwiseInterpolationType_Map, INLET_INTERP_TYPE::VR_VTHETA); addBoolOption("PRINT_INLET_INTERPOLATED_DATA", PrintInlet_InterpolatedData, false); @@ -2943,14 +2617,10 @@ void CConfig::SetConfig_Options() { /* DESCRIPTION: Rotation of the volumetric heat source respect to Z axis */ addDoubleOption("HEAT_SOURCE_ROTATION_Z", Heat_Source_Rot_Z, 0.0); /* DESCRIPTION: Position of heat source center (Heat_Source_Center_X, Heat_Source_Center_Y, Heat_Source_Center_Z) */ - hs_center[0] = 0.0; - hs_center[1] = 0.0; - hs_center[2] = 0.0; + hs_center[0] = 0.0; hs_center[1] = 0.0; hs_center[2] = 0.0; addDoubleArrayOption("HEAT_SOURCE_CENTER", 3, hs_center); /* DESCRIPTION: Vector of heat source radii (Heat_Source_Axes_A, Heat_Source_Axes_B, Heat_Source_Axes_C) */ - hs_axes[0] = 1.0; - hs_axes[1] = 1.0; - hs_axes[2] = 1.0; + hs_axes[0] = 1.0; hs_axes[1] = 1.0; hs_axes[2] = 1.0; addDoubleArrayOption("HEAT_SOURCE_AXES", 3, hs_axes); /*!\brief MARKER_EMISSIVITY DESCRIPTION: Wall emissivity of the marker for radiation purposes \n @@ -2965,8 +2635,7 @@ void CConfig::SetConfig_Options() { /* DESCRIPTION: CHT interface coupling methods */ /* Options: NO, YES \ingroup Config */ - addEnumOption("CHT_COUPLING_METHOD", Kind_CHT_Coupling, CHT_Coupling_Map, - CHT_COUPLING::DIRECT_TEMPERATURE_ROBIN_HEATFLUX); + addEnumOption("CHT_COUPLING_METHOD", Kind_CHT_Coupling, CHT_Coupling_Map, CHT_COUPLING::DIRECT_TEMPERATURE_ROBIN_HEATFLUX); /*!\par CONFIG_CATEGORY: Visualize Control Volumes \ingroup Config*/ /*--- options related to visualizing control volumes ---*/ @@ -3011,9 +2680,7 @@ void CConfig::SetConfig_Options() { addEnumOption("FFD_COORD_SYSTEM", FFD_CoordSystem, CoordSystem_Map, CARTESIAN); /* DESCRIPTION: Axis information for the spherical and cylindrical coord system */ - ffd_axis[0] = 0.0; - ffd_axis[1] = 0.0; - ffd_axis[2] = 0.0; + ffd_axis[0] = 0.0; ffd_axis[1] = 0.0; ffd_axis[2] =0.0; addDoubleArrayOption("FFD_AXIS", 3, ffd_axis); /* DESCRIPTION: Number of total iterations in the FFD point inversion */ @@ -3050,17 +2717,21 @@ void CConfig::SetConfig_Options() { addEnumOption("FFD_CONTINUITY", FFD_Continuity, Continuity_Map, DERIVATIVE_2ND); /* DESCRIPTION: Kind of blending for the FFD definition */ - addEnumOption("FFD_BLENDING", FFD_Blending, Blending_Map, BEZIER); + addEnumOption("FFD_BLENDING", FFD_Blending, Blending_Map, BEZIER ); /* DESCRIPTION: Order of the BSplines for BSpline Blending function */ - ffd_coeff[0] = 2; - ffd_coeff[1] = 2; - ffd_coeff[2] = 2; + ffd_coeff[0] = 2; ffd_coeff[1] = 2; ffd_coeff[2] = 2; addDoubleArrayOption("FFD_BSPLINE_ORDER", 3, ffd_coeff); /*--- Options for the automatic differentiation methods ---*/ /*!\par CONFIG_CATEGORY: Automatic Differentation options\ingroup Config*/ + /* DESCRIPTION: Direct differentiation mode (forward) */ + addEnumOption("DIRECT_DIFF", DirectDiff, DirectDiff_Var_Map, NO_DERIVATIVE); + + /* DESCRIPTION: Automatic differentiation mode (reverse) */ + addBoolOption("AUTO_DIFF", AD_Mode, NO); + /* DESCRIPTION: Preaccumulation in the AD mode. */ addBoolOption("PREACC", AD_Preaccumulation, YES); @@ -3254,9 +2925,11 @@ void CConfig::SetConfig_Options() { addUnsignedShortOption("ROM_SAVE_FREQ", rom_save_freq, 1); /* END_CONFIG_OPTIONS */ + } void CConfig::SetConfig_Parsing(char case_filename[MAX_STRING_SIZE]) { + ifstream case_file; /*--- Read the configuration file ---*/ @@ -3270,29 +2943,32 @@ void CConfig::SetConfig_Parsing(char case_filename[MAX_STRING_SIZE]) { SetConfig_Parsing(case_file); case_file.close(); + } -void CConfig::SetConfig_Parsing(istream& config_buffer) { +void CConfig::SetConfig_Parsing(istream& config_buffer){ + string text_line, option_name; vector option_value; string errorString; - const int max_err_count = 30; // Maximum number of errors to print before stopping - int err_count = 0; // How many errors have we found in the config file + const int max_err_count = 30; // Maximum number of errors to print before stopping + int err_count = 0; // How many errors have we found in the config file int line_count = 1; map included_options; /*--- Parse the configuration file and set the options ---*/ - while (getline(config_buffer, text_line)) { + while (getline (config_buffer, text_line)) { + if (err_count >= max_err_count) { errorString.append("Too many errors, stopping parse."); break; } - PrintingToolbox::trim(text_line); + PrintingToolbox::trim(text_line); /*--- Check if there is a line continuation character at the * end of the current line or somewhere in between (the rest is ignored then). @@ -3300,78 +2976,74 @@ void CConfig::SetConfig_Parsing(istream& config_buffer) { * If there is a statement after a cont. char * throw an error. ---*/ - if (!text_line.empty() && (text_line.front() != '%')) { - while (text_line.back() == '\\' || (PrintingToolbox::split(text_line, '\\').size() > 1)) { - string tmp; - getline(config_buffer, tmp); - line_count++; - if (tmp.find_first_of('=') != string::npos) { - errorString.append("Line " + to_string(line_count) + ": Statement found after continuation character.\n"); - } - PrintingToolbox::trim(tmp); - if (tmp.front() != '%') { - text_line = PrintingToolbox::split(text_line, '\\')[0]; - text_line += " " + tmp; - } - } - } + if (!text_line.empty() && (text_line.front() != '%')){ + while (text_line.back() == '\\' || + (PrintingToolbox::split(text_line, '\\').size() > 1)){ + string tmp; + getline (config_buffer, tmp); + line_count++; + if (tmp.find_first_of('=') != string::npos){ + errorString.append("Line " + to_string(line_count) + ": Statement found after continuation character.\n"); + } + PrintingToolbox::trim(tmp); + if (tmp.front() != '%'){ + text_line = PrintingToolbox::split(text_line, '\\')[0]; + text_line += " " + tmp; + } + } + } if (TokenizeString(text_line, option_name, option_value)) { /*--- See if it's a python option ---*/ if (option_map.find(option_name) == option_map.end()) { - string newString; - newString.append("Line " + to_string(line_count) + " " + option_name); - newString.append(": invalid option name"); - newString.append(". Check current SU2 options in config_template.cfg."); - newString.append("\n"); - if (!option_name.compare("SINGLEZONE_DRIVER")) - newString.append("Option SINGLEZONE_DRIVER is deprecated, it does not have a replacement.\n\n"); - else if (!option_name.compare("DYN_TIMESTEP")) - newString.append("DYN_TIMESTEP is deprecated. Use TIME_STEP instead.\n\n"); - else if (!option_name.compare("DYN_TIME")) - newString.append("DYN_TIME is deprecated. Use MAX_TIME instead.\n\n"); - else if (!option_name.compare("DYNAMIC_ANALYSIS")) - newString.append("DYNAMIC_ANALYSIS is deprecated. Use TIME_DOMAIN instead.\n\n"); - else if (!option_name.compare("SPECIES_USE_STRONG_BC")) - newString.append( - "SPECIES_USE_STRONG_BC is deprecated. Use MARKER_SPECIES_STRONG_BC= (marker1, ...) instead.\n\n"); - else { - /*--- Find the most likely candidate for the unrecognized option, based on the length - of start and end character sequences shared by candidates and the option. ---*/ - auto countMatchChars = [&option_name](const string& candidate) { - const size_t sz1 = option_name.size(), sz2 = candidate.size(); - size_t nMatch = 0; - for (size_t i = 0; i < min(sz1, sz2); ++i) { - if (option_name[i] == candidate[i]) - nMatch++; - else - break; - } - for (size_t i = 0; i < min(sz1, sz2); ++i) { - if (option_name[sz1 - 1 - i] == candidate[sz2 - 1 - i]) - nMatch++; - else - break; - } - return nMatch; - }; - string match; - size_t maxScore = 0; - for (auto& candidate : option_map) { - auto score = countMatchChars(candidate.first); - if (score > maxScore) { - maxScore = score; - match = candidate.first; + string newString; + newString.append("Line " + to_string(line_count) + " " + option_name); + newString.append(": invalid option name"); + newString.append(". Check current SU2 options in config_template.cfg."); + newString.append("\n"); + if (!option_name.compare("SINGLEZONE_DRIVER")) + newString.append("Option SINGLEZONE_DRIVER is deprecated, it does not have a replacement.\n\n"); + else if (!option_name.compare("DYN_TIMESTEP")) + newString.append("DYN_TIMESTEP is deprecated. Use TIME_STEP instead.\n\n"); + else if (!option_name.compare("DYN_TIME")) + newString.append("DYN_TIME is deprecated. Use MAX_TIME instead.\n\n"); + else if (!option_name.compare("DYNAMIC_ANALYSIS")) + newString.append("DYNAMIC_ANALYSIS is deprecated. Use TIME_DOMAIN instead.\n\n"); + else if (!option_name.compare("SPECIES_USE_STRONG_BC")) + newString.append("SPECIES_USE_STRONG_BC is deprecated. Use MARKER_SPECIES_STRONG_BC= (marker1, ...) instead.\n\n"); + else { + /*--- Find the most likely candidate for the unrecognized option, based on the length + of start and end character sequences shared by candidates and the option. ---*/ + auto countMatchChars = [&option_name](const string& candidate) { + const size_t sz1 = option_name.size(), sz2 = candidate.size(); + size_t nMatch = 0; + for (size_t i=0; i maxScore) { + maxScore = score; + match = candidate.first; + } } + newString.append("Did you mean "); + newString.append(match); + newString.append("?\n"); } - newString.append("Did you mean "); - newString.append(match); - newString.append("?\n"); - } - errorString.append(newString); - err_count++; - line_count++; + errorString.append(newString); + err_count++; + line_count++; continue; } @@ -3379,7 +3051,7 @@ void CConfig::SetConfig_Parsing(istream& config_buffer) { if (included_options.find(option_name) != included_options.end()) { string newString; - newString.append("Line " + to_string(line_count) + " " + option_name); + newString.append("Line " + to_string(line_count) + " " + option_name); newString.append(": option appears twice"); newString.append("\n"); errorString.append(newString); @@ -3400,27 +3072,18 @@ void CConfig::SetConfig_Parsing(istream& config_buffer) { /*--- valid option, but deprecated value ---*/ if (!option_name.compare("KIND_TURB_MODEL")) { if (option_value[0] == "SST_SUST") - errorString.append( - "Option KIND_TURB_MODEL=SST_SUST is deprecated. Use KIND_TURB_MODEL=SST, SST_OPTIONS=SUSTAINING " - "instead.\n"); + errorString.append("Option KIND_TURB_MODEL=SST_SUST is deprecated. Use KIND_TURB_MODEL=SST, SST_OPTIONS=SUSTAINING instead.\n"); else if (option_value[0] == "SA_NEG") - errorString.append( - "Option KIND_TURB_MODEL=SA_NEG is deprecated. Use KIND_TURB_MODEL=SA, SA_OPTIONS=NEGATIVE instead.\n"); + errorString.append("Option KIND_TURB_MODEL=SA_NEG is deprecated. Use KIND_TURB_MODEL=SA, SA_OPTIONS=NEGATIVE instead.\n"); else if (option_value[0] == "SA_E") - errorString.append( - "Option KIND_TURB_MODEL=SA_E is deprecated. Use KIND_TURB_MODEL=SA, SA_OPTIONS=EDWARDS instead.\n"); + errorString.append("Option KIND_TURB_MODEL=SA_E is deprecated. Use KIND_TURB_MODEL=SA, SA_OPTIONS=EDWARDS instead.\n"); else if (option_value[0] == "SA_COMP") - errorString.append( - "Option KIND_TURB_MODEL=SA_COMP is deprecated. Use KIND_TURB_MODEL=SA, SA_OPTIONS=COMPRESSIBILITY " - "instead.\n"); + errorString.append("Option KIND_TURB_MODEL=SA_COMP is deprecated. Use KIND_TURB_MODEL=SA, SA_OPTIONS=COMPRESSIBILITY instead.\n"); else if (option_value[0] == "SA_E_COMP") - errorString.append( - "Option KIND_TURB_MODEL=SA_E_COMP is deprecated. Use KIND_TURB_MODEL=SA, " - "SA_OPTIONS=EDWARDS,COMPRESSIBILITY instead.\n"); + errorString.append("Option KIND_TURB_MODEL=SA_E_COMP is deprecated. Use KIND_TURB_MODEL=SA, SA_OPTIONS=EDWARDS,COMPRESSIBILITY instead.\n"); } else if (!option_name.compare("KIND_TRANS_MODEL")) { if (option_value[0] == "BC") - errorString.append( - "Option KIND_TRANS_MODEL=BC is deprecated. Use KIND_TURB_MODEL=SA, SA_OPTIONS=BCM instead.\n"); + errorString.append("Option KIND_TRANS_MODEL=BC is deprecated. Use KIND_TURB_MODEL=SA, SA_OPTIONS=BCM instead.\n"); } errorString.append(out); errorString.append("\n"); @@ -3437,25 +3100,28 @@ void CConfig::SetConfig_Parsing(istream& config_buffer) { } } -void CConfig::SetDefaultFromConfig(CConfig* config) { - map noInheritance = {{"SCREEN_OUTPUT", true}, {"HISTORY_OUTPUT", true}}; +void CConfig::SetDefaultFromConfig(CConfig *config){ + + map noInheritance = {{"SCREEN_OUTPUT", true},{"HISTORY_OUTPUT", true}}; map::iterator iter = all_options.begin(), curr_iter; - while (iter != all_options.end()) { + while (iter != all_options.end()){ curr_iter = iter++; - if (!config->option_map[curr_iter->first]->GetValue().empty() && !noInheritance[curr_iter->first]) { + if (!config->option_map[curr_iter->first]->GetValue().empty() && !noInheritance[curr_iter->first]){ option_map[curr_iter->first]->SetValue(config->option_map[curr_iter->first]->GetValue()); all_options.erase(curr_iter); } } } -void CConfig::SetDefault() { +void CConfig::SetDefault(){ + /*--- Set the default values for all of the options that weren't set ---*/ for (auto iter = all_options.begin(); iter != all_options.end(); ++iter) { - if (option_map[iter->first]->GetValue().empty()) option_map[iter->first]->SetDefault(); + if (option_map[iter->first]->GetValue().empty()) + option_map[iter->first]->SetDefault(); } } @@ -3468,27 +3134,28 @@ bool CConfig::SetRunTime_Parsing(char case_filename[MAX_STRING_SIZE]) { case_file.open(case_filename, ios::in); - if (case_file.fail()) { - return false; - } + if (case_file.fail()) { return false; } string errorString; - int err_count = 0; // How many errors have we found in the config file - const int max_err_count = 30; // Maximum number of errors to print before stopping + int err_count = 0; // How many errors have we found in the config file + const int max_err_count = 30; // Maximum number of errors to print before stopping map included_options; /*--- Parse the configuration file and set the options ---*/ - while (getline(case_file, text_line)) { + while (getline (case_file, text_line)) { + if (err_count >= max_err_count) { errorString.append("Too many errors, stopping parse."); break; } if (TokenizeString(text_line, option_name, option_value)) { + if (option_map.find(option_name) == option_map.end()) { + /*--- See if it's a python option ---*/ string newString; @@ -3525,6 +3192,7 @@ bool CConfig::SetRunTime_Parsing(char case_filename[MAX_STRING_SIZE]) { errorString.append("\n"); err_count++; } + } } @@ -3543,9 +3211,11 @@ bool CConfig::SetRunTime_Parsing(char case_filename[MAX_STRING_SIZE]) { case_file.close(); return true; + } -void CConfig::SetHeader(SU2_COMPONENT val_software) const { +void CConfig::SetHeader(SU2_COMPONENT val_software) const{ + if ((iZone == 0) && (rank == MASTER_NODE)) { cout << "\n"; cout << "-------------------------------------------------------------------------\n"; @@ -3553,21 +3223,11 @@ void CConfig::SetHeader(SU2_COMPONENT val_software) const { cout << "| / __| | | |_ ) Release 7.5.1 \"Blackbird\" |\n"; cout << "| \\__ \\ |_| |/ / |\n"; switch (val_software) { - case SU2_COMPONENT::SU2_CFD: - cout << "| |___/\\___//___| Suite (Computational Fluid Dynamics Code) |\n"; - break; - case SU2_COMPONENT::SU2_DEF: - cout << "| |___/\\___//___| Suite (Mesh Deformation Code) |\n"; - break; - case SU2_COMPONENT::SU2_DOT: - cout << "| |___/\\___//___| Suite (Gradient Projection Code) |\n"; - break; - case SU2_COMPONENT::SU2_GEO: - cout << "| |___/\\___//___| Suite (Geometry Definition Code) |\n"; - break; - case SU2_COMPONENT::SU2_SOL: - cout << "| |___/\\___//___| Suite (Solution Exporting Code) |\n"; - break; + case SU2_COMPONENT::SU2_CFD: cout << "| |___/\\___//___| Suite (Computational Fluid Dynamics Code) |\n"; break; + case SU2_COMPONENT::SU2_DEF: cout << "| |___/\\___//___| Suite (Mesh Deformation Code) |\n"; break; + case SU2_COMPONENT::SU2_DOT: cout << "| |___/\\___//___| Suite (Gradient Projection Code) |\n"; break; + case SU2_COMPONENT::SU2_GEO: cout << "| |___/\\___//___| Suite (Geometry Definition Code) |\n"; break; + case SU2_COMPONENT::SU2_SOL: cout << "| |___/\\___//___| Suite (Solution Exporting Code) |\n"; break; } cout << "| |\n"; cout << "-------------------------------------------------------------------------\n"; @@ -3592,80 +3252,90 @@ void CConfig::SetHeader(SU2_COMPONENT val_software) const { cout << "| License along with SU2. If not, see . |\n"; cout << "-------------------------------------------------------------------------" << endl; } + } -void CConfig::SetnZone() { +void CConfig::SetnZone(){ + /*--- Just as a clarification --- */ - if (Multizone_Problem == NO && Kind_Solver != MAIN_SOLVER::MULTIPHYSICS) { + if (Multizone_Problem == NO && Kind_Solver != MAIN_SOLVER::MULTIPHYSICS){ nZone = 1; } - if (Kind_Solver == MAIN_SOLVER::MULTIPHYSICS) { + if (Kind_Solver == MAIN_SOLVER::MULTIPHYSICS){ Multizone_Problem = YES; - if (nConfig_Files == 0) { + if (nConfig_Files == 0){ SU2_MPI::Error("CONFIG_LIST must be provided if PHYSICAL_PROBLEM=MULTIPHYSICS", CURRENT_FUNCTION); } } - if (Multizone_Problem == YES) { + if (Multizone_Problem == YES){ + /*--- Some basic multizone checks ---*/ - if (nMarker_ZoneInterface % 2 != 0) { + if (nMarker_ZoneInterface % 2 != 0){ SU2_MPI::Error("Number of markers in MARKER_ZONE_INTERFACE must be a multiple of 2", CURRENT_FUNCTION); } - if (Multizone_Mesh) { + if (Multizone_Mesh){ + /*--- Get the number of zones from the mesh file --- */ nZone = GetnZone(Mesh_FileName, Mesh_FileFormat); /*--- If config list is set, make sure number matches number of zones in mesh file --- */ - if (nConfig_Files != 0 && (nZone != nConfig_Files)) { + if (nConfig_Files != 0 && (nZone != nConfig_Files)){ SU2_MPI::Error("Number of CONFIG_LIST must match number of zones in mesh file.", CURRENT_FUNCTION); } } else { + /*--- Number of zones is determined from the number of config files provided --- */ - if (nConfig_Files == 0) { - SU2_MPI::Error( - "If MULTIZONE_MESH is set to YES, you must provide a list of config files using CONFIG_LIST option", - CURRENT_FUNCTION); + if (nConfig_Files == 0){ + SU2_MPI::Error("If MULTIZONE_MESH is set to YES, you must provide a list of config files using CONFIG_LIST option", CURRENT_FUNCTION); } nZone = nConfig_Files; + } /*--- Check if subconfig files exist --- */ - if (nConfig_Files != 0) { - for (unsigned short iConfig = 0; iConfig < nConfig_Files; iConfig++) { + if (nConfig_Files != 0){ + for (unsigned short iConfig = 0; iConfig < nConfig_Files; iConfig++){ ifstream f(Config_Filenames[iConfig].c_str()); - if (!f.good()) { - SU2_MPI::Error("Config file " + Config_Filenames[iConfig] + " defined in CONFIG_FILES does not exist", - CURRENT_FUNCTION); + if (!f.good()){ + SU2_MPI::Error("Config file " + Config_Filenames[iConfig] + " defined in CONFIG_FILES does not exist", CURRENT_FUNCTION); } } } + } + } void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_izone, unsigned short val_nDim) { + unsigned short iCFL, iMarker; - bool ideal_gas = - ((Kind_FluidModel == STANDARD_AIR) || (Kind_FluidModel == IDEAL_GAS) || (Kind_FluidModel == INC_IDEAL_GAS) || - (Kind_FluidModel == FLUID_MIXTURE) || (Kind_FluidModel == FLUID_FLAMELET) || - (Kind_FluidModel == INC_IDEAL_GAS_POLY) || (Kind_FluidModel == CONSTANT_DENSITY)); - bool noneq_gas = ((Kind_FluidModel == MUTATIONPP) || (Kind_FluidModel == SU2_NONEQ)); + bool ideal_gas = ((Kind_FluidModel == STANDARD_AIR) || + (Kind_FluidModel == IDEAL_GAS) || + (Kind_FluidModel == INC_IDEAL_GAS) || + (Kind_FluidModel == FLUID_MIXTURE) || + (Kind_FluidModel == FLUID_FLAMELET) || + (Kind_FluidModel == INC_IDEAL_GAS_POLY) || + (Kind_FluidModel == CONSTANT_DENSITY)); + bool noneq_gas = ((Kind_FluidModel == MUTATIONPP) || + (Kind_FluidModel == SU2_NONEQ)); bool standard_air = ((Kind_FluidModel == STANDARD_AIR)); bool nemo = GetNEMOProblem(); - if (nZone > 1) { + if (nZone > 1){ Multizone_Problem = YES; } /*--- Set the default output files ---*/ - if (!OptionIsSet("OUTPUT_FILES")) { + if (!OptionIsSet("OUTPUT_FILES")){ nVolumeOutputFiles = 3; VolumeOutputFiles = new OUTPUT_TYPE[nVolumeOutputFiles]; VolumeOutputFiles[0] = OUTPUT_TYPE::RESTART_BINARY; @@ -3674,38 +3344,35 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i } /*--- Set the default output frequencies ---*/ - if (!OptionIsSet("OUTPUT_WRT_FREQ")) { + if (!OptionIsSet("OUTPUT_WRT_FREQ")){ nVolumeOutputFrequencies = nVolumeOutputFiles; - VolumeOutputFrequencies = new unsigned long[nVolumeOutputFrequencies]; + VolumeOutputFrequencies = new unsigned long [nVolumeOutputFrequencies]; /*--- Using default frequency of 250 for all files when steady, and 1 for unsteady. ---*/ - for (auto iVolumeFreq = 0; iVolumeFreq < nVolumeOutputFrequencies; iVolumeFreq++) { + for (auto iVolumeFreq = 0; iVolumeFreq < nVolumeOutputFrequencies; iVolumeFreq++){ VolumeOutputFrequencies[iVolumeFreq] = Time_Domain ? 1 : 250; } } else if (nVolumeOutputFrequencies < nVolumeOutputFiles) { /*--- If there are fewer frequencies than files, repeat the last frequency. - * This is useful to define 1 frequency for the restart file and 1 frequency for all the visualization files. - * ---*/ + * This is useful to define 1 frequency for the restart file and 1 frequency for all the visualization files. ---*/ auto* newFrequencies = new unsigned long[nVolumeOutputFiles]; for (unsigned short i = 0; i < nVolumeOutputFrequencies; ++i) { newFrequencies[i] = VolumeOutputFrequencies[i]; } for (auto i = nVolumeOutputFrequencies; i < nVolumeOutputFiles; ++i) { - newFrequencies[i] = newFrequencies[i - 1]; + newFrequencies[i] = newFrequencies[i-1]; } - delete[] VolumeOutputFrequencies; + delete [] VolumeOutputFrequencies; VolumeOutputFrequencies = newFrequencies; nVolumeOutputFrequencies = nVolumeOutputFiles; } /*--- Check if SU2 was build with TecIO support, as that is required for Tecplot Binary output. ---*/ #ifndef HAVE_TECIO - for (unsigned short iVolumeFile = 0; iVolumeFile < nVolumeOutputFiles; iVolumeFile++) { + for (unsigned short iVolumeFile = 0; iVolumeFile < nVolumeOutputFiles; iVolumeFile++){ if (VolumeOutputFiles[iVolumeFile] == OUTPUT_TYPE::TECPLOT_BINARY || VolumeOutputFiles[iVolumeFile] == OUTPUT_TYPE::SURFACE_TECPLOT_BINARY) { - SU2_MPI::Error( - string("Tecplot binary file requested in option OUTPUT_FILES but SU2 was built without TecIO support.\n"), - CURRENT_FUNCTION); + SU2_MPI::Error(string("Tecplot binary file requested in option OUTPUT_FILES but SU2 was built without TecIO support.\n"), CURRENT_FUNCTION); } } #endif @@ -3715,8 +3382,7 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i for (unsigned short iVolumeFile = 0; iVolumeFile < nVolumeOutputFiles; iVolumeFile++) { if (VolumeOutputFiles[iVolumeFile] == OUTPUT_TYPE::CGNS || VolumeOutputFiles[iVolumeFile] == OUTPUT_TYPE::SURFACE_CGNS) { - SU2_MPI::Error(string("CGNS file requested in option OUTPUT_FILES but SU2 was built without CGNS support.\n"), - CURRENT_FUNCTION); + SU2_MPI::Error(string("CGNS file requested in option OUTPUT_FILES but SU2 was built without CGNS support.\n"),CURRENT_FUNCTION); } } #endif @@ -3728,12 +3394,10 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i /*--- STL_BINARY output not implemented yet, but already a value in option_structure.hpp---*/ for (unsigned short iVolumeFile = 0; iVolumeFile < nVolumeOutputFiles; iVolumeFile++) { - if (VolumeOutputFiles[iVolumeFile] == OUTPUT_TYPE::STL_BINARY) { - SU2_MPI::Error(string("OUTPUT_FILES: 'STL_BINARY' output not implemented. Use 'STL' for ASCII output.\n"), - CURRENT_FUNCTION); + if (VolumeOutputFiles[iVolumeFile] == OUTPUT_TYPE::STL_BINARY){ + SU2_MPI::Error(string("OUTPUT_FILES: 'STL_BINARY' output not implemented. Use 'STL' for ASCII output.\n"), CURRENT_FUNCTION); } - if (val_nDim == 2 && (VolumeOutputFiles[iVolumeFile] == OUTPUT_TYPE::STL_ASCII || - VolumeOutputFiles[iVolumeFile] == OUTPUT_TYPE::STL_BINARY)) { + if (val_nDim == 2 && (VolumeOutputFiles[iVolumeFile] == OUTPUT_TYPE::STL_ASCII || VolumeOutputFiles[iVolumeFile] == OUTPUT_TYPE::STL_BINARY)) { SU2_MPI::Error(string("OUTPUT_FILES: 'STL(_BINARY)' output only reasonable for 3D cases.\n"), CURRENT_FUNCTION); } } @@ -3741,7 +3405,7 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i /*--- Check if MESH_QUALITY is requested in VOLUME_OUTPUT and set the config boolean accordingly. ---*/ Wrt_MeshQuality = false; for (unsigned short iField = 0; iField < nVolumeOutput; iField++) { - if (VolumeOutput[iField].find("MESH_QUALITY") != string::npos) { + if(VolumeOutput[iField].find("MESH_QUALITY") != string::npos) { Wrt_MeshQuality = true; } } @@ -3749,21 +3413,21 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i /*--- Check if MULTIGRID is requested in VOLUME_OUTPUT and set the config boolean accordingly. ---*/ Wrt_MultiGrid = false; for (unsigned short iField = 0; iField < nVolumeOutput; iField++) { - if (VolumeOutput[iField].find("MULTIGRID") != string::npos) { + if(VolumeOutput[iField].find("MULTIGRID") != string::npos) { Wrt_MultiGrid = true; } } - if (Kind_Solver == MAIN_SOLVER::NAVIER_STOKES && Kind_Turb_Model != TURB_MODEL::NONE) { + if (Kind_Solver == MAIN_SOLVER::NAVIER_STOKES && Kind_Turb_Model != TURB_MODEL::NONE){ SU2_MPI::Error("KIND_TURB_MODEL must be NONE if SOLVER= NAVIER_STOKES", CURRENT_FUNCTION); } - if (Kind_Solver == MAIN_SOLVER::INC_NAVIER_STOKES && Kind_Turb_Model != TURB_MODEL::NONE) { + if (Kind_Solver == MAIN_SOLVER::INC_NAVIER_STOKES && Kind_Turb_Model != TURB_MODEL::NONE){ SU2_MPI::Error("KIND_TURB_MODEL must be NONE if SOLVER= INC_NAVIER_STOKES", CURRENT_FUNCTION); } - if (Kind_Solver == MAIN_SOLVER::RANS && Kind_Turb_Model == TURB_MODEL::NONE) { + if (Kind_Solver == MAIN_SOLVER::RANS && Kind_Turb_Model == TURB_MODEL::NONE){ SU2_MPI::Error("A turbulence model must be specified with KIND_TURB_MODEL if SOLVER= RANS", CURRENT_FUNCTION); } - if (Kind_Solver == MAIN_SOLVER::INC_RANS && Kind_Turb_Model == TURB_MODEL::NONE) { + if (Kind_Solver == MAIN_SOLVER::INC_RANS && Kind_Turb_Model == TURB_MODEL::NONE){ SU2_MPI::Error("A turbulence model must be specified with KIND_TURB_MODEL if SOLVER= INC_RANS", CURRENT_FUNCTION); } @@ -3775,7 +3439,7 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i } /*--- Check if turbulence model can be used for AXISYMMETRIC case---*/ - if (Axisymmetric && Kind_Turb_Model != TURB_MODEL::NONE && Kind_Turb_Model != TURB_MODEL::SST) { + if (Axisymmetric && Kind_Turb_Model != TURB_MODEL::NONE && Kind_Turb_Model != TURB_MODEL::SST){ SU2_MPI::Error("Axisymmetry is currently only supported for KIND_TURB_MODEL chosen as SST", CURRENT_FUNCTION); } @@ -3795,23 +3459,21 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i Wall_Functions = false; if (nMarker_WallFunctions > 0) { for (iMarker = 0; iMarker < nMarker_WallFunctions; iMarker++) { - if (Kind_WallFunctions[iMarker] != WALL_FUNCTIONS::NONE) Wall_Functions = true; + if (Kind_WallFunctions[iMarker] != WALL_FUNCTIONS::NONE) + Wall_Functions = true; if ((Kind_WallFunctions[iMarker] == WALL_FUNCTIONS::ADAPTIVE_FUNCTION) || (Kind_WallFunctions[iMarker] == WALL_FUNCTIONS::SCALABLE_FUNCTION) || (Kind_WallFunctions[iMarker] == WALL_FUNCTIONS::NONEQUILIBRIUM_MODEL)) - SU2_MPI::Error(string("For RANS problems, use NONE, STANDARD_WALL_FUNCTION or EQUILIBRIUM_WALL_MODEL.\n"), - CURRENT_FUNCTION); + SU2_MPI::Error(string("For RANS problems, use NONE, STANDARD_WALL_FUNCTION or EQUILIBRIUM_WALL_MODEL.\n"), CURRENT_FUNCTION); if (Kind_WallFunctions[iMarker] == WALL_FUNCTIONS::STANDARD_FUNCTION) { if ((Kind_Solver != MAIN_SOLVER::RANS) && (Kind_Solver != MAIN_SOLVER::INC_RANS)) - SU2_MPI::Error(string("Wall model STANDARD_FUNCTION only available for RANS or INC_RANS.\n"), - CURRENT_FUNCTION); + SU2_MPI::Error(string("Wall model STANDARD_FUNCTION only available for RANS or INC_RANS.\n"), CURRENT_FUNCTION); if (nRough_Wall != 0) - SU2_MPI::Error( - string("Wall model STANDARD_FUNCTION and WALL_ROUGHNESS migh not be compatible. Checking required!\n"), - CURRENT_FUNCTION); + SU2_MPI::Error(string("Wall model STANDARD_FUNCTION and WALL_ROUGHNESS migh not be compatible. Checking required!\n"), CURRENT_FUNCTION); } + } } @@ -3819,8 +3481,10 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i solver. This is typically unused (often internal flows). Also fixed CL mode for incompressible flows is not implemented ---*/ - if (Kind_Solver == MAIN_SOLVER::INC_EULER || Kind_Solver == MAIN_SOLVER::INC_NAVIER_STOKES || + if (Kind_Solver == MAIN_SOLVER::INC_EULER || + Kind_Solver == MAIN_SOLVER::INC_NAVIER_STOKES || Kind_Solver == MAIN_SOLVER::INC_RANS) { + /*--- Compute x-velocity with a safegaurd for 0.0. ---*/ su2double Vx = 1e-10; @@ -3832,10 +3496,10 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i su2double alpha = 0.0, beta = 0.0; if (val_nDim == 2) { - alpha = atan(vel_init[1] / Vx) * 180.0 / PI_NUMBER; + alpha = atan(vel_init[1]/Vx)*180.0/PI_NUMBER; } else { - alpha = atan(vel_init[2] / Vx) * 180.0 / PI_NUMBER; - beta = atan(vel_init[1] / Vx) * 180.0 / PI_NUMBER; + alpha = atan(vel_init[2]/Vx)*180.0/PI_NUMBER; + beta = atan(vel_init[1]/Vx)*180.0/PI_NUMBER; } /*--- Set alpha and beta in the config class. ---*/ @@ -3849,8 +3513,7 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i /*--- Inc CHT simulation, but energy equation of fluid is inactive. ---*/ if (Multizone_Problem && (nMarker_CHTInterface > 0) && !Energy_Equation) - SU2_MPI::Error(string("You probably want to set INC_ENERGY_EQUATION= YES for the fluid solver. \n"), - CURRENT_FUNCTION); + SU2_MPI::Error(string("You probably want to set INC_ENERGY_EQUATION= YES for the fluid solver. \n"), CURRENT_FUNCTION); } /*--- By default, in 2D we should use TWOD_AIRFOIL (independenly from the input file) ---*/ @@ -3897,8 +3560,9 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i /*--- Set the default for thrust in ActDisk ---*/ - if ((Kind_ActDisk == NET_THRUST) || (Kind_ActDisk == BC_THRUST) || (Kind_ActDisk == DRAG_MINUS_THRUST) || - (Kind_ActDisk == MASSFLOW) || (Kind_ActDisk == POWER)) + if ((Kind_ActDisk == NET_THRUST) || (Kind_ActDisk == BC_THRUST) + || (Kind_ActDisk == DRAG_MINUS_THRUST) || (Kind_ActDisk == MASSFLOW) + || (Kind_ActDisk == POWER)) ActDisk_Jump = RATIO; /*--- Error-catching and automatic array adjustments for objective, marker, and weights arrays --- */ @@ -3910,60 +3574,60 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i Kind_ObjFunc[0] = DRAG_COEFFICIENT; Weight_ObjFunc = new su2double[1]; Weight_ObjFunc[0] = 1.0; - nObj = 1; - nObjW = 1; + nObj=1; + nObjW=1; } /*--- Maker sure that arrays are the same length ---*/ - if (nObj > 0) { - if (nMarker_Monitoring != nObj && Marker_Monitoring != nullptr) { - if (nMarker_Monitoring == 1) { - /*-- If only one marker was listed with multiple objectives, set that marker as the marker for each objective - * ---*/ + if (nObj>0) { + if (nMarker_Monitoring!=nObj && Marker_Monitoring!= nullptr) { + if (nMarker_Monitoring==1) { + /*-- If only one marker was listed with multiple objectives, set that marker as the marker for each objective ---*/ nMarker_Monitoring = nObj; string marker = Marker_Monitoring[0]; delete[] Marker_Monitoring; Marker_Monitoring = new string[nMarker_Monitoring]; - for (iMarker = 0; iMarker < nMarker_Monitoring; iMarker++) Marker_Monitoring[iMarker] = marker; - } else if (nObj == 1) { + for (iMarker=0; iMarker 1) { - SU2_MPI::Error( - "When using more than one OBJECTIVE_FUNCTION, MARKER_MONITORING must be the same length or length 1.\n" - "For multiple surfaces per objective, either use one objective or list the objective multiple times.\n" - "For multiple objectives per marker either use one marker or list the marker multiple times.\n" - "Similar rules apply for multi-objective optimization using OPT_OBJECTIVE rather than OBJECTIVE_FUNCTION.", - CURRENT_FUNCTION); + } + else if(nObj>1) { + SU2_MPI::Error("When using more than one OBJECTIVE_FUNCTION, MARKER_MONITORING must be the same length or length 1.\n" + "For multiple surfaces per objective, either use one objective or list the objective multiple times.\n" + "For multiple objectives per marker either use one marker or list the marker multiple times.\n" + "Similar rules apply for multi-objective optimization using OPT_OBJECTIVE rather than OBJECTIVE_FUNCTION.", + CURRENT_FUNCTION); } } } /*-- Correct for case where Weight_ObjFunc has not been provided or has length < kind_objfunc---*/ - if (nObjW < nObj) { - if (Weight_ObjFunc != nullptr && nObjW > 1) { - SU2_MPI::Error( - "The option OBJECTIVE_WEIGHT must either have the same length as OBJECTIVE_FUNCTION,\n" - "be lenght 1, or be deleted from the config file (equal weights will be applied).", - CURRENT_FUNCTION); + if (nObjW1) { + SU2_MPI::Error("The option OBJECTIVE_WEIGHT must either have the same length as OBJECTIVE_FUNCTION,\n" + "be lenght 1, or be deleted from the config file (equal weights will be applied).", CURRENT_FUNCTION); } Weight_ObjFunc = new su2double[nObj]; - for (unsigned short iObj = 0; iObj < nObj; iObj++) Weight_ObjFunc[iObj] = 1.0; + for (unsigned short iObj=0; iObj 1) { unsigned short Obj_0 = Kind_ObjFunc[0]; - for (unsigned short iObj = 1; iObj < nObj; iObj++) { - switch (Kind_ObjFunc[iObj]) { + for (unsigned short iObj=1; iObj 0) { + if (nObj > 0){ if (Kind_ObjFunc[0] == CUSTOM_OBJFUNC && CustomObjFunc.empty() && !Multizone_Problem) { - SU2_MPI::Error( - "The expression for the custom objective function was not set.\n" - "For example, CUSTOM_OBJFUNC= LIFT/DRAG", - CURRENT_FUNCTION); + SU2_MPI::Error("The expression for the custom objective function was not set.\n" + "For example, CUSTOM_OBJFUNC= LIFT/DRAG", CURRENT_FUNCTION); } } /*--- Check for unsteady problem ---*/ - if ((TimeMarching == TIME_MARCHING::TIME_STEPPING || TimeMarching == TIME_MARCHING::DT_STEPPING_1ST || - TimeMarching == TIME_MARCHING::DT_STEPPING_2ND) && - !Time_Domain) { - SU2_MPI::Error( - "TIME_DOMAIN must be set to YES if TIME_MARCHING is " - "TIME_STEPPING, DUAL_TIME_STEPPING-1ST_ORDER or DUAL_TIME_STEPPING-2ND_ORDER", - CURRENT_FUNCTION); + if ((TimeMarching == TIME_MARCHING::TIME_STEPPING || + TimeMarching == TIME_MARCHING::DT_STEPPING_1ST || + TimeMarching == TIME_MARCHING::DT_STEPPING_2ND) && !Time_Domain){ + SU2_MPI::Error("TIME_DOMAIN must be set to YES if TIME_MARCHING is " + "TIME_STEPPING, DUAL_TIME_STEPPING-1ST_ORDER or DUAL_TIME_STEPPING-2ND_ORDER", CURRENT_FUNCTION); } - if (Time_Domain) { + if (Time_Domain){ Delta_UnstTime = Time_Step; - if (TimeMarching == TIME_MARCHING::TIME_STEPPING) { - InnerIter = 1; - } + if (TimeMarching == TIME_MARCHING::TIME_STEPPING){ InnerIter = 1; } /*--- Set History write freq for inner and outer iteration to zero by default, so only time iterations write. ---*/ - if (!OptionIsSet("HISTORY_WRT_FREQ_INNER")) { - HistoryWrtFreq[2] = 0; - } - if (!OptionIsSet("HISTORY_WRT_FREQ_OUTER")) { - HistoryWrtFreq[1] = 0; - } + if (!OptionIsSet("HISTORY_WRT_FREQ_INNER")) { HistoryWrtFreq[2] = 0; } + if (!OptionIsSet("HISTORY_WRT_FREQ_OUTER")) { HistoryWrtFreq[1] = 0; } if (Restart == NO) { Restart_Iter = 0; } else { - if (nTimeIter <= Restart_Iter) SU2_MPI::Error("TIME_ITER must be larger than RESTART_ITER.", CURRENT_FUNCTION); + if(nTimeIter <= Restart_Iter) SU2_MPI::Error("TIME_ITER must be larger than RESTART_ITER.", CURRENT_FUNCTION); } - /*--- WINDOW_START_ITER must be larger than or equal to: RESTART_ITER. Otherwise, the running average is wrong. - * ---*/ + /*--- WINDOW_START_ITER must be larger than or equal to: RESTART_ITER. Otherwise, the running average is wrong. ---*/ if (OptionIsSet("WINDOW_START_ITER")) { if (StartWindowIteration < Restart_Iter) { SU2_MPI::Error("WINDOW_START_ITER must be larger than or equal to: RESTART_ITER!", CURRENT_FUNCTION); } } else { /*--- Enforced default behavior: start of the window is the first new iteration. ---*/ - if (rank == MASTER_NODE) - cout << "WARNING: Setting WINDOW_START_ITER = RESTART_ITER for meaningful running average.\n"; + if (rank == MASTER_NODE) cout << "WARNING: Setting WINDOW_START_ITER = RESTART_ITER for meaningful running average.\n"; StartWindowIteration = Restart_Iter; } - if (Time_Step <= 0.0 && Unst_CFL == 0.0) { - SU2_MPI::Error("Invalid value for TIME_STEP.", CURRENT_FUNCTION); - } + if (Time_Step <= 0.0 && Unst_CFL == 0.0){ SU2_MPI::Error("Invalid value for TIME_STEP.", CURRENT_FUNCTION); } } else { nTimeIter = 1; Time_Step = 0; /*--- Entry 0 corresponds to unsteady simulation so for steady simulation are just set to 1. ---*/ - ScreenWrtFreq[0] = 1; + ScreenWrtFreq[0] = 1; HistoryWrtFreq[0] = 1; - if (TimeMarching != TIME_MARCHING::HARMONIC_BALANCE) { - TimeMarching = TIME_MARCHING::STEADY; - } + if (TimeMarching != TIME_MARCHING::HARMONIC_BALANCE) { TimeMarching = TIME_MARCHING::STEADY; } } - if (Time_Domain && !GetWrt_Restart_Overwrite()) { - SU2_MPI::Error( - "Appending iterations to the filename (WRT_RESTART_OVERWRITE=NO) is incompatible with transient problems.", - CURRENT_FUNCTION); + if (Time_Domain && !GetWrt_Restart_Overwrite()){ + SU2_MPI::Error("Appending iterations to the filename (WRT_RESTART_OVERWRITE=NO) is incompatible with transient problems.", CURRENT_FUNCTION); } - if (Time_Domain && !GetWrt_Surface_Overwrite()) { - SU2_MPI::Error( - "Appending iterations to the filename (WRT_SURFACE_OVERWRITE=NO) is incompatible with transient problems.", - CURRENT_FUNCTION); + if (Time_Domain && !GetWrt_Surface_Overwrite()){ + SU2_MPI::Error("Appending iterations to the filename (WRT_SURFACE_OVERWRITE=NO) is incompatible with transient problems.", CURRENT_FUNCTION); } - if (Time_Domain && !GetWrt_Volume_Overwrite()) { - SU2_MPI::Error( - "Appending iterations to the filename (WRT_VOLUME_OVERWRITE=NO) is incompatible with transient problems.", - CURRENT_FUNCTION); + if (Time_Domain && !GetWrt_Volume_Overwrite()){ + SU2_MPI::Error("Appending iterations to the filename (WRT_VOLUME_OVERWRITE=NO) is incompatible with transient problems.", CURRENT_FUNCTION); } + /*--- Ensure that Discard_InFiles is false, owerwise the gradient could be wrong ---*/ - if ((ContinuousAdjoint || DiscreteAdjoint) && Fixed_CL_Mode && !Eval_dOF_dCX) Discard_InFiles = false; + if ((ContinuousAdjoint || DiscreteAdjoint) && Fixed_CL_Mode && !Eval_dOF_dCX) + Discard_InFiles = false; /*--- Deactivate the multigrid in the adjoint problem ---*/ - if ((ContinuousAdjoint && !MG_AdjointFlow) || (TimeMarching == TIME_MARCHING::TIME_STEPPING)) { - nMGLevels = 0; - } - - if (Kind_Solver == MAIN_SOLVER::EULER || Kind_Solver == MAIN_SOLVER::NAVIER_STOKES || - Kind_Solver == MAIN_SOLVER::RANS || Kind_Solver == MAIN_SOLVER::NEMO_EULER || - Kind_Solver == MAIN_SOLVER::NEMO_NAVIER_STOKES || Kind_Solver == MAIN_SOLVER::FEM_EULER || - Kind_Solver == MAIN_SOLVER::FEM_NAVIER_STOKES || Kind_Solver == MAIN_SOLVER::FEM_RANS || - Kind_Solver == MAIN_SOLVER::FEM_LES) { + if ((ContinuousAdjoint && !MG_AdjointFlow) || + (TimeMarching == TIME_MARCHING::TIME_STEPPING)) { nMGLevels = 0; } + + if (Kind_Solver == MAIN_SOLVER::EULER || + Kind_Solver == MAIN_SOLVER::NAVIER_STOKES || + Kind_Solver == MAIN_SOLVER::RANS || + Kind_Solver == MAIN_SOLVER::NEMO_EULER || + Kind_Solver == MAIN_SOLVER::NEMO_NAVIER_STOKES || + Kind_Solver == MAIN_SOLVER::FEM_EULER || + Kind_Solver == MAIN_SOLVER::FEM_NAVIER_STOKES || + Kind_Solver == MAIN_SOLVER::FEM_RANS || + Kind_Solver == MAIN_SOLVER::FEM_LES){ Kind_Regime = ENUM_REGIME::COMPRESSIBLE; - } else if (Kind_Solver == MAIN_SOLVER::INC_EULER || Kind_Solver == MAIN_SOLVER::INC_NAVIER_STOKES || - Kind_Solver == MAIN_SOLVER::INC_RANS) { + } else if (Kind_Solver == MAIN_SOLVER::INC_EULER || + Kind_Solver == MAIN_SOLVER::INC_NAVIER_STOKES || + Kind_Solver == MAIN_SOLVER::INC_RANS){ Kind_Regime = ENUM_REGIME::INCOMPRESSIBLE; - } else { + } else { Kind_Regime = ENUM_REGIME::NO_FLOW; } - if ((rank == MASTER_NODE) && ContinuousAdjoint && (Ref_NonDim == DIMENSIONAL) && - (Kind_SU2 == SU2_COMPONENT::SU2_CFD)) { + if ((rank == MASTER_NODE) && ContinuousAdjoint && (Ref_NonDim == DIMENSIONAL) && (Kind_SU2 == SU2_COMPONENT::SU2_CFD)) { cout << "WARNING: The adjoint solver should use a non-dimensional flow solution." << endl; } /*--- Initialize non-physical points/reconstructions to zero ---*/ - Nonphys_Points = 0; + Nonphys_Points = 0; Nonphys_Reconstr = 0; /*--- Set the number of external iterations to 1 for the steady state problem ---*/ if (Kind_Solver == MAIN_SOLVER::FEM_ELASTICITY) { nMGLevels = 0; - if (Kind_Struct_Solver == STRUCT_DEFORMATION::SMALL) { + if (Kind_Struct_Solver == STRUCT_DEFORMATION::SMALL){ MinLogResidual = log10(Linear_Solver_Error); } } @@ -4140,9 +3785,7 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i /*--- Check for unsupported features. ---*/ - if ((Kind_Solver != MAIN_SOLVER::EULER && Kind_Solver != MAIN_SOLVER::NAVIER_STOKES && - Kind_Solver != MAIN_SOLVER::RANS) && - (TimeMarching == TIME_MARCHING::HARMONIC_BALANCE)) { + if ((Kind_Solver != MAIN_SOLVER::EULER && Kind_Solver != MAIN_SOLVER::NAVIER_STOKES && Kind_Solver != MAIN_SOLVER::RANS) && (TimeMarching == TIME_MARCHING::HARMONIC_BALANCE)){ SU2_MPI::Error("Harmonic Balance not yet implemented for the incompressible solver.", CURRENT_FUNCTION); } @@ -4155,7 +3798,7 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i } } - /*--- Set default values for various fluid properties. ---*/ +/*--- Set default values for various fluid properties. ---*/ const su2double Molecular_Weight_Default = 28.96; const su2double Mu_Constant_Default = (SystemMeasurements == SI) ? 1.716E-5 : (1.716E-5 / 47.88025898); @@ -4163,8 +3806,7 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i const su2double Mu_Temperature_Ref_Default = (SystemMeasurements == SI) ? 273.15 : (273.15 * 1.8); const su2double Mu_S_Default = (SystemMeasurements == SI) ? 110.4 : (110.4 * 1.8); const su2double Specific_Heat_Cp_Default = 1004.703; - const su2double Thermal_Conductivity_Constant_Default = - (SystemMeasurements == SI) ? 2.57E-2 : (2.57E-2 * 0.577789317); + const su2double Thermal_Conductivity_Constant_Default = (SystemMeasurements == SI) ? 2.57E-2 : (2.57E-2 * 0.577789317); const su2double Prandtl_Lam_Default = 0.72; const su2double Prandtl_Turb_Default = 0.9; const su2double Lewis_Number_Default = 1.0; @@ -4191,218 +3833,210 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i SetDefaultIfEmpty(Prandtl_Turb, nPrandtl_Turb, Prandtl_Turb_Default); SetDefaultIfEmpty(Constant_Lewis_Number, nConstant_Lewis_Number, Lewis_Number_Default); - Variable_Density = - ((Kind_DensityModel == INC_DENSITYMODEL::VARIABLE) || (Kind_DensityModel == INC_DENSITYMODEL::FLAMELET)); + Variable_Density = ((Kind_DensityModel == INC_DENSITYMODEL::VARIABLE) || (Kind_DensityModel == INC_DENSITYMODEL::FLAMELET)); /*--- Check whether inputs for FLUID_MIXTURE are correctly specified. ---*/ - if (Kind_FluidModel == FLUID_MIXTURE) { - /*--- Check whether the number of entries of each specified fluid property equals the number of transported scalar - equations solved + 1. nMolecular_Weight and nSpecific_Heat_Cp are used because it is required for the fluid mixing - models. - * Cp is required in case of MIXTURE_FLUID_MODEL because the energy equation needs to be active.--- */ - if (nMolecular_Weight != nSpecies_Init + 1 || nSpecific_Heat_Cp != nSpecies_Init + 1) { - SU2_MPI::Error( - "The use of FLUID_MIXTURE requires the number of entries for MOLECULAR_WEIGHT and SPECIFIC_HEAT_CP,\n" - "to be equal to the number of entries of SPECIES_INIT + 1", - CURRENT_FUNCTION); - } - /*--- Check whether the density model used is correct, in the case of FLUID_MIXTURE the density model must be - VARIABLE. Otherwise, if the density model is CONSTANT, the scalars will not have influence the mixture density - and it will remain constant through the complete domain. --- */ - if (Kind_DensityModel != INC_DENSITYMODEL::VARIABLE) { - SU2_MPI::Error("The use of FLUID_MIXTURE requires the INC_DENSITY_MODEL option to be VARIABLE", CURRENT_FUNCTION); - } - - switch (Kind_ViscosityModel) { - case VISCOSITYMODEL::CONSTANT: - if (nMu_Constant != nSpecies_Init + 1) { - SU2_MPI::Error( - "The use of FLUID_MIXTURE requires the number of entries for MU_CONSTANT,\n" - "to be equal to the number of entries of SPECIES_INIT + 1", - CURRENT_FUNCTION); - } - break; - case VISCOSITYMODEL::SUTHERLAND: - if ((nMu_Ref != nSpecies_Init + 1) || (nMu_Temperature_Ref != nSpecies_Init + 1) || - (nMu_S != nSpecies_Init + 1)) { - SU2_MPI::Error( - "The use of FLUID_MIXTURE requires the number of entries for MU_REF, MU_T_REF and " - "SUTHERLAND_CONSTANT,\n" - "to be equal to the number of entries of SPECIES_INIT + 1", - CURRENT_FUNCTION); - } - break; - default: - if (nSpecies_Init + 1 != 1) SU2_MPI::Error("Fluid mixture: viscosity model not available.", CURRENT_FUNCTION); - break; - } + if (Kind_FluidModel == FLUID_MIXTURE) { + /*--- Check whether the number of entries of each specified fluid property equals the number of transported scalar + equations solved + 1. nMolecular_Weight and nSpecific_Heat_Cp are used because it is required for the fluid mixing models. + * Cp is required in case of MIXTURE_FLUID_MODEL because the energy equation needs to be active.--- */ + if (nMolecular_Weight != nSpecies_Init + 1 || nSpecific_Heat_Cp != nSpecies_Init + 1) { + SU2_MPI::Error( + "The use of FLUID_MIXTURE requires the number of entries for MOLECULAR_WEIGHT and SPECIFIC_HEAT_CP,\n" + "to be equal to the number of entries of SPECIES_INIT + 1", + CURRENT_FUNCTION); + } + /*--- Check whether the density model used is correct, in the case of FLUID_MIXTURE the density model must be + VARIABLE. Otherwise, if the density model is CONSTANT, the scalars will not have influence the mixture density + and it will remain constant through the complete domain. --- */ + if (Kind_DensityModel != INC_DENSITYMODEL::VARIABLE) { + SU2_MPI::Error("The use of FLUID_MIXTURE requires the INC_DENSITY_MODEL option to be VARIABLE", + CURRENT_FUNCTION); + } - switch (Kind_ConductivityModel) { - case CONDUCTIVITYMODEL::CONSTANT: - if ((Kind_ConductivityModel_Turb == CONDUCTIVITYMODEL_TURB::CONSTANT_PRANDTL) && - (Kind_Turb_Model != TURB_MODEL::NONE)) { - if ((nThermal_Conductivity_Constant != nSpecies_Init + 1) || (nPrandtl_Turb != nSpecies_Init + 1)) { + switch (Kind_ViscosityModel) { + case VISCOSITYMODEL::CONSTANT: + if (nMu_Constant != nSpecies_Init + 1) { SU2_MPI::Error( - "The use of FLUID_MIXTURE requires the number of entries for THERMAL_CONDUCTIVITY_CONSTANT and " - "PRANDTL_TURB,\n" + "The use of FLUID_MIXTURE requires the number of entries for MU_CONSTANT,\n" "to be equal to the number of entries of SPECIES_INIT + 1", CURRENT_FUNCTION); } - } else { - if (nThermal_Conductivity_Constant != nSpecies_Init + 1) { + break; + case VISCOSITYMODEL::SUTHERLAND: + if ((nMu_Ref != nSpecies_Init + 1) || (nMu_Temperature_Ref != nSpecies_Init + 1) || + (nMu_S != nSpecies_Init + 1)) { SU2_MPI::Error( - "The use of FLUID_MIXTURE requires the number of entries for THERMAL_CONDUCTIVITY_CONSTANT,\n" + "The use of FLUID_MIXTURE requires the number of entries for MU_REF, MU_T_REF and " + "SUTHERLAND_CONSTANT,\n" "to be equal to the number of entries of SPECIES_INIT + 1", CURRENT_FUNCTION); } - } - break; - case CONDUCTIVITYMODEL::CONSTANT_PRANDTL: - if (Kind_ConductivityModel_Turb == CONDUCTIVITYMODEL_TURB::CONSTANT_PRANDTL) { - if ((nPrandtl_Lam != nSpecies_Init + 1) || (nPrandtl_Turb != nSpecies_Init + 1)) { - SU2_MPI::Error( - "The use of FLUID_MIXTURE requires the number of entries for PRANDTL_LAM and PRANDTL_TURB,\n" - "to be equal to the number of entries of SPECIES_INIT + 1", - CURRENT_FUNCTION); + break; + default: + if (nSpecies_Init + 1 != 1) SU2_MPI::Error("Fluid mixture: viscosity model not available.", CURRENT_FUNCTION); + break; + } + + switch (Kind_ConductivityModel) { + case CONDUCTIVITYMODEL::CONSTANT: + if ((Kind_ConductivityModel_Turb == CONDUCTIVITYMODEL_TURB::CONSTANT_PRANDTL) && + (Kind_Turb_Model != TURB_MODEL::NONE)) { + if ((nThermal_Conductivity_Constant != nSpecies_Init + 1) || (nPrandtl_Turb != nSpecies_Init + 1)) { + SU2_MPI::Error( + "The use of FLUID_MIXTURE requires the number of entries for THERMAL_CONDUCTIVITY_CONSTANT and " + "PRANDTL_TURB,\n" + "to be equal to the number of entries of SPECIES_INIT + 1", + CURRENT_FUNCTION); + } + } else { + if (nThermal_Conductivity_Constant != nSpecies_Init + 1) { + SU2_MPI::Error( + "The use of FLUID_MIXTURE requires the number of entries for THERMAL_CONDUCTIVITY_CONSTANT,\n" + "to be equal to the number of entries of SPECIES_INIT + 1", + CURRENT_FUNCTION); + } } - } else { - if (nPrandtl_Lam != nSpecies_Init + 1) { - SU2_MPI::Error( - "The use of FLUID_MIXTURE requires the number of entries for PRANDTL_LAM,\n" - "to be equal to the number of entries of SPECIES_INIT + 1", - CURRENT_FUNCTION); + break; + case CONDUCTIVITYMODEL::CONSTANT_PRANDTL: + if (Kind_ConductivityModel_Turb == CONDUCTIVITYMODEL_TURB::CONSTANT_PRANDTL) { + if ((nPrandtl_Lam != nSpecies_Init + 1) || (nPrandtl_Turb != nSpecies_Init + 1)) { + SU2_MPI::Error( + "The use of FLUID_MIXTURE requires the number of entries for PRANDTL_LAM and PRANDTL_TURB,\n" + "to be equal to the number of entries of SPECIES_INIT + 1", + CURRENT_FUNCTION); + } + } else { + if (nPrandtl_Lam != nSpecies_Init + 1) { + SU2_MPI::Error( + "The use of FLUID_MIXTURE requires the number of entries for PRANDTL_LAM,\n" + "to be equal to the number of entries of SPECIES_INIT + 1", + CURRENT_FUNCTION); + } } - } - break; - default: - if (nSpecies_Init + 1 != 1) SU2_MPI::Error("Conductivity model not available.", CURRENT_FUNCTION); - break; + break; + default: + if (nSpecies_Init + 1 != 1) SU2_MPI::Error("Conductivity model not available.", CURRENT_FUNCTION); + break; + } } - } - if (Kind_Species_Model == SPECIES_MODEL::FLAMELET) { - if (Kind_FluidModel != FLUID_FLAMELET) { - SU2_MPI::Error("The use of SCALAR_MODEL= FLAMELET requires the FLUID_MODEL option to be FLUID_FLAMELET", - CURRENT_FUNCTION); - } - if (!Variable_Density) { - SU2_MPI::Error("The use of FLUID_FLAMELET requires the INC_DENSITY_MODEL option to be VARIABLE or FLAMELET", - CURRENT_FUNCTION); - } + if (Kind_Species_Model == SPECIES_MODEL::FLAMELET) { - if (Kind_ConductivityModel != CONDUCTIVITYMODEL::FLAMELET) { - SU2_MPI::Error("The use of FLUID_FLAMELET requires the CONDUCTIVITY_MODEL option to be FLAMELET", - CURRENT_FUNCTION); - } + if (Kind_FluidModel != FLUID_FLAMELET) { + SU2_MPI::Error("The use of SCALAR_MODEL= FLAMELET requires the FLUID_MODEL option to be FLUID_FLAMELET", + CURRENT_FUNCTION); + } - if (Kind_Diffusivity_Model != DIFFUSIVITYMODEL::FLAMELET) { - SU2_MPI::Error("The use of FLUID_FLAMELET requires the DIFFUSIVITY_MODEL option to be FLAMELET", - CURRENT_FUNCTION); - } + if (!Variable_Density) { + SU2_MPI::Error("The use of FLUID_FLAMELET requires the INC_DENSITY_MODEL option to be VARIABLE or FLAMELET", + CURRENT_FUNCTION); + } - if (Kind_ViscosityModel != VISCOSITYMODEL::FLAMELET) { - SU2_MPI::Error("The use of FLUID_FLAMELET requires the VISCOSITY_MODEL option to be FLAMELET", CURRENT_FUNCTION); - } + if (Kind_ConductivityModel != CONDUCTIVITYMODEL::FLAMELET) { + SU2_MPI::Error("The use of FLUID_FLAMELET requires the CONDUCTIVITY_MODEL option to be FLAMELET", + CURRENT_FUNCTION); + } - if (Weakly_Coupled_Heat) { - SU2_MPI::Error("The use of FLUID_FLAMELET is incompatible with WEAKLY_COUPLED_HEAT in the same zone.", - CURRENT_FUNCTION); - } - } + if (Kind_Diffusivity_Model != DIFFUSIVITYMODEL::FLAMELET) { + SU2_MPI::Error("The use of FLUID_FLAMELET requires the DIFFUSIVITY_MODEL option to be FLAMELET", + CURRENT_FUNCTION); + } - /*--- Check for Measurement System ---*/ + if (Kind_ViscosityModel != VISCOSITYMODEL::FLAMELET) { + SU2_MPI::Error("The use of FLUID_FLAMELET requires the VISCOSITY_MODEL option to be FLAMELET", + CURRENT_FUNCTION); + } - if (SystemMeasurements == US && !standard_air) { - SU2_MPI::Error("Only STANDARD_AIR fluid model can be used with US Measurement System", CURRENT_FUNCTION); - } + if (Weakly_Coupled_Heat) { + SU2_MPI::Error("The use of FLUID_FLAMELET is incompatible with WEAKLY_COUPLED_HEAT in the same zone.", + CURRENT_FUNCTION); + } + } - /* --- Check for NEMO compatibility issues ---*/ - if (Kind_FluidModel == SU2_NONEQ && - (Kind_TransCoeffModel != TRANSCOEFFMODEL::WILKE && Kind_TransCoeffModel != TRANSCOEFFMODEL::SUTHERLAND && - Kind_TransCoeffModel != TRANSCOEFFMODEL::GUPTAYOS)) { - SU2_MPI::Error( - "Transport model not available for NEMO solver using SU2TCLIB. Please use the WILKE, SUTHERLAND or GUPTAYOS " - "transport model instead.", - CURRENT_FUNCTION); - } + /*--- Check for Measurement System ---*/ - if (Kind_Solver == MAIN_SOLVER::NEMO_NAVIER_STOKES) { - if (Kind_FluidModel == SU2_NONEQ && GasModel == "AIR-7" && Kind_TransCoeffModel != TRANSCOEFFMODEL::GUPTAYOS) { - SU2_MPI::Error("Only Gupta-Yos transport model available for ionized flows using SU2TCLIB.", CURRENT_FUNCTION); + if (SystemMeasurements == US && !standard_air) { + SU2_MPI::Error("Only STANDARD_AIR fluid model can be used with US Measurement System", CURRENT_FUNCTION); } - } - if (Kind_FluidModel == MUTATIONPP && - (Kind_TransCoeffModel != TRANSCOEFFMODEL::WILKE && Kind_TransCoeffModel != TRANSCOEFFMODEL::CHAPMANN_ENSKOG)) { - SU2_MPI::Error( - "Transport model not available for NEMO solver using MUTATIONPP. Please use the WILKE or CHAPMANN_ENSKOG " - "transport model instead..", - CURRENT_FUNCTION); - } + /* --- Check for NEMO compatibility issues ---*/ + if (Kind_FluidModel == SU2_NONEQ && (Kind_TransCoeffModel != TRANSCOEFFMODEL::WILKE && Kind_TransCoeffModel != TRANSCOEFFMODEL::SUTHERLAND && Kind_TransCoeffModel != TRANSCOEFFMODEL::GUPTAYOS) ) { + SU2_MPI::Error("Transport model not available for NEMO solver using SU2TCLIB. Please use the WILKE, SUTHERLAND or GUPTAYOS transport model instead.", CURRENT_FUNCTION); + } - if (Kind_FluidModel == SU2_NONEQ && GasModel == "AIR-7" && nWall_Catalytic != 0) { - SU2_MPI::Error("Catalytic wall recombination is not yet available for ionized flows in SU2_NEMO.", - CURRENT_FUNCTION); - } + if (Kind_Solver == MAIN_SOLVER::NEMO_NAVIER_STOKES) { + if (Kind_FluidModel == SU2_NONEQ && GasModel == "AIR-7" && Kind_TransCoeffModel != TRANSCOEFFMODEL::GUPTAYOS) { + SU2_MPI::Error("Only Gupta-Yos transport model available for ionized flows using SU2TCLIB.", CURRENT_FUNCTION); + } + } - if (!ideal_gas && !nemo) { - if (Kind_Upwind_Flow != UPWIND::ROE && Kind_Upwind_Flow != UPWIND::HLLC && Kind_Centered_Flow != CENTERED::JST) { - SU2_MPI::Error( - "Only ROE Upwind, HLLC Upwind scheme, and JST scheme can be used for Non-Ideal Compressible Fluids", - CURRENT_FUNCTION); + if (Kind_FluidModel == MUTATIONPP && + (Kind_TransCoeffModel != TRANSCOEFFMODEL::WILKE && Kind_TransCoeffModel != TRANSCOEFFMODEL::CHAPMANN_ENSKOG)) { + SU2_MPI::Error("Transport model not available for NEMO solver using MUTATIONPP. Please use the WILKE or CHAPMANN_ENSKOG transport model instead..", + CURRENT_FUNCTION); } - } - if (GetBoolTurbomachinery()) { - nBlades = new su2double[nZone]; - FreeStreamTurboNormal = new su2double[3]; - } + if (Kind_FluidModel == SU2_NONEQ && GasModel == "AIR-7" && nWall_Catalytic != 0) { + SU2_MPI::Error("Catalytic wall recombination is not yet available for ionized flows in SU2_NEMO.", CURRENT_FUNCTION); + } - /*--- Check if Giles are used with turbo markers ---*/ + if (!ideal_gas && !nemo) { + if (Kind_Upwind_Flow != UPWIND::ROE && Kind_Upwind_Flow != UPWIND::HLLC && Kind_Centered_Flow != CENTERED::JST) { + SU2_MPI::Error("Only ROE Upwind, HLLC Upwind scheme, and JST scheme can be used for Non-Ideal Compressible Fluids", CURRENT_FUNCTION); + } + } - if (nMarker_Giles > 0 && !GetBoolTurbomachinery()) { - SU2_MPI::Error("Giles Boundary conditions can only be used with turbomachinery markers", CURRENT_FUNCTION); - } + if (GetBoolTurbomachinery()) { + nBlades = new su2double[nZone]; + FreeStreamTurboNormal = new su2double[3]; + } - /*--- Check for Boundary condition available for NICFD ---*/ + /*--- Check if Giles are used with turbo markers ---*/ - if ((!ideal_gas) && (!noneq_gas)) { - if (nMarker_Inlet != 0) { - SU2_MPI::Error( - "Riemann Boundary conditions or Giles must be used for inlet and outlet with Not Ideal Compressible " - "Fluids ", - CURRENT_FUNCTION); - } - if (nMarker_Outlet != 0) { - SU2_MPI::Error("Riemann Boundary conditions or Giles must be used outlet with Not Ideal Compressible Fluids ", - CURRENT_FUNCTION); + if (nMarker_Giles > 0 && !GetBoolTurbomachinery()) { + SU2_MPI::Error("Giles Boundary conditions can only be used with turbomachinery markers", CURRENT_FUNCTION); } - if (nMarker_FarField != 0) { - SU2_MPI::Error("Riemann Boundary conditions or Giles must be used outlet with Not Ideal Compressible Fluids ", - CURRENT_FUNCTION); - } - } + /*--- Check for Boundary condition available for NICFD ---*/ - /*--- Check for Boundary condition available for NICF ---*/ + if ((!ideal_gas) && (!noneq_gas)) { + if (nMarker_Inlet != 0) { + SU2_MPI::Error( + "Riemann Boundary conditions or Giles must be used for inlet and outlet with Not Ideal Compressible " + "Fluids ", + CURRENT_FUNCTION); + } + if (nMarker_Outlet != 0) { + SU2_MPI::Error("Riemann Boundary conditions or Giles must be used outlet with Not Ideal Compressible Fluids ", + CURRENT_FUNCTION); + } - if (ideal_gas && (Kind_Solver != MAIN_SOLVER::INC_EULER && Kind_Solver != MAIN_SOLVER::INC_NAVIER_STOKES && - Kind_Solver != MAIN_SOLVER::INC_RANS)) { - if (SystemMeasurements == US && standard_air) { - if (Kind_ViscosityModel != VISCOSITYMODEL::SUTHERLAND) { - SU2_MPI::Error("Only SUTHERLAND viscosity model can be used with US Measurement", CURRENT_FUNCTION); + if (nMarker_FarField != 0) { + SU2_MPI::Error("Riemann Boundary conditions or Giles must be used outlet with Not Ideal Compressible Fluids ", + CURRENT_FUNCTION); } } - if (Kind_ConductivityModel != CONDUCTIVITYMODEL::CONSTANT_PRANDTL) { - SU2_MPI::Error("Only CONSTANT_PRANDTL thermal conductivity model can be used with STANDARD_AIR and IDEAL_GAS", - CURRENT_FUNCTION); + + /*--- Check for Boundary condition available for NICF ---*/ + + if (ideal_gas && (Kind_Solver != MAIN_SOLVER::INC_EULER && Kind_Solver != MAIN_SOLVER::INC_NAVIER_STOKES && + Kind_Solver != MAIN_SOLVER::INC_RANS)) { + if (SystemMeasurements == US && standard_air) { + if (Kind_ViscosityModel != VISCOSITYMODEL::SUTHERLAND) { + SU2_MPI::Error("Only SUTHERLAND viscosity model can be used with US Measurement", CURRENT_FUNCTION); + } + } + if (Kind_ConductivityModel != CONDUCTIVITYMODEL::CONSTANT_PRANDTL) { + SU2_MPI::Error("Only CONSTANT_PRANDTL thermal conductivity model can be used with STANDARD_AIR and IDEAL_GAS", + CURRENT_FUNCTION); + } } - } - /*--- Check for Boundary condition option agreement ---*/ - if (Kind_InitOption == REYNOLDS) { - if ((Kind_Solver == MAIN_SOLVER::NAVIER_STOKES || Kind_Solver == MAIN_SOLVER::RANS) && Reynolds <= 0) { + /*--- Check for Boundary condition option agreement ---*/ + if (Kind_InitOption == REYNOLDS){ + if ((Kind_Solver == MAIN_SOLVER::NAVIER_STOKES || Kind_Solver == MAIN_SOLVER::RANS) && Reynolds <=0){ SU2_MPI::Error("Reynolds number required for NAVIER_STOKES and RANS !!", CURRENT_FUNCTION); } } @@ -4411,44 +4045,45 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i SU2_MPI::Error("Number of SURFACE_MOVEMENT must match number of MARKER_MOVING", CURRENT_FUNCTION); } - if (TimeMarching == TIME_MARCHING::TIME_STEPPING) { - nIter = 1; - nInnerIter = 1; + if (TimeMarching == TIME_MARCHING::TIME_STEPPING){ + nIter = 1; + nInnerIter = 1; } - if (!Multizone_Problem) { - ScreenWrtFreq[1] = 0; + if (!Multizone_Problem){ + ScreenWrtFreq[1] = 0; HistoryWrtFreq[1] = 0; - if (!Time_Domain) { + if (!Time_Domain){ /*--- If not running multizone or unsteady, INNER_ITER and ITER are interchangeable, * but precedence will be given to INNER_ITER if both options are present. ---*/ - if (!OptionIsSet("INNER_ITER")) { + if (!OptionIsSet("INNER_ITER")){ nInnerIter = nIter; } } } - if ((Multizone_Problem || Time_Domain) && OptionIsSet("ITER")) { - SU2_MPI::Error( - "ITER must not be used when running multizone and/or unsteady problems.\n" - "Use TIME_ITER, OUTER_ITER or INNER_ITER to specify number of time iterations,\n" - "outer iterations or inner iterations, respectively.", - CURRENT_FUNCTION); + + if ((Multizone_Problem || Time_Domain) && OptionIsSet("ITER")){ + SU2_MPI::Error("ITER must not be used when running multizone and/or unsteady problems.\n" + "Use TIME_ITER, OUTER_ITER or INNER_ITER to specify number of time iterations,\n" + "outer iterations or inner iterations, respectively.", CURRENT_FUNCTION); } /*--- If we're solving a purely steady problem with no prescribed grid movement (both rotating frame and moving walls can be steady), make sure that there is no grid motion ---*/ - if (GetGrid_Movement()) { + if (GetGrid_Movement()){ if ((Kind_SU2 == SU2_COMPONENT::SU2_CFD || Kind_SU2 == SU2_COMPONENT::SU2_SOL) && - (TimeMarching == TIME_MARCHING::STEADY && !Time_Domain)) { - if ((Kind_GridMovement != ROTATING_FRAME) && (Kind_GridMovement != STEADY_TRANSLATION) && - (Kind_GridMovement != NONE)) { + (TimeMarching == TIME_MARCHING::STEADY && !Time_Domain)){ + + if((Kind_GridMovement != ROTATING_FRAME) && + (Kind_GridMovement != STEADY_TRANSLATION) && + (Kind_GridMovement != NONE)){ SU2_MPI::Error("Unsupported kind of grid movement for steady state problems.", CURRENT_FUNCTION); } - for (iMarker = 0; iMarker < nMarker_Moving; iMarker++) { - if (Kind_SurfaceMovement[iMarker] != MOVING_WALL) { + for (iMarker = 0; iMarker < nMarker_Moving; iMarker++){ + if (Kind_SurfaceMovement[iMarker] != MOVING_WALL){ SU2_MPI::Error("Unsupported kind of surface movement for steady state problems.", CURRENT_FUNCTION); } } @@ -4464,7 +4099,8 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i /*--- If it is not specified, set the mesh motion mach number equal to the freestream value. ---*/ - if (GetDynamic_Grid() && Mach_Motion == 0.0) Mach_Motion = Mach; + if (GetDynamic_Grid() && Mach_Motion == 0.0) + Mach_Motion = Mach; /*--- Set the boolean flag if we are in a rotating frame (source term). ---*/ @@ -4474,88 +4110,72 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i config file, set them equal to zero for safety. Also check to make sure that for each option, a value has been declared for each moving marker. ---*/ - if (nMarker_Moving > 0) { - if (nMarkerMotion_Origin == 0) { - nMarkerMotion_Origin = 3 * nMarker_Moving; - MarkerMotion_Origin = new su2double[nMarkerMotion_Origin](); + if (nMarker_Moving > 0){ + if (nMarkerMotion_Origin == 0){ + nMarkerMotion_Origin = 3*nMarker_Moving; + MarkerMotion_Origin = new su2double[nMarkerMotion_Origin] (); } - if (nMarkerMotion_Origin / 3 != nMarker_Moving) { - SU2_MPI::Error( - "Number of SURFACE_MOTION_ORIGIN must be three times the number of MARKER_MOVING, (x,y,z) per marker.", - CURRENT_FUNCTION); + if (nMarkerMotion_Origin/3 != nMarker_Moving){ + SU2_MPI::Error("Number of SURFACE_MOTION_ORIGIN must be three times the number of MARKER_MOVING, (x,y,z) per marker.", CURRENT_FUNCTION); } - if (nMarkerTranslation == 0) { - nMarkerTranslation = 3 * nMarker_Moving; - MarkerTranslation_Rate = new su2double[nMarkerTranslation](); + if (nMarkerTranslation == 0){ + nMarkerTranslation = 3*nMarker_Moving; + MarkerTranslation_Rate = new su2double[nMarkerTranslation] (); } - if (nMarkerTranslation / 3 != nMarker_Moving) { - SU2_MPI::Error( - "Number of SURFACE_TRANSLATION_RATE must be three times the number of MARKER_MOVING, (x,y,z) per marker.", - CURRENT_FUNCTION); + if (nMarkerTranslation/3 != nMarker_Moving){ + SU2_MPI::Error("Number of SURFACE_TRANSLATION_RATE must be three times the number of MARKER_MOVING, (x,y,z) per marker.", CURRENT_FUNCTION); } - if (nMarkerRotation_Rate == 0) { - nMarkerRotation_Rate = 3 * nMarker_Moving; - MarkerRotation_Rate = new su2double[nMarkerRotation_Rate](); + if (nMarkerRotation_Rate == 0){ + nMarkerRotation_Rate = 3*nMarker_Moving; + MarkerRotation_Rate = new su2double[nMarkerRotation_Rate] (); } - if (nMarkerRotation_Rate / 3 != nMarker_Moving) { - SU2_MPI::Error( - "Number of SURFACE_ROTATION_RATE must be three times the number of MARKER_MOVING, (x,y,z) per marker.", - CURRENT_FUNCTION); + if (nMarkerRotation_Rate/3 != nMarker_Moving){ + SU2_MPI::Error("Number of SURFACE_ROTATION_RATE must be three times the number of MARKER_MOVING, (x,y,z) per marker.", CURRENT_FUNCTION); } - if (nMarkerPlunging_Ampl == 0) { - nMarkerPlunging_Ampl = 3 * nMarker_Moving; - MarkerPlunging_Ampl = new su2double[nMarkerPlunging_Ampl](); + if (nMarkerPlunging_Ampl == 0){ + nMarkerPlunging_Ampl = 3*nMarker_Moving; + MarkerPlunging_Ampl = new su2double[nMarkerPlunging_Ampl] (); } - if (nMarkerPlunging_Ampl / 3 != nMarker_Moving) { - SU2_MPI::Error( - "Number of SURFACE_PLUNGING_AMPL must be three times the number of MARKER_MOVING, (x,y,z) per marker.", - CURRENT_FUNCTION); + if (nMarkerPlunging_Ampl/3 != nMarker_Moving){ + SU2_MPI::Error("Number of SURFACE_PLUNGING_AMPL must be three times the number of MARKER_MOVING, (x,y,z) per marker.", CURRENT_FUNCTION); } - if (nMarkerPlunging_Omega == 0) { - nMarkerPlunging_Omega = 3 * nMarker_Moving; - MarkerPlunging_Omega = new su2double[nMarkerPlunging_Omega](); + if (nMarkerPlunging_Omega == 0){ + nMarkerPlunging_Omega = 3*nMarker_Moving; + MarkerPlunging_Omega = new su2double[nMarkerPlunging_Omega] (); } - if (nMarkerPlunging_Omega / 3 != nMarker_Moving) { - SU2_MPI::Error( - "Number of SURFACE_PLUNGING_OMEGA must be three times the number of MARKER_MOVING, (x,y,z) per marker.", - CURRENT_FUNCTION); + if (nMarkerPlunging_Omega/3 != nMarker_Moving){ + SU2_MPI::Error("Number of SURFACE_PLUNGING_OMEGA must be three times the number of MARKER_MOVING, (x,y,z) per marker.", CURRENT_FUNCTION); } - if (nMarkerPitching_Ampl == 0) { - nMarkerPitching_Ampl = 3 * nMarker_Moving; - MarkerPitching_Ampl = new su2double[nMarkerPitching_Ampl](); + if (nMarkerPitching_Ampl == 0){ + nMarkerPitching_Ampl = 3*nMarker_Moving; + MarkerPitching_Ampl = new su2double[nMarkerPitching_Ampl] (); } - if (nMarkerPitching_Ampl / 3 != nMarker_Moving) { - SU2_MPI::Error( - "Number of SURFACE_PITCHING_AMPL must be three times the number of MARKER_MOVING, (x,y,z) per marker.", - CURRENT_FUNCTION); + if (nMarkerPitching_Ampl/3 != nMarker_Moving){ + SU2_MPI::Error("Number of SURFACE_PITCHING_AMPL must be three times the number of MARKER_MOVING, (x,y,z) per marker.", CURRENT_FUNCTION); } - if (nMarkerPitching_Omega == 0) { - nMarkerPitching_Omega = 3 * nMarker_Moving; - MarkerPitching_Omega = new su2double[nMarkerPitching_Omega](); + if (nMarkerPitching_Omega == 0){ + nMarkerPitching_Omega = 3*nMarker_Moving; + MarkerPitching_Omega = new su2double[nMarkerPitching_Omega] (); } - if (nMarkerPitching_Omega / 3 != nMarker_Moving) { - SU2_MPI::Error( - "Number of SURFACE_PITCHING_OMEGA must be three times the number of MARKER_MOVING, (x,y,z) per marker.", - CURRENT_FUNCTION); + if (nMarkerPitching_Omega/3 != nMarker_Moving){ + SU2_MPI::Error("Number of SURFACE_PITCHING_OMEGA must be three times the number of MARKER_MOVING, (x,y,z) per marker.", CURRENT_FUNCTION); } - if (nMarkerPitching_Phase == 0) { - nMarkerPitching_Phase = 3 * nMarker_Moving; - MarkerPitching_Phase = new su2double[nMarkerPitching_Phase](); + if (nMarkerPitching_Phase == 0){ + nMarkerPitching_Phase = 3*nMarker_Moving; + MarkerPitching_Phase = new su2double[nMarkerPitching_Phase] (); } - if (nMarkerPitching_Phase / 3 != nMarker_Moving) { - SU2_MPI::Error( - "Number of SURFACE_PITCHING_PHASE must be three times the number of MARKER_MOVING, (x,y,z) per marker.", - CURRENT_FUNCTION); + if (nMarkerPitching_Phase/3 != nMarker_Moving){ + SU2_MPI::Error("Number of SURFACE_PITCHING_PHASE must be three times the number of MARKER_MOVING, (x,y,z) per marker.", CURRENT_FUNCTION); } - if (nMoveMotion_Origin == 0) { + if (nMoveMotion_Origin == 0){ nMoveMotion_Origin = nMarker_Moving; MoveMotion_Origin = new unsigned short[nMoveMotion_Origin]; - for (iMarker = 0; iMarker < nMarker_Moving; iMarker++) { + for (iMarker = 0; iMarker < nMarker_Moving; iMarker++){ MoveMotion_Origin[iMarker] = NO; } } - if (nMoveMotion_Origin != nMarker_Moving) { + if (nMoveMotion_Origin != nMarker_Moving){ SU2_MPI::Error("Number of MOVE_MOTION_ORIGIN must match number of MARKER_MOVING.", CURRENT_FUNCTION); } } @@ -4564,61 +4184,61 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i if (TimeMarching == TIME_MARCHING::HARMONIC_BALANCE) { HarmonicBalance_Period = GetHarmonicBalance_Period(); - if (HarmonicBalance_Period < 0) { + if (HarmonicBalance_Period < 0) { SU2_MPI::Error("Not a valid value for time period!!", CURRENT_FUNCTION); } /* Initialize the Harmonic balance Frequency pointer */ if (Omega_HB == nullptr) { Omega_HB = new su2double[nOmega_HB]; - for (unsigned short iZone = 0; iZone < nOmega_HB; iZone++) Omega_HB[iZone] = 0.0; - } else { + for (unsigned short iZone = 0; iZone < nOmega_HB; iZone++ ) + Omega_HB[iZone] = 0.0; + } else { if (nOmega_HB != nTimeInstances) { - SU2_MPI::Error("Length of omega_HB must match the number TIME_INSTANCES!!", CURRENT_FUNCTION); + SU2_MPI::Error("Length of omega_HB must match the number TIME_INSTANCES!!" , CURRENT_FUNCTION); } } } /*--- Force number of span-wise section to 1 if 2D case ---*/ - if (val_nDim == 2) { - nSpanWiseSections_User = 1; - Kind_SpanWise = EQUISPACED; + if(val_nDim ==2){ + nSpanWiseSections_User=1; + Kind_SpanWise= EQUISPACED; } /*--- Set number of TurboPerformance markers ---*/ - if (nMarker_Turbomachinery > 0) { - if (nMarker_Turbomachinery > 1) { - nMarker_TurboPerformance = nMarker_Turbomachinery + SU2_TYPE::Int(nMarker_Turbomachinery / 2) + 1; - } else { + if(nMarker_Turbomachinery > 0){ + if(nMarker_Turbomachinery > 1){ + nMarker_TurboPerformance = nMarker_Turbomachinery + SU2_TYPE::Int(nMarker_Turbomachinery/2) + 1; + }else{ nMarker_TurboPerformance = nMarker_Turbomachinery; } } else { nMarker_TurboPerformance = 0; - nSpanWiseSections = 1; + nSpanWiseSections =1; } /*--- Set number of TurboPerformance markers ---*/ - if (nMarker_Turbomachinery != 0) { + if(nMarker_Turbomachinery != 0){ nSpan_iZones = new unsigned short[nZone]; } /*--- Set number of TurboPerformance markers ---*/ - if (GetGrid_Movement() && RampRotatingFrame && !DiscreteAdjoint) { + if(GetGrid_Movement() && RampRotatingFrame && !DiscreteAdjoint){ FinalRotation_Rate_Z = Rotation_Rate[2]; - if (abs(FinalRotation_Rate_Z) > 0.0) { + if(abs(FinalRotation_Rate_Z) > 0.0){ Rotation_Rate[2] = rampRotFrame_coeff[0]; } } - if (RampOutletPressure && !DiscreteAdjoint) { - for (iMarker = 0; iMarker < nMarker_Giles; iMarker++) { - if (Kind_Data_Giles[iMarker] == STATIC_PRESSURE || Kind_Data_Giles[iMarker] == STATIC_PRESSURE_1D || - Kind_Data_Giles[iMarker] == RADIAL_EQUILIBRIUM) { + if(RampOutletPressure && !DiscreteAdjoint){ + for (iMarker = 0; iMarker < nMarker_Giles; iMarker++){ + if (Kind_Data_Giles[iMarker] == STATIC_PRESSURE || Kind_Data_Giles[iMarker] == STATIC_PRESSURE_1D || Kind_Data_Giles[iMarker] == RADIAL_EQUILIBRIUM ){ FinalOutletPressure = Giles_Var1[iMarker]; Giles_Var1[iMarker] = rampOutPres_coeff[0]; } } - for (iMarker = 0; iMarker < nMarker_Riemann; iMarker++) { - if (Kind_Data_Riemann[iMarker] == STATIC_PRESSURE || Kind_Data_Riemann[iMarker] == RADIAL_EQUILIBRIUM) { + for (iMarker = 0; iMarker < nMarker_Riemann; iMarker++){ + if (Kind_Data_Riemann[iMarker] == STATIC_PRESSURE || Kind_Data_Riemann[iMarker] == RADIAL_EQUILIBRIUM){ FinalOutletPressure = Riemann_Var1[iMarker]; Riemann_Var1[iMarker] = rampOutPres_coeff[0]; } @@ -4626,12 +4246,12 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i } /*--- Check on extra Relaxation factor for Giles---*/ - if (extrarelfac[1] > 0.5) { + if(extrarelfac[1] > 0.5){ extrarelfac[1] = 0.5; } - /*--- Use the various rigid-motion input frequencies to determine the period to be used with harmonic balance cases. - There are THREE types of motion to consider, namely: rotation, pitching, and plunging. - The largest period of motion is the one to be used for harmonic balance calculations. ---*/ + /*--- Use the various rigid-motion input frequencies to determine the period to be used with harmonic balance cases. + There are THREE types of motion to consider, namely: rotation, pitching, and plunging. + The largest period of motion is the one to be used for harmonic balance calculations. ---*/ /*if (Unsteady_Simulation == HARMONIC_BALANCE) { if (!(GetGrid_Movement())) { @@ -4646,21 +4266,27 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i //--- rotation: ---// - su2double Omega_mag_rot = - sqrt(pow(Rotation_Rate_X[ZONE_0],2)+pow(Rotation_Rate_Y[ZONE_0],2)+pow(Rotation_Rate_Z[ZONE_0],2)); if (Omega_mag_rot - > 0) periods[0] = 2*PI_NUMBER/Omega_mag_rot; else periods[0] = 0.0; + su2double Omega_mag_rot = sqrt(pow(Rotation_Rate_X[ZONE_0],2)+pow(Rotation_Rate_Y[ZONE_0],2)+pow(Rotation_Rate_Z[ZONE_0],2)); + if (Omega_mag_rot > 0) + periods[0] = 2*PI_NUMBER/Omega_mag_rot; + else + periods[0] = 0.0; //--- pitching: ---// - su2double Omega_mag_pitch = - sqrt(pow(Pitching_Omega_X[ZONE_0],2)+pow(Pitching_Omega_Y[ZONE_0],2)+pow(Pitching_Omega_Z[ZONE_0],2)); if - (Omega_mag_pitch > 0) periods[1] = 2*PI_NUMBER/Omega_mag_pitch; else periods[1] = 0.0; + su2double Omega_mag_pitch = sqrt(pow(Pitching_Omega_X[ZONE_0],2)+pow(Pitching_Omega_Y[ZONE_0],2)+pow(Pitching_Omega_Z[ZONE_0],2)); + if (Omega_mag_pitch > 0) + periods[1] = 2*PI_NUMBER/Omega_mag_pitch; + else + periods[1] = 0.0; //--- plunging: ---// - su2double Omega_mag_plunge = - sqrt(pow(Plunging_Omega_X[ZONE_0],2)+pow(Plunging_Omega_Y[ZONE_0],2)+pow(Plunging_Omega_Z[ZONE_0],2)); if - (Omega_mag_plunge > 0) periods[2] = 2*PI_NUMBER/Omega_mag_plunge; else periods[2] = 0.0; + su2double Omega_mag_plunge = sqrt(pow(Plunging_Omega_X[ZONE_0],2)+pow(Plunging_Omega_Y[ZONE_0],2)+pow(Plunging_Omega_Z[ZONE_0],2)); + if (Omega_mag_plunge > 0) + periods[2] = 2*PI_NUMBER/Omega_mag_plunge; + else + periods[2] = 0.0; //--- determine which period is largest ---// @@ -4676,76 +4302,85 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i }*/ + /*--- In case the moment origin coordinates have not been declared in the config file, set them equal to zero for safety. Also check to make sure that for each marker, a value has been declared for the moment origin. Unless only one value was specified, then set this value for all the markers being monitored. ---*/ - if ((nRefOriginMoment_X != nRefOriginMoment_Y) || (nRefOriginMoment_X != nRefOriginMoment_Z)) { - SU2_MPI::Error( - "ERROR: Length of REF_ORIGIN_MOMENT_X, REF_ORIGIN_MOMENT_Y and REF_ORIGIN_MOMENT_Z must be the same!!", - CURRENT_FUNCTION); + + if ((nRefOriginMoment_X != nRefOriginMoment_Y) || (nRefOriginMoment_X != nRefOriginMoment_Z) ) { + SU2_MPI::Error("ERROR: Length of REF_ORIGIN_MOMENT_X, REF_ORIGIN_MOMENT_Y and REF_ORIGIN_MOMENT_Z must be the same!!", CURRENT_FUNCTION); } if (RefOriginMoment_X == nullptr) { RefOriginMoment_X = new su2double[nMarker_Monitoring]; - for (iMarker = 0; iMarker < nMarker_Monitoring; iMarker++) RefOriginMoment_X[iMarker] = 0.0; + for (iMarker = 0; iMarker < nMarker_Monitoring; iMarker++ ) + RefOriginMoment_X[iMarker] = 0.0; } else { if (nRefOriginMoment_X == 1) { + su2double aux_RefOriginMoment_X = RefOriginMoment_X[0]; - delete[] RefOriginMoment_X; + delete [] RefOriginMoment_X; RefOriginMoment_X = new su2double[nMarker_Monitoring]; nRefOriginMoment_X = nMarker_Monitoring; - for (iMarker = 0; iMarker < nMarker_Monitoring; iMarker++) RefOriginMoment_X[iMarker] = aux_RefOriginMoment_X; - } else if (nRefOriginMoment_X != nMarker_Monitoring) { - SU2_MPI::Error("ERROR: Length of REF_ORIGIN_MOMENT_X must match number of Monitoring Markers!!", - CURRENT_FUNCTION); + for (iMarker = 0; iMarker < nMarker_Monitoring; iMarker++ ) + RefOriginMoment_X[iMarker] = aux_RefOriginMoment_X; + } + else if (nRefOriginMoment_X != nMarker_Monitoring) { + SU2_MPI::Error("ERROR: Length of REF_ORIGIN_MOMENT_X must match number of Monitoring Markers!!", CURRENT_FUNCTION); } } if (RefOriginMoment_Y == nullptr) { RefOriginMoment_Y = new su2double[nMarker_Monitoring]; - for (iMarker = 0; iMarker < nMarker_Monitoring; iMarker++) RefOriginMoment_Y[iMarker] = 0.0; + for (iMarker = 0; iMarker < nMarker_Monitoring; iMarker++ ) + RefOriginMoment_Y[iMarker] = 0.0; } else { if (nRefOriginMoment_Y == 1) { + su2double aux_RefOriginMoment_Y = RefOriginMoment_Y[0]; - delete[] RefOriginMoment_Y; + delete [] RefOriginMoment_Y; RefOriginMoment_Y = new su2double[nMarker_Monitoring]; nRefOriginMoment_Y = nMarker_Monitoring; - for (iMarker = 0; iMarker < nMarker_Monitoring; iMarker++) RefOriginMoment_Y[iMarker] = aux_RefOriginMoment_Y; - } else if (nRefOriginMoment_Y != nMarker_Monitoring) { - SU2_MPI::Error("ERROR: Length of REF_ORIGIN_MOMENT_Y must match number of Monitoring Markers!!", - CURRENT_FUNCTION); + for (iMarker = 0; iMarker < nMarker_Monitoring; iMarker++ ) + RefOriginMoment_Y[iMarker] = aux_RefOriginMoment_Y; + } + else if (nRefOriginMoment_Y != nMarker_Monitoring) { + SU2_MPI::Error("ERROR: Length of REF_ORIGIN_MOMENT_Y must match number of Monitoring Markers!!", CURRENT_FUNCTION); } } if (RefOriginMoment_Z == nullptr) { RefOriginMoment_Z = new su2double[nMarker_Monitoring]; - for (iMarker = 0; iMarker < nMarker_Monitoring; iMarker++) RefOriginMoment_Z[iMarker] = 0.0; + for (iMarker = 0; iMarker < nMarker_Monitoring; iMarker++ ) + RefOriginMoment_Z[iMarker] = 0.0; } else { if (nRefOriginMoment_Z == 1) { + su2double aux_RefOriginMoment_Z = RefOriginMoment_Z[0]; - delete[] RefOriginMoment_Z; + delete [] RefOriginMoment_Z; RefOriginMoment_Z = new su2double[nMarker_Monitoring]; nRefOriginMoment_Z = nMarker_Monitoring; - for (iMarker = 0; iMarker < nMarker_Monitoring; iMarker++) RefOriginMoment_Z[iMarker] = aux_RefOriginMoment_Z; - } else if (nRefOriginMoment_Z != nMarker_Monitoring) { - SU2_MPI::Error("ERROR: Length of REF_ORIGIN_MOMENT_Z must match number of Monitoring Markers!!", - CURRENT_FUNCTION); + for (iMarker = 0; iMarker < nMarker_Monitoring; iMarker++ ) + RefOriginMoment_Z[iMarker] = aux_RefOriginMoment_Z; + } + else if (nRefOriginMoment_Z != nMarker_Monitoring) { + SU2_MPI::Error("ERROR: Length of REF_ORIGIN_MOMENT_Z must match number of Monitoring Markers!!", CURRENT_FUNCTION); } } /*--- Set the boolean flag if we are carrying out an aeroelastic simulation. ---*/ - Aeroelastic_Simulation = - GetGrid_Movement() && (GetSurface_Movement(AEROELASTIC) || GetSurface_Movement(AEROELASTIC_RIGID_MOTION)); + Aeroelastic_Simulation = GetGrid_Movement() && (GetSurface_Movement(AEROELASTIC) || GetSurface_Movement(AEROELASTIC_RIGID_MOTION)); /*--- Initializing the size for the solutions of the Aeroelastic problem. ---*/ + if (GetGrid_Movement() && Aeroelastic_Simulation) { Aeroelastic_np1.resize(nMarker_Monitoring); Aeroelastic_n.resize(nMarker_Monitoring); @@ -4754,11 +4389,11 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i Aeroelastic_np1[iMarker].resize(2); Aeroelastic_n[iMarker].resize(2); Aeroelastic_n1[iMarker].resize(2); - for (int i = 0; i < 2; i++) { + for (int i =0; i<2; i++) { Aeroelastic_np1[iMarker][i].resize(2); Aeroelastic_n[iMarker][i].resize(2); Aeroelastic_n1[iMarker][i].resize(2); - for (int j = 0; j < 2; j++) { + for (int j=0; j<2; j++) { Aeroelastic_np1[iMarker][i][j] = 0.0; Aeroelastic_n[iMarker][i][j] = 0.0; Aeroelastic_n1[iMarker][i][j] = 0.0; @@ -4772,7 +4407,7 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i if (GetGrid_Movement() && Aeroelastic_Simulation) { Aeroelastic_pitch = new su2double[nMarker_Monitoring]; Aeroelastic_plunge = new su2double[nMarker_Monitoring]; - for (iMarker = 0; iMarker < nMarker_Monitoring; iMarker++) { + for (iMarker = 0; iMarker < nMarker_Monitoring; iMarker++ ) { Aeroelastic_pitch[iMarker] = 0.0; Aeroelastic_plunge[iMarker] = 0.0; } @@ -4781,14 +4416,18 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i FinestMesh = MESH_0; if (MGCycle == FULLMG_CYCLE) FinestMesh = nMGLevels; - if ((Kind_Solver == MAIN_SOLVER::NAVIER_STOKES) && (Kind_Turb_Model != TURB_MODEL::NONE)) + if ((Kind_Solver == MAIN_SOLVER::NAVIER_STOKES) && + (Kind_Turb_Model != TURB_MODEL::NONE)) Kind_Solver = MAIN_SOLVER::RANS; - if ((Kind_Solver == MAIN_SOLVER::INC_NAVIER_STOKES) && (Kind_Turb_Model != TURB_MODEL::NONE)) + if ((Kind_Solver == MAIN_SOLVER::INC_NAVIER_STOKES) && + (Kind_Turb_Model != TURB_MODEL::NONE)) Kind_Solver = MAIN_SOLVER::INC_RANS; - if (Kind_Solver == MAIN_SOLVER::EULER || Kind_Solver == MAIN_SOLVER::INC_EULER || - Kind_Solver == MAIN_SOLVER::NEMO_EULER || Kind_Solver == MAIN_SOLVER::FEM_EULER) + if (Kind_Solver == MAIN_SOLVER::EULER || + Kind_Solver == MAIN_SOLVER::INC_EULER || + Kind_Solver == MAIN_SOLVER::NEMO_EULER || + Kind_Solver == MAIN_SOLVER::FEM_EULER) Kind_Turb_Model = TURB_MODEL::NONE; Kappa_2nd_Flow = jst_coeff[0]; @@ -4799,89 +4438,113 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i /*--- Make the MG_PreSmooth, MG_PostSmooth, and MG_CorrecSmooth arrays consistent with nMGLevels ---*/ - auto* tmp_smooth = new unsigned short[nMGLevels + 1]; + auto * tmp_smooth = new unsigned short[nMGLevels+1]; + + if ((nMG_PreSmooth != nMGLevels+1) && (nMG_PreSmooth != 0)) { + if (nMG_PreSmooth > nMGLevels+1) { - if ((nMG_PreSmooth != nMGLevels + 1) && (nMG_PreSmooth != 0)) { - if (nMG_PreSmooth > nMGLevels + 1) { /*--- Truncate by removing unnecessary elements at the end ---*/ - for (unsigned int i = 0; i <= nMGLevels; i++) tmp_smooth[i] = MG_PreSmooth[i]; - delete[] MG_PreSmooth; - MG_PreSmooth = nullptr; - } else { + for (unsigned int i = 0; i <= nMGLevels; i++) + tmp_smooth[i] = MG_PreSmooth[i]; + delete [] MG_PreSmooth; + MG_PreSmooth=nullptr; + } + else { + /*--- Add additional elements equal to last element ---*/ - for (unsigned int i = 0; i < nMG_PreSmooth; i++) tmp_smooth[i] = MG_PreSmooth[i]; - for (unsigned int i = nMG_PreSmooth; i <= nMGLevels; i++) tmp_smooth[i] = MG_PreSmooth[nMG_PreSmooth - 1]; - delete[] MG_PreSmooth; - MG_PreSmooth = nullptr; + for (unsigned int i = 0; i < nMG_PreSmooth; i++) + tmp_smooth[i] = MG_PreSmooth[i]; + for (unsigned int i = nMG_PreSmooth; i <= nMGLevels; i++) + tmp_smooth[i] = MG_PreSmooth[nMG_PreSmooth-1]; + delete [] MG_PreSmooth; + MG_PreSmooth=nullptr; } - nMG_PreSmooth = nMGLevels + 1; + nMG_PreSmooth = nMGLevels+1; MG_PreSmooth = new unsigned short[nMG_PreSmooth]; - for (unsigned int i = 0; i < nMG_PreSmooth; i++) MG_PreSmooth[i] = tmp_smooth[i]; + for (unsigned int i = 0; i < nMG_PreSmooth; i++) + MG_PreSmooth[i] = tmp_smooth[i]; } if ((nMGLevels != 0) && (nMG_PreSmooth == 0)) { - delete[] MG_PreSmooth; - nMG_PreSmooth = nMGLevels + 1; + delete [] MG_PreSmooth; + nMG_PreSmooth = nMGLevels+1; MG_PreSmooth = new unsigned short[nMG_PreSmooth]; - for (unsigned int i = 0; i < nMG_PreSmooth; i++) MG_PreSmooth[i] = i + 1; + for (unsigned int i = 0; i < nMG_PreSmooth; i++) + MG_PreSmooth[i] = i+1; } - if ((nMG_PostSmooth != nMGLevels + 1) && (nMG_PostSmooth != 0)) { - if (nMG_PostSmooth > nMGLevels + 1) { + if ((nMG_PostSmooth != nMGLevels+1) && (nMG_PostSmooth != 0)) { + if (nMG_PostSmooth > nMGLevels+1) { + /*--- Truncate by removing unnecessary elements at the end ---*/ - for (unsigned int i = 0; i <= nMGLevels; i++) tmp_smooth[i] = MG_PostSmooth[i]; - delete[] MG_PostSmooth; - MG_PostSmooth = nullptr; - } else { + for (unsigned int i = 0; i <= nMGLevels; i++) + tmp_smooth[i] = MG_PostSmooth[i]; + delete [] MG_PostSmooth; + MG_PostSmooth=nullptr; + } + else { + /*--- Add additional elements equal to last element ---*/ - for (unsigned int i = 0; i < nMG_PostSmooth; i++) tmp_smooth[i] = MG_PostSmooth[i]; - for (unsigned int i = nMG_PostSmooth; i <= nMGLevels; i++) tmp_smooth[i] = MG_PostSmooth[nMG_PostSmooth - 1]; - delete[] MG_PostSmooth; - MG_PostSmooth = nullptr; + for (unsigned int i = 0; i < nMG_PostSmooth; i++) + tmp_smooth[i] = MG_PostSmooth[i]; + for (unsigned int i = nMG_PostSmooth; i <= nMGLevels; i++) + tmp_smooth[i] = MG_PostSmooth[nMG_PostSmooth-1]; + delete [] MG_PostSmooth; + MG_PostSmooth=nullptr; } - nMG_PostSmooth = nMGLevels + 1; + nMG_PostSmooth = nMGLevels+1; MG_PostSmooth = new unsigned short[nMG_PostSmooth]; - for (unsigned int i = 0; i < nMG_PostSmooth; i++) MG_PostSmooth[i] = tmp_smooth[i]; + for (unsigned int i = 0; i < nMG_PostSmooth; i++) + MG_PostSmooth[i] = tmp_smooth[i]; + } if ((nMGLevels != 0) && (nMG_PostSmooth == 0)) { - delete[] MG_PostSmooth; - nMG_PostSmooth = nMGLevels + 1; + delete [] MG_PostSmooth; + nMG_PostSmooth = nMGLevels+1; MG_PostSmooth = new unsigned short[nMG_PostSmooth]; - for (unsigned int i = 0; i < nMG_PostSmooth; i++) MG_PostSmooth[i] = 0; + for (unsigned int i = 0; i < nMG_PostSmooth; i++) + MG_PostSmooth[i] = 0; } - if ((nMG_CorrecSmooth != nMGLevels + 1) && (nMG_CorrecSmooth != 0)) { - if (nMG_CorrecSmooth > nMGLevels + 1) { + if ((nMG_CorrecSmooth != nMGLevels+1) && (nMG_CorrecSmooth != 0)) { + if (nMG_CorrecSmooth > nMGLevels+1) { + /*--- Truncate by removing unnecessary elements at the end ---*/ - for (unsigned int i = 0; i <= nMGLevels; i++) tmp_smooth[i] = MG_CorrecSmooth[i]; - delete[] MG_CorrecSmooth; + for (unsigned int i = 0; i <= nMGLevels; i++) + tmp_smooth[i] = MG_CorrecSmooth[i]; + delete [] MG_CorrecSmooth; MG_CorrecSmooth = nullptr; - } else { + } + else { + /*--- Add additional elements equal to last element ---*/ - for (unsigned int i = 0; i < nMG_CorrecSmooth; i++) tmp_smooth[i] = MG_CorrecSmooth[i]; + for (unsigned int i = 0; i < nMG_CorrecSmooth; i++) + tmp_smooth[i] = MG_CorrecSmooth[i]; for (unsigned int i = nMG_CorrecSmooth; i <= nMGLevels; i++) - tmp_smooth[i] = MG_CorrecSmooth[nMG_CorrecSmooth - 1]; - delete[] MG_CorrecSmooth; + tmp_smooth[i] = MG_CorrecSmooth[nMG_CorrecSmooth-1]; + delete [] MG_CorrecSmooth; MG_CorrecSmooth = nullptr; } - nMG_CorrecSmooth = nMGLevels + 1; + nMG_CorrecSmooth = nMGLevels+1; MG_CorrecSmooth = new unsigned short[nMG_CorrecSmooth]; - for (unsigned int i = 0; i < nMG_CorrecSmooth; i++) MG_CorrecSmooth[i] = tmp_smooth[i]; + for (unsigned int i = 0; i < nMG_CorrecSmooth; i++) + MG_CorrecSmooth[i] = tmp_smooth[i]; } if ((nMGLevels != 0) && (nMG_CorrecSmooth == 0)) { - delete[] MG_CorrecSmooth; - nMG_CorrecSmooth = nMGLevels + 1; + delete [] MG_CorrecSmooth; + nMG_CorrecSmooth = nMGLevels+1; MG_CorrecSmooth = new unsigned short[nMG_CorrecSmooth]; - for (unsigned int i = 0; i < nMG_CorrecSmooth; i++) MG_CorrecSmooth[i] = 0; + for (unsigned int i = 0; i < nMG_CorrecSmooth; i++) + MG_CorrecSmooth[i] = 0; } /*--- Override MG Smooth parameters ---*/ @@ -4901,29 +4564,27 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i if (Kind_Solver == MAIN_SOLVER::RANS) Kind_Solver = MAIN_SOLVER::ADJ_RANS; } - nCFL = nMGLevels + 1; + nCFL = nMGLevels+1; CFL = new su2double[nCFL]; CFL[0] = CFLFineGrid; /*--- Handle optional CFL adapt parameter values ---*/ if (nCFL_AdaptParam < default_cfl_adapt.size()) { - auto newParam = new su2double[default_cfl_adapt.size()]; + auto newParam = new su2double [default_cfl_adapt.size()]; for (iCFL = 0; iCFL < default_cfl_adapt.size(); ++iCFL) { - if (iCFL < nCFL_AdaptParam) - newParam[iCFL] = CFL_AdaptParam[iCFL]; - else - newParam[iCFL] = default_cfl_adapt[iCFL]; + if (iCFL < nCFL_AdaptParam) newParam[iCFL] = CFL_AdaptParam[iCFL]; + else newParam[iCFL] = default_cfl_adapt[iCFL]; } swap(newParam, CFL_AdaptParam); - delete[] newParam; + delete [] newParam; nCFL_AdaptParam = default_cfl_adapt.size(); } /*--- Evaluate when the Cl should be evaluated ---*/ - Iter_Fixed_CM = SU2_TYPE::Int(nInnerIter / (su2double(Update_iH) + 1)); - Iter_Fixed_NetThrust = SU2_TYPE::Int(nInnerIter / (su2double(Update_BCThrust) + 1)); + Iter_Fixed_CM = SU2_TYPE::Int(nInnerIter / (su2double(Update_iH)+1)); + Iter_Fixed_NetThrust = SU2_TYPE::Int(nInnerIter / (su2double(Update_BCThrust)+1)); /*--- Setting relaxation factor and CFL for the adjoint runs ---*/ @@ -4931,8 +4592,8 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i CFL[0] = CFL[0] * CFLRedCoeff_AdjFlow; CFL_AdaptParam[2] *= CFLRedCoeff_AdjFlow; CFL_AdaptParam[3] *= CFLRedCoeff_AdjFlow; - Iter_Fixed_CM = SU2_TYPE::Int(su2double(Iter_Fixed_CM) / CFLRedCoeff_AdjFlow); - Iter_Fixed_NetThrust = SU2_TYPE::Int(su2double(Iter_Fixed_NetThrust) / CFLRedCoeff_AdjFlow); + Iter_Fixed_CM = SU2_TYPE::Int(su2double (Iter_Fixed_CM) / CFLRedCoeff_AdjFlow); + Iter_Fixed_NetThrust = SU2_TYPE::Int(su2double (Iter_Fixed_NetThrust) / CFLRedCoeff_AdjFlow); } if ((DiscreteAdjoint) && (Inconsistent_Disc)) { @@ -4946,46 +4607,40 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i if (Update_AoA_Iter_Limit == 0 && Fixed_CL_Mode) { SU2_MPI::Error("ERROR: Please specify non-zero UPDATE_AOA_ITER_LIMIT.", CURRENT_FUNCTION); } - if (Iter_Fixed_CM == 0) { - Iter_Fixed_CM = nInnerIter + 1; - Update_iH = 0; - } - if (Iter_Fixed_NetThrust == 0) { - Iter_Fixed_NetThrust = nInnerIter + 1; - Update_BCThrust = 0; - } + if (Iter_Fixed_CM == 0) { Iter_Fixed_CM = nInnerIter+1; Update_iH = 0; } + if (Iter_Fixed_NetThrust == 0) { Iter_Fixed_NetThrust = nInnerIter+1; Update_BCThrust = 0; } - for (iCFL = 1; iCFL < nCFL; iCFL++) CFL[iCFL] = CFL[iCFL - 1]; + for (iCFL = 1; iCFL < nCFL; iCFL++) + CFL[iCFL] = CFL[iCFL-1]; if (nRKStep == 0) { nRKStep = 1; - RK_Alpha_Step = new su2double[1]; - RK_Alpha_Step[0] = 1.0; + RK_Alpha_Step = new su2double[1]; RK_Alpha_Step[0] = 1.0; } /* Check if the byte alignment of the matrix multiplications is a multiple of 64. */ - if (byteAlignmentMatMul % 64) { + if( byteAlignmentMatMul%64 ) { SU2_MPI::Error("ALIGNED_BYTES_MATMUL must be a multiple of 64.", CURRENT_FUNCTION); } /* Determine the value of sizeMatMulPadding, which is the matrix size in the vectorization direction when padding is applied to have optimal performance in the matrix multiplications. */ - sizeMatMulPadding = byteAlignmentMatMul / sizeof(passivedouble); + sizeMatMulPadding = byteAlignmentMatMul/sizeof(passivedouble); /* Correct the number of time levels for time accurate local time stepping, if needed. */ - if (nLevels_TimeAccurateLTS == 0) nLevels_TimeAccurateLTS = 1; - if (nLevels_TimeAccurateLTS > 15) nLevels_TimeAccurateLTS = 15; + if (nLevels_TimeAccurateLTS == 0) nLevels_TimeAccurateLTS = 1; + if (nLevels_TimeAccurateLTS > 15) nLevels_TimeAccurateLTS = 15; /* Check that no time accurate local time stepping is specified for time integration schemes other than ADER. */ if (Kind_TimeIntScheme_FEM_Flow != ADER_DG && nLevels_TimeAccurateLTS != 1) { - if (rank == MASTER_NODE) { - cout << endl - << "WARNING: " << nLevels_TimeAccurateLTS << " levels specified for time accurate local time stepping." - << endl + + if (rank==MASTER_NODE) { + cout << endl << "WARNING: " + << nLevels_TimeAccurateLTS << " levels specified for time accurate local time stepping." << endl << "Time accurate local time stepping is only possible for ADER, hence this option is not used." << endl << endl; } @@ -4994,13 +4649,15 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i } if (Kind_TimeIntScheme_FEM_Flow == ADER_DG) { + TimeMarching = TIME_MARCHING::TIME_STEPPING; // Only time stepping for ADER. /* If time accurate local time stepping is used, make sure that an unsteady CFL is specified. If not, terminate. */ if (nLevels_TimeAccurateLTS != 1) { - if (Unst_CFL == 0.0) - SU2_MPI::Error("ERROR: Unsteady CFL not specified for time accurate local time stepping.", CURRENT_FUNCTION); + if(Unst_CFL == 0.0) + SU2_MPI::Error("ERROR: Unsteady CFL not specified for time accurate local time stepping.", + CURRENT_FUNCTION); } /* Determine the location of the ADER time DOFs, which are the Gauss-Legendre @@ -5010,86 +4667,75 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i GaussJacobi.GetQuadraturePoints(0.0, 0.0, -1.0, 1.0, GLPoints, GLWeights); TimeDOFsADER_DG = new su2double[nTimeDOFsADER_DG]; - for (unsigned short i = 0; i < nTimeDOFsADER_DG; ++i) TimeDOFsADER_DG[i] = GLPoints[i]; + for(unsigned short i=0; i 1) { + else if (top_optim_nKernelParams==1 && top_optim_nKernel>1) { su2double tmp = top_optim_kernel_params[0]; - delete[] top_optim_kernel_params; + delete [] top_optim_kernel_params; top_optim_nKernelParams = top_optim_nKernel; - top_optim_kernel_params = new su2double[top_optim_nKernel]; - for (unsigned short i = 0; i < top_optim_nKernel; ++i) top_optim_kernel_params[i] = tmp; + top_optim_kernel_params = new su2double [top_optim_nKernel]; + for (unsigned short i=0; i 1) { + else if (top_optim_nRadius==1 && top_optim_nKernel>1) { su2double tmp = top_optim_filter_radius[0]; - delete[] top_optim_filter_radius; + delete [] top_optim_filter_radius; top_optim_nRadius = top_optim_nKernel; - top_optim_filter_radius = new su2double[top_optim_nKernel]; - for (unsigned short i = 0; i < top_optim_nKernel; ++i) top_optim_filter_radius[i] = tmp; + top_optim_filter_radius = new su2double [top_optim_nKernel]; + for (unsigned short i=0; i 1) { - SU2_MPI::Error( - "SURFACE_SPECIES_0 and SURFACE_SPECIES_VARIANCE currently can only handle one entry to MARKER_ANALYZE.", - CURRENT_FUNCTION); + SU2_MPI::Error("SURFACE_SPECIES_0 and SURFACE_SPECIES_VARIANCE currently can only handle one entry to MARKER_ANALYZE.", CURRENT_FUNCTION); } } - if (Kind_TimeIntScheme_Species != EULER_IMPLICIT && Kind_TimeIntScheme_Species != EULER_EXPLICIT) { - SU2_MPI::Error( - "Only TIME_DISCRE_TURB = EULER_IMPLICIT, EULER_EXPLICIT have been implemented in the scalar solver.", - CURRENT_FUNCTION); + if(Kind_TimeIntScheme_Species != EULER_IMPLICIT && + Kind_TimeIntScheme_Species != EULER_EXPLICIT){ + SU2_MPI::Error("Only TIME_DISCRE_TURB = EULER_IMPLICIT, EULER_EXPLICIT have been implemented in the scalar solver.", CURRENT_FUNCTION); } /*--- If Species clipping is on, make sure bounds are given by the user. ---*/ if (Species_Clipping) if (!(OptionIsSet("SPECIES_CLIPPING_MIN") && OptionIsSet("SPECIES_CLIPPING_MAX"))) - SU2_MPI::Error( - "SPECIES_CLIPPING= YES requires the options SPECIES_CLIPPING_MIN/MAX to set the clipping values.", - CURRENT_FUNCTION); + SU2_MPI::Error("SPECIES_CLIPPING= YES requires the options SPECIES_CLIPPING_MIN/MAX to set the clipping values.", CURRENT_FUNCTION); /*--- Make sure a Diffusivity has been set for Constant Diffusivity. ---*/ - if (Kind_Diffusivity_Model == DIFFUSIVITYMODEL::CONSTANT_DIFFUSIVITY && !(OptionIsSet("DIFFUSIVITY_CONSTANT"))) - SU2_MPI::Error("A DIFFUSIVITY_CONSTANT= has to be set with DIFFUSIVITY_MODEL= CONSTANT_DIFFUSIVITY.", - CURRENT_FUNCTION); + if (Kind_Diffusivity_Model == DIFFUSIVITYMODEL::CONSTANT_DIFFUSIVITY && + !(OptionIsSet("DIFFUSIVITY_CONSTANT"))) + SU2_MPI::Error("A DIFFUSIVITY_CONSTANT= has to be set with DIFFUSIVITY_MODEL= CONSTANT_DIFFUSIVITY.", CURRENT_FUNCTION); /*--- Check whether the number of entries of the constant Lewis number equals the number of transported scalar equations solved. nConstant_Lewis_Number is used because it is required for the diffusivity fluid mixing @@ -5841,7 +5439,8 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i nSpecies_options.push_back(nSpecies_Init); if (Species_Clipping) nSpecies_options.insert(nSpecies_options.end(), {nSpecies_Clipping_Min, nSpecies_Clipping_Max}); - if (nMarker_Inlet_Species > 0) nSpecies_options.push_back(nSpecies_per_Inlet); + if (nMarker_Inlet_Species > 0) + nSpecies_options.push_back(nSpecies_per_Inlet); // Add more options for size check here. /*--- nSpecies_Init is the master, but it simply checks for consistency. ---*/ @@ -5852,8 +5451,7 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i /*--- Once consistency is checked set the var that is used throughout the code. ---*/ nSpecies = nSpecies_Init; - /*--- Check whether some variables (or their sums) are in physical bounds. [0,1] for species related quantities. - * ---*/ + /*--- Check whether some variables (or their sums) are in physical bounds. [0,1] for species related quantities. ---*/ /*--- Note, only for species transport, not for flamelet model ---*/ if (Kind_Species_Model == SPECIES_MODEL::SPECIES_TRANSPORT) { su2double Species_Init_Sum = 0.0; @@ -5873,15 +5471,14 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i } } - } // species transport checks + } // species transport checks /*--- Define some variables for flamelet model. ---*/ if (Kind_Species_Model == SPECIES_MODEL::FLAMELET) { /*--- The controlling variables are progress variable, total enthalpy, and optionally mixture fraction ---*/ - // n_control_vars = nSpecies - n_user_scalars; + //n_control_vars = nSpecies - n_user_scalars; if (n_control_vars != (nSpecies - n_user_scalars)) - SU2_MPI::Error("Number of initial species incompatbile with number of controlling variables and user scalars.", - CURRENT_FUNCTION); + SU2_MPI::Error("Number of initial species incompatbile with number of controlling variables and user scalars.", CURRENT_FUNCTION); /*--- We can have additional user defined transported scalars ---*/ n_scalars = n_control_vars + n_user_scalars; } @@ -5892,32 +5489,40 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i } void CConfig::SetMarkers(SU2_COMPONENT val_software) { - unsigned short iMarker_All, iMarker_CfgFile, iMarker_Euler, iMarker_Custom, iMarker_FarField, iMarker_SymWall, - iMarker_PerBound, iMarker_NearFieldBound, iMarker_Fluid_InterfaceBound, iMarker_Inlet, iMarker_Riemann, - iMarker_Giles, iMarker_Outlet, iMarker_Smoluchowski_Maxwell, iMarker_Isothermal, iMarker_HeatFlux, - iMarker_HeatTansfer, iMarker_EngineInflow, iMarker_EngineExhaust, iMarker_Damper, iMarker_Displacement, - iMarker_Load, iMarker_Internal, iMarker_Monitoring, iMarker_Designing, iMarker_GeoEval, iMarker_Plotting, - iMarker_Analyze, iMarker_DV, iMarker_Moving, iMarker_SobolevBC, iMarker_PyCustom, iMarker_Supersonic_Inlet, - iMarker_Supersonic_Outlet, iMarker_Clamped, iMarker_ZoneInterface, iMarker_CHTInterface, iMarker_Load_Dir, - iMarker_Disp_Dir, iMarker_Fluid_Load, iMarker_Deform_Mesh, iMarker_Deform_Mesh_Sym_Plane, iMarker_ActDiskInlet, - iMarker_ActDiskOutlet, iMarker_Turbomachinery, iMarker_MixingPlaneInterface; + + unsigned short iMarker_All, iMarker_CfgFile, iMarker_Euler, iMarker_Custom, + iMarker_FarField, iMarker_SymWall, iMarker_PerBound, + iMarker_NearFieldBound, iMarker_Fluid_InterfaceBound, + iMarker_Inlet, iMarker_Riemann, iMarker_Giles, iMarker_Outlet, + iMarker_Smoluchowski_Maxwell, + iMarker_Isothermal,iMarker_HeatFlux,iMarker_HeatTansfer, + iMarker_EngineInflow, iMarker_EngineExhaust, iMarker_Damper, + iMarker_Displacement, iMarker_Load, iMarker_Internal, + iMarker_Monitoring, iMarker_Designing, iMarker_GeoEval, iMarker_Plotting, iMarker_Analyze, + iMarker_DV, iMarker_Moving, iMarker_SobolevBC, iMarker_PyCustom, iMarker_Supersonic_Inlet, iMarker_Supersonic_Outlet, + iMarker_Clamped, iMarker_ZoneInterface, iMarker_CHTInterface, iMarker_Load_Dir, iMarker_Disp_Dir, + iMarker_Fluid_Load, iMarker_Deform_Mesh, iMarker_Deform_Mesh_Sym_Plane, + iMarker_ActDiskInlet, iMarker_ActDiskOutlet, + iMarker_Turbomachinery, iMarker_MixingPlaneInterface; int size = SINGLE_NODE; SU2_MPI::Comm_size(SU2_MPI::GetComm(), &size); /*--- Compute the total number of markers in the config file ---*/ - nMarker_CfgFile = nMarker_Euler + nMarker_FarField + nMarker_SymWall + nMarker_PerBound + nMarker_NearFieldBound + - nMarker_Fluid_InterfaceBound + nMarker_CHTInterface + nMarker_Inlet + nMarker_Riemann + - nMarker_Smoluchowski_Maxwell + nMarker_Giles + nMarker_Outlet + nMarker_Isothermal + - nMarker_HeatFlux + nMarker_HeatTransfer + nMarker_EngineInflow + nMarker_EngineExhaust + - nMarker_Internal + nMarker_Supersonic_Inlet + nMarker_Supersonic_Outlet + nMarker_Displacement + - nMarker_Load + nMarker_Custom + nMarker_Damper + nMarker_Fluid_Load + nMarker_Clamped + - nMarker_Load_Dir + nMarker_Disp_Dir + nMarker_ActDiskInlet + nMarker_ActDiskOutlet + - nMarker_ZoneInterface; + nMarker_CfgFile = nMarker_Euler + nMarker_FarField + nMarker_SymWall + + nMarker_PerBound + nMarker_NearFieldBound + nMarker_Fluid_InterfaceBound + + nMarker_CHTInterface + nMarker_Inlet + nMarker_Riemann + nMarker_Smoluchowski_Maxwell + + nMarker_Giles + nMarker_Outlet + nMarker_Isothermal + + nMarker_HeatFlux + nMarker_HeatTransfer + + nMarker_EngineInflow + nMarker_EngineExhaust + nMarker_Internal + + nMarker_Supersonic_Inlet + nMarker_Supersonic_Outlet + nMarker_Displacement + nMarker_Load + + nMarker_Custom + nMarker_Damper + nMarker_Fluid_Load + + nMarker_Clamped + nMarker_Load_Dir + nMarker_Disp_Dir + + nMarker_ActDiskInlet + nMarker_ActDiskOutlet + nMarker_ZoneInterface; /*--- Add the possible send/receive domains ---*/ - nMarker_Max = nMarker_CfgFile + OVERHEAD * size; + nMarker_Max = nMarker_CfgFile + OVERHEAD*size; /*--- Basic dimensionalization of the markers (worst scenario) ---*/ @@ -5925,33 +5530,26 @@ void CConfig::SetMarkers(SU2_COMPONENT val_software) { /*--- Allocate the memory (markers in each domain) ---*/ - Marker_All_TagBound = new string[nMarker_All]; // Store the tag that correspond with each marker. - Marker_All_SendRecv = new short[nMarker_All](); // +#domain (send), -#domain (receive). - Marker_All_KindBC = new unsigned short[nMarker_All](); // Store the kind of boundary condition. - Marker_All_Monitoring = new unsigned short[nMarker_All](); // Store whether the boundary should be monitored. - Marker_All_Designing = new unsigned short[nMarker_All](); // Store whether the boundary should be designed. - Marker_All_Plotting = new unsigned short[nMarker_All](); // Store whether the boundary should be plotted. - Marker_All_Analyze = new unsigned short[nMarker_All](); // Store whether the boundary should be plotted. - Marker_All_ZoneInterface = new unsigned short[nMarker_All](); // Store whether the boundary is in the FSI interface. - Marker_All_GeoEval = new unsigned short[nMarker_All](); // Store whether the boundary should be geometry evaluation. - Marker_All_DV = - new unsigned short[nMarker_All](); // Store whether the boundary should be affected by design variables. - Marker_All_Moving = new unsigned short[nMarker_All](); // Store whether the boundary should be in motion. - Marker_All_Deform_Mesh = new unsigned short[nMarker_All](); // Store whether the boundary is deformable. - Marker_All_Deform_Mesh_Sym_Plane = - new unsigned short[nMarker_All](); // Store wheter the boundary will follow the deformation - Marker_All_Fluid_Load = - new unsigned short[nMarker_All](); // Store whether the boundary computes/applies fluid loads. - Marker_All_PyCustom = new unsigned short[nMarker_All](); // Store whether the boundary is Python customizable. - Marker_All_PerBound = new short[nMarker_All](); // Store whether the boundary belongs to a periodic boundary. - Marker_All_Turbomachinery = - new unsigned short[nMarker_All](); // Store whether the boundary is in needed for Turbomachinery computations. - Marker_All_TurbomachineryFlag = - new unsigned short[nMarker_All](); // Store whether the boundary has a flag for Turbomachinery computations. - Marker_All_MixingPlaneInterface = - new unsigned short[nMarker_All](); // Store whether the boundary has a in the MixingPlane interface. - Marker_All_SobolevBC = - new unsigned short[nMarker_All](); // Store wether the boundary should apply to the gradient smoothing. + Marker_All_TagBound = new string[nMarker_All]; // Store the tag that correspond with each marker. + Marker_All_SendRecv = new short[nMarker_All] (); // +#domain (send), -#domain (receive). + Marker_All_KindBC = new unsigned short[nMarker_All] (); // Store the kind of boundary condition. + Marker_All_Monitoring = new unsigned short[nMarker_All] (); // Store whether the boundary should be monitored. + Marker_All_Designing = new unsigned short[nMarker_All] (); // Store whether the boundary should be designed. + Marker_All_Plotting = new unsigned short[nMarker_All] (); // Store whether the boundary should be plotted. + Marker_All_Analyze = new unsigned short[nMarker_All] (); // Store whether the boundary should be plotted. + Marker_All_ZoneInterface = new unsigned short[nMarker_All] (); // Store whether the boundary is in the FSI interface. + Marker_All_GeoEval = new unsigned short[nMarker_All] (); // Store whether the boundary should be geometry evaluation. + Marker_All_DV = new unsigned short[nMarker_All] (); // Store whether the boundary should be affected by design variables. + Marker_All_Moving = new unsigned short[nMarker_All] (); // Store whether the boundary should be in motion. + Marker_All_Deform_Mesh = new unsigned short[nMarker_All] (); // Store whether the boundary is deformable. + Marker_All_Deform_Mesh_Sym_Plane = new unsigned short[nMarker_All] (); //Store wheter the boundary will follow the deformation + Marker_All_Fluid_Load = new unsigned short[nMarker_All] (); // Store whether the boundary computes/applies fluid loads. + Marker_All_PyCustom = new unsigned short[nMarker_All] (); // Store whether the boundary is Python customizable. + Marker_All_PerBound = new short[nMarker_All] (); // Store whether the boundary belongs to a periodic boundary. + Marker_All_Turbomachinery = new unsigned short[nMarker_All] (); // Store whether the boundary is in needed for Turbomachinery computations. + Marker_All_TurbomachineryFlag = new unsigned short[nMarker_All] (); // Store whether the boundary has a flag for Turbomachinery computations. + Marker_All_MixingPlaneInterface = new unsigned short[nMarker_All] (); // Store whether the boundary has a in the MixingPlane interface. + Marker_All_SobolevBC = new unsigned short[nMarker_All] (); // Store wether the boundary should apply to the gradient smoothing. for (iMarker_All = 0; iMarker_All < nMarker_All; iMarker_All++) { Marker_All_TagBound[iMarker_All] = "SEND_RECEIVE"; @@ -5959,25 +5557,25 @@ void CConfig::SetMarkers(SU2_COMPONENT val_software) { /*--- Allocate the memory (markers in the config file) ---*/ - Marker_CfgFile_TagBound = new string[nMarker_CfgFile]; - Marker_CfgFile_KindBC = new unsigned short[nMarker_CfgFile](); - Marker_CfgFile_Monitoring = new unsigned short[nMarker_CfgFile](); - Marker_CfgFile_Designing = new unsigned short[nMarker_CfgFile](); - Marker_CfgFile_Plotting = new unsigned short[nMarker_CfgFile](); - Marker_CfgFile_Analyze = new unsigned short[nMarker_CfgFile](); - Marker_CfgFile_GeoEval = new unsigned short[nMarker_CfgFile](); - Marker_CfgFile_ZoneInterface = new unsigned short[nMarker_CfgFile](); - Marker_CfgFile_DV = new unsigned short[nMarker_CfgFile](); - Marker_CfgFile_Moving = new unsigned short[nMarker_CfgFile](); - Marker_CfgFile_Deform_Mesh = new unsigned short[nMarker_CfgFile](); - Marker_CfgFile_Deform_Mesh_Sym_Plane = new unsigned short[nMarker_CfgFile](); - Marker_CfgFile_Fluid_Load = new unsigned short[nMarker_CfgFile](); - Marker_CfgFile_PerBound = new unsigned short[nMarker_CfgFile](); - Marker_CfgFile_Turbomachinery = new unsigned short[nMarker_CfgFile](); - Marker_CfgFile_TurbomachineryFlag = new unsigned short[nMarker_CfgFile](); - Marker_CfgFile_MixingPlaneInterface = new unsigned short[nMarker_CfgFile](); - Marker_CfgFile_PyCustom = new unsigned short[nMarker_CfgFile](); - Marker_CfgFile_SobolevBC = new unsigned short[nMarker_CfgFile](); + Marker_CfgFile_TagBound = new string[nMarker_CfgFile]; + Marker_CfgFile_KindBC = new unsigned short[nMarker_CfgFile] (); + Marker_CfgFile_Monitoring = new unsigned short[nMarker_CfgFile] (); + Marker_CfgFile_Designing = new unsigned short[nMarker_CfgFile] (); + Marker_CfgFile_Plotting = new unsigned short[nMarker_CfgFile] (); + Marker_CfgFile_Analyze = new unsigned short[nMarker_CfgFile] (); + Marker_CfgFile_GeoEval = new unsigned short[nMarker_CfgFile] (); + Marker_CfgFile_ZoneInterface = new unsigned short[nMarker_CfgFile] (); + Marker_CfgFile_DV = new unsigned short[nMarker_CfgFile] (); + Marker_CfgFile_Moving = new unsigned short[nMarker_CfgFile] (); + Marker_CfgFile_Deform_Mesh = new unsigned short[nMarker_CfgFile] (); + Marker_CfgFile_Deform_Mesh_Sym_Plane= new unsigned short[nMarker_CfgFile] (); + Marker_CfgFile_Fluid_Load = new unsigned short[nMarker_CfgFile] (); + Marker_CfgFile_PerBound = new unsigned short[nMarker_CfgFile] (); + Marker_CfgFile_Turbomachinery = new unsigned short[nMarker_CfgFile] (); + Marker_CfgFile_TurbomachineryFlag = new unsigned short[nMarker_CfgFile] (); + Marker_CfgFile_MixingPlaneInterface = new unsigned short[nMarker_CfgFile] (); + Marker_CfgFile_PyCustom = new unsigned short[nMarker_CfgFile] (); + Marker_CfgFile_SobolevBC = new unsigned short[nMarker_CfgFile] (); for (iMarker_CfgFile = 0; iMarker_CfgFile < nMarker_CfgFile; iMarker_CfgFile++) { Marker_CfgFile_TagBound[iMarker_CfgFile] = "SEND_RECEIVE"; @@ -5985,26 +5583,26 @@ void CConfig::SetMarkers(SU2_COMPONENT val_software) { /*--- Allocate memory to store surface information (Analyze BC) ---*/ - Surface_MassFlow = new su2double[nMarker_Analyze](); - Surface_Mach = new su2double[nMarker_Analyze](); - Surface_Temperature = new su2double[nMarker_Analyze](); - Surface_Pressure = new su2double[nMarker_Analyze](); - Surface_Density = new su2double[nMarker_Analyze](); - Surface_Enthalpy = new su2double[nMarker_Analyze](); - Surface_NormalVelocity = new su2double[nMarker_Analyze](); - Surface_Uniformity = new su2double[nMarker_Analyze](); - Surface_SecondaryStrength = new su2double[nMarker_Analyze](); - Surface_SecondOverUniform = new su2double[nMarker_Analyze](); - Surface_MomentumDistortion = new su2double[nMarker_Analyze](); - Surface_TotalTemperature = new su2double[nMarker_Analyze](); - Surface_TotalPressure = new su2double[nMarker_Analyze](); - Surface_PressureDrop = new su2double[nMarker_Analyze](); - Surface_Species_0 = new su2double[nMarker_Analyze](); - Surface_Species_Variance = new su2double[nMarker_Analyze](); - Surface_DC60 = new su2double[nMarker_Analyze](); - Surface_IDC = new su2double[nMarker_Analyze](); - Surface_IDC_Mach = new su2double[nMarker_Analyze](); - Surface_IDR = new su2double[nMarker_Analyze](); + Surface_MassFlow = new su2double[nMarker_Analyze] (); + Surface_Mach = new su2double[nMarker_Analyze] (); + Surface_Temperature = new su2double[nMarker_Analyze] (); + Surface_Pressure = new su2double[nMarker_Analyze] (); + Surface_Density = new su2double[nMarker_Analyze] (); + Surface_Enthalpy = new su2double[nMarker_Analyze] (); + Surface_NormalVelocity = new su2double[nMarker_Analyze] (); + Surface_Uniformity = new su2double[nMarker_Analyze] (); + Surface_SecondaryStrength = new su2double[nMarker_Analyze] (); + Surface_SecondOverUniform = new su2double[nMarker_Analyze] (); + Surface_MomentumDistortion = new su2double[nMarker_Analyze] (); + Surface_TotalTemperature = new su2double[nMarker_Analyze] (); + Surface_TotalPressure = new su2double[nMarker_Analyze] (); + Surface_PressureDrop = new su2double[nMarker_Analyze] (); + Surface_Species_0 = new su2double[nMarker_Analyze] (); + Surface_Species_Variance = new su2double[nMarker_Analyze] (); + Surface_DC60 = new su2double[nMarker_Analyze] (); + Surface_IDC = new su2double[nMarker_Analyze] (); + Surface_IDC_Mach = new su2double[nMarker_Analyze] (); + Surface_IDR = new su2double[nMarker_Analyze] (); /*--- Populate the marker information in the config file (all domains) ---*/ @@ -6034,31 +5632,31 @@ void CConfig::SetMarkers(SU2_COMPONENT val_software) { iMarker_CfgFile++; } - ActDisk_DeltaPress = new su2double[nMarker_ActDiskInlet](); - ActDisk_DeltaTemp = new su2double[nMarker_ActDiskInlet](); - ActDisk_TotalPressRatio = new su2double[nMarker_ActDiskInlet](); - ActDisk_TotalTempRatio = new su2double[nMarker_ActDiskInlet](); - ActDisk_StaticPressRatio = new su2double[nMarker_ActDiskInlet](); - ActDisk_StaticTempRatio = new su2double[nMarker_ActDiskInlet](); - ActDisk_Power = new su2double[nMarker_ActDiskInlet](); - ActDisk_MassFlow = new su2double[nMarker_ActDiskInlet](); - ActDisk_Mach = new su2double[nMarker_ActDiskInlet](); - ActDisk_Force = new su2double[nMarker_ActDiskInlet](); - ActDisk_NetThrust = new su2double[nMarker_ActDiskInlet](); - ActDisk_BCThrust = new su2double[nMarker_ActDiskInlet](); - ActDisk_BCThrust_Old = new su2double[nMarker_ActDiskInlet](); - ActDisk_GrossThrust = new su2double[nMarker_ActDiskInlet](); - ActDisk_Area = new su2double[nMarker_ActDiskInlet](); - ActDisk_ReverseMassFlow = new su2double[nMarker_ActDiskInlet](); - - ActDiskInlet_MassFlow = new su2double[nMarker_ActDiskInlet](); - ActDiskInlet_Temperature = new su2double[nMarker_ActDiskInlet](); - ActDiskInlet_TotalTemperature = new su2double[nMarker_ActDiskInlet](); - ActDiskInlet_Pressure = new su2double[nMarker_ActDiskInlet](); - ActDiskInlet_TotalPressure = new su2double[nMarker_ActDiskInlet](); - ActDiskInlet_RamDrag = new su2double[nMarker_ActDiskInlet](); - ActDiskInlet_Force = new su2double[nMarker_ActDiskInlet](); - ActDiskInlet_Power = new su2double[nMarker_ActDiskInlet](); + ActDisk_DeltaPress = new su2double[nMarker_ActDiskInlet] (); + ActDisk_DeltaTemp = new su2double[nMarker_ActDiskInlet] (); + ActDisk_TotalPressRatio = new su2double[nMarker_ActDiskInlet] (); + ActDisk_TotalTempRatio = new su2double[nMarker_ActDiskInlet] (); + ActDisk_StaticPressRatio = new su2double[nMarker_ActDiskInlet] (); + ActDisk_StaticTempRatio = new su2double[nMarker_ActDiskInlet] (); + ActDisk_Power = new su2double[nMarker_ActDiskInlet] (); + ActDisk_MassFlow = new su2double[nMarker_ActDiskInlet] (); + ActDisk_Mach = new su2double[nMarker_ActDiskInlet] (); + ActDisk_Force = new su2double[nMarker_ActDiskInlet] (); + ActDisk_NetThrust = new su2double[nMarker_ActDiskInlet] (); + ActDisk_BCThrust = new su2double[nMarker_ActDiskInlet] (); + ActDisk_BCThrust_Old = new su2double[nMarker_ActDiskInlet] (); + ActDisk_GrossThrust = new su2double[nMarker_ActDiskInlet] (); + ActDisk_Area = new su2double[nMarker_ActDiskInlet] (); + ActDisk_ReverseMassFlow = new su2double[nMarker_ActDiskInlet] (); + + ActDiskInlet_MassFlow = new su2double[nMarker_ActDiskInlet] (); + ActDiskInlet_Temperature = new su2double[nMarker_ActDiskInlet] (); + ActDiskInlet_TotalTemperature = new su2double[nMarker_ActDiskInlet] (); + ActDiskInlet_Pressure = new su2double[nMarker_ActDiskInlet] (); + ActDiskInlet_TotalPressure = new su2double[nMarker_ActDiskInlet] (); + ActDiskInlet_RamDrag = new su2double[nMarker_ActDiskInlet] (); + ActDiskInlet_Force = new su2double[nMarker_ActDiskInlet] (); + ActDiskInlet_Power = new su2double[nMarker_ActDiskInlet] (); for (iMarker_ActDiskInlet = 0; iMarker_ActDiskInlet < nMarker_ActDiskInlet; iMarker_ActDiskInlet++) { Marker_CfgFile_TagBound[iMarker_CfgFile] = Marker_ActDiskInlet[iMarker_ActDiskInlet]; @@ -6066,14 +5664,14 @@ void CConfig::SetMarkers(SU2_COMPONENT val_software) { iMarker_CfgFile++; } - ActDiskOutlet_MassFlow = new su2double[nMarker_ActDiskOutlet](); - ActDiskOutlet_Temperature = new su2double[nMarker_ActDiskOutlet](); - ActDiskOutlet_TotalTemperature = new su2double[nMarker_ActDiskOutlet](); - ActDiskOutlet_Pressure = new su2double[nMarker_ActDiskOutlet](); - ActDiskOutlet_TotalPressure = new su2double[nMarker_ActDiskOutlet](); - ActDiskOutlet_GrossThrust = new su2double[nMarker_ActDiskOutlet](); - ActDiskOutlet_Force = new su2double[nMarker_ActDiskOutlet](); - ActDiskOutlet_Power = new su2double[nMarker_ActDiskOutlet](); + ActDiskOutlet_MassFlow = new su2double[nMarker_ActDiskOutlet] (); + ActDiskOutlet_Temperature = new su2double[nMarker_ActDiskOutlet] (); + ActDiskOutlet_TotalTemperature = new su2double[nMarker_ActDiskOutlet] (); + ActDiskOutlet_Pressure = new su2double[nMarker_ActDiskOutlet] (); + ActDiskOutlet_TotalPressure = new su2double[nMarker_ActDiskOutlet] (); + ActDiskOutlet_GrossThrust = new su2double[nMarker_ActDiskOutlet] (); + ActDiskOutlet_Force = new su2double[nMarker_ActDiskOutlet] (); + ActDiskOutlet_Power = new su2double[nMarker_ActDiskOutlet] (); for (iMarker_ActDiskOutlet = 0; iMarker_ActDiskOutlet < nMarker_ActDiskOutlet; iMarker_ActDiskOutlet++) { Marker_CfgFile_TagBound[iMarker_CfgFile] = Marker_ActDiskOutlet[iMarker_ActDiskOutlet]; @@ -6081,9 +5679,9 @@ void CConfig::SetMarkers(SU2_COMPONENT val_software) { iMarker_CfgFile++; } - Outlet_MassFlow = new su2double[nMarker_Outlet](); - Outlet_Density = new su2double[nMarker_Outlet](); - Outlet_Area = new su2double[nMarker_Outlet](); + Outlet_MassFlow = new su2double[nMarker_Outlet] (); + Outlet_Density = new su2double[nMarker_Outlet] (); + Outlet_Area = new su2double[nMarker_Outlet] (); for (iMarker_NearFieldBound = 0; iMarker_NearFieldBound < nMarker_NearFieldBound; iMarker_NearFieldBound++) { Marker_CfgFile_TagBound[iMarker_CfgFile] = Marker_NearFieldBound[iMarker_NearFieldBound]; @@ -6091,8 +5689,7 @@ void CConfig::SetMarkers(SU2_COMPONENT val_software) { iMarker_CfgFile++; } - for (iMarker_Fluid_InterfaceBound = 0; iMarker_Fluid_InterfaceBound < nMarker_Fluid_InterfaceBound; - iMarker_Fluid_InterfaceBound++) { + for (iMarker_Fluid_InterfaceBound = 0; iMarker_Fluid_InterfaceBound < nMarker_Fluid_InterfaceBound; iMarker_Fluid_InterfaceBound++) { Marker_CfgFile_TagBound[iMarker_CfgFile] = Marker_Fluid_InterfaceBound[iMarker_Fluid_InterfaceBound]; Marker_CfgFile_KindBC[iMarker_CfgFile] = FLUID_INTERFACE; iMarker_CfgFile++; @@ -6122,23 +5719,23 @@ void CConfig::SetMarkers(SU2_COMPONENT val_software) { iMarker_CfgFile++; } - Engine_Power = new su2double[nMarker_EngineInflow](); - Engine_Mach = new su2double[nMarker_EngineInflow](); - Engine_Force = new su2double[nMarker_EngineInflow](); - Engine_NetThrust = new su2double[nMarker_EngineInflow](); - Engine_GrossThrust = new su2double[nMarker_EngineInflow](); - Engine_Area = new su2double[nMarker_EngineInflow](); - - Inflow_Mach = new su2double[nMarker_EngineInflow](); - Inflow_Pressure = new su2double[nMarker_EngineInflow](); - Inflow_MassFlow = new su2double[nMarker_EngineInflow](); - Inflow_ReverseMassFlow = new su2double[nMarker_EngineInflow](); - Inflow_TotalPressure = new su2double[nMarker_EngineInflow](); - Inflow_Temperature = new su2double[nMarker_EngineInflow](); - Inflow_TotalTemperature = new su2double[nMarker_EngineInflow](); - Inflow_RamDrag = new su2double[nMarker_EngineInflow](); - Inflow_Force = new su2double[nMarker_EngineInflow](); - Inflow_Power = new su2double[nMarker_EngineInflow](); + Engine_Power = new su2double[nMarker_EngineInflow] (); + Engine_Mach = new su2double[nMarker_EngineInflow] (); + Engine_Force = new su2double[nMarker_EngineInflow] (); + Engine_NetThrust = new su2double[nMarker_EngineInflow] (); + Engine_GrossThrust = new su2double[nMarker_EngineInflow] (); + Engine_Area = new su2double[nMarker_EngineInflow] (); + + Inflow_Mach = new su2double[nMarker_EngineInflow] (); + Inflow_Pressure = new su2double[nMarker_EngineInflow] (); + Inflow_MassFlow = new su2double[nMarker_EngineInflow] (); + Inflow_ReverseMassFlow = new su2double[nMarker_EngineInflow] (); + Inflow_TotalPressure = new su2double[nMarker_EngineInflow] (); + Inflow_Temperature = new su2double[nMarker_EngineInflow] (); + Inflow_TotalTemperature = new su2double[nMarker_EngineInflow] (); + Inflow_RamDrag = new su2double[nMarker_EngineInflow] (); + Inflow_Force = new su2double[nMarker_EngineInflow] (); + Inflow_Power = new su2double[nMarker_EngineInflow] (); for (iMarker_EngineInflow = 0; iMarker_EngineInflow < nMarker_EngineInflow; iMarker_EngineInflow++) { Marker_CfgFile_TagBound[iMarker_CfgFile] = Marker_EngineInflow[iMarker_EngineInflow]; @@ -6146,14 +5743,14 @@ void CConfig::SetMarkers(SU2_COMPONENT val_software) { iMarker_CfgFile++; } - Exhaust_Pressure = new su2double[nMarker_EngineExhaust](); - Exhaust_Temperature = new su2double[nMarker_EngineExhaust](); - Exhaust_MassFlow = new su2double[nMarker_EngineExhaust](); - Exhaust_TotalPressure = new su2double[nMarker_EngineExhaust](); - Exhaust_TotalTemperature = new su2double[nMarker_EngineExhaust](); - Exhaust_GrossThrust = new su2double[nMarker_EngineExhaust](); - Exhaust_Force = new su2double[nMarker_EngineExhaust](); - Exhaust_Power = new su2double[nMarker_EngineExhaust](); + Exhaust_Pressure = new su2double[nMarker_EngineExhaust] (); + Exhaust_Temperature = new su2double[nMarker_EngineExhaust] (); + Exhaust_MassFlow = new su2double[nMarker_EngineExhaust] (); + Exhaust_TotalPressure = new su2double[nMarker_EngineExhaust] (); + Exhaust_TotalTemperature = new su2double[nMarker_EngineExhaust] (); + Exhaust_GrossThrust = new su2double[nMarker_EngineExhaust] (); + Exhaust_Force = new su2double[nMarker_EngineExhaust] (); + Exhaust_Power = new su2double[nMarker_EngineExhaust] (); for (iMarker_EngineExhaust = 0; iMarker_EngineExhaust < nMarker_EngineExhaust; iMarker_EngineExhaust++) { Marker_CfgFile_TagBound[iMarker_CfgFile] = Marker_EngineExhaust[iMarker_EngineExhaust]; @@ -6167,8 +5764,7 @@ void CConfig::SetMarkers(SU2_COMPONENT val_software) { iMarker_CfgFile++; } - for (iMarker_Supersonic_Outlet = 0; iMarker_Supersonic_Outlet < nMarker_Supersonic_Outlet; - iMarker_Supersonic_Outlet++) { + for (iMarker_Supersonic_Outlet = 0; iMarker_Supersonic_Outlet < nMarker_Supersonic_Outlet; iMarker_Supersonic_Outlet++) { Marker_CfgFile_TagBound[iMarker_CfgFile] = Marker_Supersonic_Outlet[iMarker_Supersonic_Outlet]; Marker_CfgFile_KindBC[iMarker_CfgFile] = SUPERSONIC_OUTLET; iMarker_CfgFile++; @@ -6198,8 +5794,7 @@ void CConfig::SetMarkers(SU2_COMPONENT val_software) { iMarker_CfgFile++; } - for (iMarker_Smoluchowski_Maxwell = 0; iMarker_Smoluchowski_Maxwell < nMarker_Smoluchowski_Maxwell; - iMarker_Smoluchowski_Maxwell++) { + for (iMarker_Smoluchowski_Maxwell = 0; iMarker_Smoluchowski_Maxwell < nMarker_Smoluchowski_Maxwell; iMarker_Smoluchowski_Maxwell++) { Marker_CfgFile_TagBound[iMarker_CfgFile] = Marker_Smoluchowski_Maxwell[iMarker_Smoluchowski_Maxwell]; Marker_CfgFile_KindBC[iMarker_CfgFile] = SMOLUCHOWSKI_MAXWELL; iMarker_CfgFile++; @@ -6305,17 +5900,17 @@ void CConfig::SetMarkers(SU2_COMPONENT val_software) { /*--- Identification of Turbomachinery markers and flag them---*/ for (iMarker_CfgFile = 0; iMarker_CfgFile < nMarker_CfgFile; iMarker_CfgFile++) { - unsigned short indexMarker = 0; + unsigned short indexMarker=0; Marker_CfgFile_Turbomachinery[iMarker_CfgFile] = NO; Marker_CfgFile_TurbomachineryFlag[iMarker_CfgFile] = NO; - for (iMarker_Turbomachinery = 0; iMarker_Turbomachinery < nMarker_Turbomachinery; iMarker_Turbomachinery++) { - if (Marker_CfgFile_TagBound[iMarker_CfgFile] == Marker_TurboBoundIn[iMarker_Turbomachinery]) { - indexMarker = (iMarker_Turbomachinery + 1); + for (iMarker_Turbomachinery = 0; iMarker_Turbomachinery < nMarker_Turbomachinery; iMarker_Turbomachinery++){ + if (Marker_CfgFile_TagBound[iMarker_CfgFile] == Marker_TurboBoundIn[iMarker_Turbomachinery]){ + indexMarker=(iMarker_Turbomachinery+1); Marker_CfgFile_Turbomachinery[iMarker_CfgFile] = indexMarker; Marker_CfgFile_TurbomachineryFlag[iMarker_CfgFile] = INFLOW; } - if (Marker_CfgFile_TagBound[iMarker_CfgFile] == Marker_TurboBoundOut[iMarker_Turbomachinery]) { - indexMarker = (iMarker_Turbomachinery + 1); + if (Marker_CfgFile_TagBound[iMarker_CfgFile] == Marker_TurboBoundOut[iMarker_Turbomachinery]){ + indexMarker=(iMarker_Turbomachinery+1); Marker_CfgFile_Turbomachinery[iMarker_CfgFile] = indexMarker; Marker_CfgFile_TurbomachineryFlag[iMarker_CfgFile] = OUTFLOW; } @@ -6325,19 +5920,19 @@ void CConfig::SetMarkers(SU2_COMPONENT val_software) { /*--- Identification of MixingPlane interface markers ---*/ for (iMarker_CfgFile = 0; iMarker_CfgFile < nMarker_CfgFile; iMarker_CfgFile++) { - unsigned short indexMarker = 0; + unsigned short indexMarker=0; Marker_CfgFile_MixingPlaneInterface[iMarker_CfgFile] = NO; - for (iMarker_MixingPlaneInterface = 0; iMarker_MixingPlaneInterface < nMarker_MixingPlaneInterface; - iMarker_MixingPlaneInterface++) + for (iMarker_MixingPlaneInterface = 0; iMarker_MixingPlaneInterface < nMarker_MixingPlaneInterface; iMarker_MixingPlaneInterface++) if (Marker_CfgFile_TagBound[iMarker_CfgFile] == Marker_MixingPlaneInterface[iMarker_MixingPlaneInterface]) - indexMarker = (int)(iMarker_MixingPlaneInterface / 2 + 1); + indexMarker=(int)(iMarker_MixingPlaneInterface/2+1); Marker_CfgFile_MixingPlaneInterface[iMarker_CfgFile] = indexMarker; } for (iMarker_CfgFile = 0; iMarker_CfgFile < nMarker_CfgFile; iMarker_CfgFile++) { Marker_CfgFile_DV[iMarker_CfgFile] = NO; for (iMarker_DV = 0; iMarker_DV < nMarker_DV; iMarker_DV++) - if (Marker_CfgFile_TagBound[iMarker_CfgFile] == Marker_DV[iMarker_DV]) Marker_CfgFile_DV[iMarker_CfgFile] = YES; + if (Marker_CfgFile_TagBound[iMarker_CfgFile] == Marker_DV[iMarker_DV]) + Marker_CfgFile_DV[iMarker_CfgFile] = YES; } /*--- Add an extra check for DV_MARKER to make sure that any given marker @@ -6352,18 +5947,15 @@ void CConfig::SetMarkers(SU2_COMPONENT val_software) { } } - if (!found) { - if (nZone == 1) - SU2_MPI::Error("DV_MARKER contains marker names that do not exist in the lists of BCs in the config file.", - CURRENT_FUNCTION); + if(!found) { + if (nZone==1) + SU2_MPI::Error("DV_MARKER contains marker names that do not exist in the lists of BCs in the config file.", CURRENT_FUNCTION); // In case of multiple zones, the markers might appear only in zonal config and not in the Master. // A loop over all zones would need to be included which is not straight forward as this can only be // checked once all zonal configs are read. else if (rank == MASTER_NODE) - cout << "Warning: DV_MARKER contains marker names that do not exist in the lists of BCs of the master config " - "file.\n" - "Make sure the marker names exist in the zonal config files" - << endl; + cout << "Warning: DV_MARKER contains marker names that do not exist in the lists of BCs of the master config file.\n" + "Make sure the marker names exist in the zonal config files" << endl; } } @@ -6383,8 +5975,7 @@ void CConfig::SetMarkers(SU2_COMPONENT val_software) { for (iMarker_CfgFile = 0; iMarker_CfgFile < nMarker_CfgFile; iMarker_CfgFile++) { Marker_CfgFile_Deform_Mesh_Sym_Plane[iMarker_CfgFile] = NO; - for (iMarker_Deform_Mesh_Sym_Plane = 0; iMarker_Deform_Mesh_Sym_Plane < nMarker_Deform_Mesh_Sym_Plane; - iMarker_Deform_Mesh_Sym_Plane++) + for (iMarker_Deform_Mesh_Sym_Plane = 0; iMarker_Deform_Mesh_Sym_Plane < nMarker_Deform_Mesh_Sym_Plane; iMarker_Deform_Mesh_Sym_Plane++) if (Marker_CfgFile_TagBound[iMarker_CfgFile] == Marker_Deform_Mesh_Sym_Plane[iMarker_Deform_Mesh_Sym_Plane]) Marker_CfgFile_Deform_Mesh_Sym_Plane[iMarker_CfgFile] = YES; } @@ -6396,9 +5987,9 @@ void CConfig::SetMarkers(SU2_COMPONENT val_software) { Marker_CfgFile_Fluid_Load[iMarker_CfgFile] = YES; } - for (iMarker_CfgFile = 0; iMarker_CfgFile < nMarker_CfgFile; iMarker_CfgFile++) { + for (iMarker_CfgFile=0; iMarker_CfgFile < nMarker_CfgFile; iMarker_CfgFile++) { Marker_CfgFile_PyCustom[iMarker_CfgFile] = NO; - for (iMarker_PyCustom = 0; iMarker_PyCustom < nMarker_PyCustom; iMarker_PyCustom++) + for(iMarker_PyCustom=0; iMarker_PyCustom < nMarker_PyCustom; iMarker_PyCustom++) if (Marker_CfgFile_TagBound[iMarker_CfgFile] == Marker_PyCustom[iMarker_PyCustom]) Marker_CfgFile_PyCustom[iMarker_CfgFile] = YES; } @@ -6409,61 +6000,58 @@ void CConfig::SetMarkers(SU2_COMPONENT val_software) { if (Marker_CfgFile_TagBound[iMarker_CfgFile] == Marker_SobolevBC[iMarker_SobolevBC]) Marker_CfgFile_SobolevBC[iMarker_CfgFile] = YES; } + } void CConfig::SetOutput(SU2_COMPONENT val_software, unsigned short val_izone) { - unsigned short iMarker_Euler, iMarker_Custom, iMarker_FarField, iMarker_SymWall, iMarker_PerBound, - iMarker_NearFieldBound, iMarker_Fluid_InterfaceBound, iMarker_Inlet, iMarker_Riemann, iMarker_Deform_Mesh, - iMarker_Deform_Mesh_Sym_Plane, iMarker_Fluid_Load, iMarker_Smoluchowski_Maxwell, iWall_Catalytic, iMarker_Giles, - iMarker_Outlet, iMarker_Isothermal, iMarker_HeatFlux, iMarker_HeatTransfer, iMarker_EngineInflow, - iMarker_EngineExhaust, iMarker_Displacement, iMarker_Damper, iMarker_Load, iMarker_Internal, iMarker_Monitoring, - iMarker_Designing, iMarker_GeoEval, iMarker_Plotting, iMarker_Analyze, iMarker_DV, iDV_Value, - iMarker_ZoneInterface, iMarker_PyCustom, iMarker_Load_Dir, iMarker_Disp_Dir, iMarker_Clamped, iMarker_Moving, - iMarker_Supersonic_Inlet, iMarker_Supersonic_Outlet, iMarker_ActDiskInlet, iMarker_Emissivity, iMarker_StrongBC, - iMarker_ActDiskOutlet, iMarker_MixingPlaneInterface, iMarker_SobolevBC; + + unsigned short iMarker_Euler, iMarker_Custom, iMarker_FarField, + iMarker_SymWall, iMarker_PerBound, iMarker_NearFieldBound, + iMarker_Fluid_InterfaceBound, iMarker_Inlet, iMarker_Riemann, + iMarker_Deform_Mesh, iMarker_Deform_Mesh_Sym_Plane, iMarker_Fluid_Load, + iMarker_Smoluchowski_Maxwell, iWall_Catalytic, + iMarker_Giles, iMarker_Outlet, iMarker_Isothermal, iMarker_HeatFlux, iMarker_HeatTransfer, + iMarker_EngineInflow, iMarker_EngineExhaust, iMarker_Displacement, iMarker_Damper, + iMarker_Load, iMarker_Internal, iMarker_Monitoring, + iMarker_Designing, iMarker_GeoEval, iMarker_Plotting, iMarker_Analyze, iMarker_DV, iDV_Value, + iMarker_ZoneInterface, iMarker_PyCustom, iMarker_Load_Dir, iMarker_Disp_Dir, iMarker_Clamped, + iMarker_Moving, iMarker_Supersonic_Inlet, iMarker_Supersonic_Outlet, iMarker_ActDiskInlet, + iMarker_Emissivity, iMarker_StrongBC, + iMarker_ActDiskOutlet, iMarker_MixingPlaneInterface, + iMarker_SobolevBC; bool fea = ((Kind_Solver == MAIN_SOLVER::FEM_ELASTICITY) || (Kind_Solver == MAIN_SOLVER::DISC_ADJ_FEM)); - cout << endl << "----------------- Physical Case Definition ( Zone " << iZone << " ) -------------------" << endl; + cout << endl <<"----------------- Physical Case Definition ( Zone " << iZone << " ) -------------------" << endl; if (val_software == SU2_COMPONENT::SU2_CFD) { - if (FSI_Problem) cout << "Fluid-Structure Interaction." << endl; + if (FSI_Problem) + cout << "Fluid-Structure Interaction." << endl; if (DiscreteAdjoint) { - cout << "Discrete Adjoint equations using Algorithmic Differentiation\n"; - cout << "based on the physical case: "; + cout <<"Discrete Adjoint equations using Algorithmic Differentiation\n"; + cout <<"based on the physical case: "; } switch (Kind_Solver) { - case MAIN_SOLVER::EULER: - case MAIN_SOLVER::DISC_ADJ_EULER: - case MAIN_SOLVER::INC_EULER: - case MAIN_SOLVER::DISC_ADJ_INC_EULER: - case MAIN_SOLVER::FEM_EULER: - case MAIN_SOLVER::DISC_ADJ_FEM_EULER: + case MAIN_SOLVER::EULER: case MAIN_SOLVER::DISC_ADJ_EULER: + case MAIN_SOLVER::INC_EULER: case MAIN_SOLVER::DISC_ADJ_INC_EULER: + case MAIN_SOLVER::FEM_EULER: case MAIN_SOLVER::DISC_ADJ_FEM_EULER: if (Kind_Regime == ENUM_REGIME::COMPRESSIBLE) cout << "Compressible Euler equations." << endl; if (Kind_Regime == ENUM_REGIME::INCOMPRESSIBLE) cout << "Incompressible Euler equations." << endl; break; - case MAIN_SOLVER::NAVIER_STOKES: - case MAIN_SOLVER::DISC_ADJ_NAVIER_STOKES: - case MAIN_SOLVER::INC_NAVIER_STOKES: - case MAIN_SOLVER::DISC_ADJ_INC_NAVIER_STOKES: - case MAIN_SOLVER::FEM_NAVIER_STOKES: - case MAIN_SOLVER::DISC_ADJ_FEM_NS: + case MAIN_SOLVER::NAVIER_STOKES: case MAIN_SOLVER::DISC_ADJ_NAVIER_STOKES: + case MAIN_SOLVER::INC_NAVIER_STOKES: case MAIN_SOLVER::DISC_ADJ_INC_NAVIER_STOKES: + case MAIN_SOLVER::FEM_NAVIER_STOKES: case MAIN_SOLVER::DISC_ADJ_FEM_NS: if (Kind_Regime == ENUM_REGIME::COMPRESSIBLE) cout << "Compressible Laminar Navier-Stokes' equations." << endl; - if (Kind_Regime == ENUM_REGIME::INCOMPRESSIBLE) - cout << "Incompressible Laminar Navier-Stokes' equations." << endl; + if (Kind_Regime == ENUM_REGIME::INCOMPRESSIBLE) cout << "Incompressible Laminar Navier-Stokes' equations." << endl; break; - case MAIN_SOLVER::RANS: - case MAIN_SOLVER::DISC_ADJ_RANS: - case MAIN_SOLVER::INC_RANS: - case MAIN_SOLVER::DISC_ADJ_INC_RANS: - case MAIN_SOLVER::FEM_RANS: - case MAIN_SOLVER::DISC_ADJ_FEM_RANS: + case MAIN_SOLVER::RANS: case MAIN_SOLVER::DISC_ADJ_RANS: + case MAIN_SOLVER::INC_RANS: case MAIN_SOLVER::DISC_ADJ_INC_RANS: + case MAIN_SOLVER::FEM_RANS: case MAIN_SOLVER::DISC_ADJ_FEM_RANS: if (Kind_Regime == ENUM_REGIME::COMPRESSIBLE) cout << "Compressible RANS equations." << endl; if (Kind_Regime == ENUM_REGIME::INCOMPRESSIBLE) cout << "Incompressible RANS equations." << endl; cout << "Turbulence model: "; switch (Kind_Turb_Model) { - case TURB_MODEL::NONE: - break; + case TURB_MODEL::NONE: break; case TURB_MODEL::SA: switch (saParsedOptions.version) { case SA_OPTIONS::NEG: @@ -6486,10 +6074,8 @@ void CConfig::SetOutput(SU2_COMPONENT val_software, unsigned short val_izone) { break; case TURB_MODEL::SST: cout << "Menter's k-omega SST"; - if (sstParsedOptions.version == SST_OPTIONS::V1994) - cout << "-1994"; - else - cout << "-2003"; + if (sstParsedOptions.version == SST_OPTIONS::V1994) cout << "-1994"; + else cout << "-2003"; if (sstParsedOptions.modified) cout << "m"; if (sstParsedOptions.sust) cout << " with sustaining terms, and"; @@ -6512,8 +6098,7 @@ void CConfig::SetOutput(SU2_COMPONENT val_software, unsigned short val_izone) { break; } switch (Kind_Trans_Model) { - case TURB_TRANS_MODEL::NONE: - break; + case TURB_TRANS_MODEL::NONE: break; case TURB_TRANS_MODEL::LM: { cout << "Transition model: Langtry and Menter's 4 equation model"; if (lmParsedOptions.LM2015) { @@ -6525,121 +6110,72 @@ void CConfig::SetOutput(SU2_COMPONENT val_software, unsigned short val_izone) { } } if (Kind_Trans_Model == TURB_TRANS_MODEL::LM) { + cout << "Correlation Functions: "; switch (lmParsedOptions.Correlation) { - case TURB_TRANS_CORRELATION::MALAN: - cout << "Malan et al. (2009)" << endl; - break; - case TURB_TRANS_CORRELATION::SULUKSNA: - cout << "Suluksna et al. (2009)" << endl; - break; - case TURB_TRANS_CORRELATION::KRAUSE: - cout << "Krause et al. (2008)" << endl; - break; - case TURB_TRANS_CORRELATION::KRAUSE_HYPER: - cout << "Krause et al. (2008, paper)" << endl; - break; - case TURB_TRANS_CORRELATION::MEDIDA_BAEDER: - cout << "Medida and Baeder (2011)" << endl; - break; - case TURB_TRANS_CORRELATION::MEDIDA: - cout << "Medida PhD (2014)" << endl; - break; - case TURB_TRANS_CORRELATION::MENTER_LANGTRY: - cout << "Menter and Langtry (2009)" << endl; - break; + case TURB_TRANS_CORRELATION::MALAN: cout << "Malan et al. (2009)" << endl; break; + case TURB_TRANS_CORRELATION::SULUKSNA: cout << "Suluksna et al. (2009)" << endl; break; + case TURB_TRANS_CORRELATION::KRAUSE: cout << "Krause et al. (2008)" << endl; break; + case TURB_TRANS_CORRELATION::KRAUSE_HYPER: cout << "Krause et al. (2008, paper)" << endl; break; + case TURB_TRANS_CORRELATION::MEDIDA_BAEDER: cout << "Medida and Baeder (2011)" << endl; break; + case TURB_TRANS_CORRELATION::MEDIDA: cout << "Medida PhD (2014)" << endl; break; + case TURB_TRANS_CORRELATION::MENTER_LANGTRY: cout << "Menter and Langtry (2009)" << endl; break; case TURB_TRANS_CORRELATION::DEFAULT: switch (Kind_Turb_Model) { - case TURB_MODEL::SA: - cout << "Malan et al. (2009)" << endl; - break; - case TURB_MODEL::SST: - cout << "Menter and Langtry (2009)" << endl; - break; - case TURB_MODEL::NONE: - SU2_MPI::Error("No turbulence model has been selected but LM transition model is active.", - CURRENT_FUNCTION); - break; + case TURB_MODEL::SA: cout << "Malan et al. (2009)" << endl; break; + case TURB_MODEL::SST: cout << "Menter and Langtry (2009)" << endl; break; + case TURB_MODEL::NONE: SU2_MPI::Error("No turbulence model has been selected but LM transition model is active.", CURRENT_FUNCTION); break; } break; } } cout << "Hybrid RANS/LES: "; switch (Kind_HybridRANSLES) { - case NO_HYBRIDRANSLES: - cout << "No Hybrid RANS/LES" << endl; - break; - case SA_DES: - cout << "Detached Eddy Simulation (DES97) " << endl; - break; - case SA_DDES: - cout << "Delayed Detached Eddy Simulation (DDES) with Standard SGS" << endl; - break; - case SA_ZDES: - cout << "Delayed Detached Eddy Simulation (DDES) with Vorticity-based SGS" << endl; - break; - case SA_EDDES: - cout << "Delayed Detached Eddy Simulation (DDES) with Shear-layer Adapted SGS" << endl; - break; + case NO_HYBRIDRANSLES: cout << "No Hybrid RANS/LES" << endl; break; + case SA_DES: cout << "Detached Eddy Simulation (DES97) " << endl; break; + case SA_DDES: cout << "Delayed Detached Eddy Simulation (DDES) with Standard SGS" << endl; break; + case SA_ZDES: cout << "Delayed Detached Eddy Simulation (DDES) with Vorticity-based SGS" << endl; break; + case SA_EDDES: cout << "Delayed Detached Eddy Simulation (DDES) with Shear-layer Adapted SGS" << endl; break; } break; case MAIN_SOLVER::NEMO_EULER: - if (Kind_Regime == ENUM_REGIME::COMPRESSIBLE) - cout << "Compressible two-temperature thermochemical non-equilibrium Euler equations." << endl; - if (Kind_FluidModel == SU2_NONEQ) { + if (Kind_Regime == ENUM_REGIME::COMPRESSIBLE) cout << "Compressible two-temperature thermochemical non-equilibrium Euler equations." << endl; + if (Kind_FluidModel == SU2_NONEQ){ if ((GasModel != "N2") && (GasModel != "AIR-5") && (GasModel != "AIR-7") && (GasModel != "ARGON")) - SU2_MPI::Error( - "The GAS_MODEL given is unavailable using CSU2TCLIB. Choose one of the options: N2, AIR-5, AIR-7, or " - "ARGON.", - CURRENT_FUNCTION); + SU2_MPI::Error("The GAS_MODEL given is unavailable using CSU2TCLIB. Choose one of the options: N2, AIR-5, AIR-7, or ARGON.", CURRENT_FUNCTION); } break; case MAIN_SOLVER::NEMO_NAVIER_STOKES: - if (Kind_Regime == ENUM_REGIME::COMPRESSIBLE) - cout << "Compressible two-temperature thermochemical non-equilibrium Navier-Stokes equations." << endl; - if (Kind_FluidModel == SU2_NONEQ) { + if (Kind_Regime == ENUM_REGIME::COMPRESSIBLE) cout << "Compressible two-temperature thermochemical non-equilibrium Navier-Stokes equations." << endl; + if (Kind_FluidModel == SU2_NONEQ){ if ((GasModel != "N2") && (GasModel != "AIR-5") && (GasModel != "AIR-7") && (GasModel != "ARGON")) - SU2_MPI::Error( - "The GAS_MODEL given is unavailable using CSU2TCLIB. Choose one of the options: N2, AIR-5, AIR-7, or " - "ARGON.", - CURRENT_FUNCTION); + SU2_MPI::Error("The GAS_MODEL given is unavailable using CSU2TCLIB. Choose one of the options: N2, AIR-5, AIR-7, or ARGON.", CURRENT_FUNCTION); } break; case MAIN_SOLVER::FEM_LES: - if (Kind_Regime == ENUM_REGIME::COMPRESSIBLE) cout << "Compressible LES equations." << endl; + if (Kind_Regime == ENUM_REGIME::COMPRESSIBLE) cout << "Compressible LES equations." << endl; if (Kind_Regime == ENUM_REGIME::INCOMPRESSIBLE) cout << "Incompressible LES equations." << endl; cout << "LES Subgrid Scale model: "; switch (Kind_SGS_Model) { - case TURB_SGS_MODEL::IMPLICIT_LES: - cout << "Implicit LES" << endl; - break; - case TURB_SGS_MODEL::SMAGORINSKY: - cout << "Smagorinsky " << endl; - break; - case TURB_SGS_MODEL::WALE: - cout << "WALE" << endl; - break; - case TURB_SGS_MODEL::VREMAN: - cout << "VREMAN" << endl; - break; + case TURB_SGS_MODEL::IMPLICIT_LES: cout << "Implicit LES" << endl; break; + case TURB_SGS_MODEL::SMAGORINSKY: cout << "Smagorinsky " << endl; break; + case TURB_SGS_MODEL::WALE: cout << "WALE" << endl; break; + case TURB_SGS_MODEL::VREMAN: cout << "VREMAN" << endl; break; default: SU2_MPI::Error("Subgrid Scale model not specified.", CURRENT_FUNCTION); + } break; - case MAIN_SOLVER::FEM_ELASTICITY: - case MAIN_SOLVER::DISC_ADJ_FEM: + case MAIN_SOLVER::FEM_ELASTICITY: case MAIN_SOLVER::DISC_ADJ_FEM: if (Kind_Struct_Solver == STRUCT_DEFORMATION::SMALL) cout << "Geometrically linear elasticity solver." << endl; - if (Kind_Struct_Solver == STRUCT_DEFORMATION::LARGE) - cout << "Geometrically non-linear elasticity solver." << endl; + if (Kind_Struct_Solver == STRUCT_DEFORMATION::LARGE) cout << "Geometrically non-linear elasticity solver." << endl; if (Kind_Material == STRUCT_MODEL::LINEAR_ELASTIC) cout << "Linear elastic material." << endl; if (Kind_Material == STRUCT_MODEL::NEO_HOOKEAN) { if (Kind_Material_Compress == STRUCT_COMPRESS::COMPRESSIBLE) cout << "Compressible Neo-Hookean material model." << endl; } break; - case MAIN_SOLVER::ADJ_EULER: - cout << "Continuous Euler adjoint equations." << endl; - break; + case MAIN_SOLVER::ADJ_EULER: cout << "Continuous Euler adjoint equations." << endl; break; case MAIN_SOLVER::ADJ_NAVIER_STOKES: if (Frozen_Visc_Cont) cout << "Continuous Navier-Stokes adjoint equations with frozen (laminar) viscosity." << endl; @@ -6652,8 +6188,7 @@ void CConfig::SetOutput(SU2_COMPONENT val_software, unsigned short val_izone) { else cout << "Continuous RANS adjoint equations." << endl; break; - case MAIN_SOLVER::HEAT_EQUATION: - case MAIN_SOLVER::DISC_ADJ_HEAT: + case MAIN_SOLVER::HEAT_EQUATION: case MAIN_SOLVER::DISC_ADJ_HEAT: cout << "Heat solver" << endl; break; case MAIN_SOLVER::MULTIPHYSICS: @@ -6661,138 +6196,100 @@ void CConfig::SetOutput(SU2_COMPONENT val_software, unsigned short val_izone) { break; default: SU2_MPI::Error("No valid solver was chosen", CURRENT_FUNCTION); + } if ((Kind_Regime == ENUM_REGIME::COMPRESSIBLE) && (Kind_Solver != MAIN_SOLVER::FEM_ELASTICITY)) { - cout << "Mach number: " << Mach << "." << endl; - cout << "Angle of attack (AoA): " << AoA << " deg, and angle of sideslip (AoS): " << AoS << " deg." << endl; + cout << "Mach number: " << Mach <<"."<< endl; + cout << "Angle of attack (AoA): " << AoA <<" deg, and angle of sideslip (AoS): " << AoS <<" deg."<< endl; if ((Kind_Solver == MAIN_SOLVER::NAVIER_STOKES) || (Kind_Solver == MAIN_SOLVER::ADJ_NAVIER_STOKES) || (Kind_Solver == MAIN_SOLVER::RANS) || (Kind_Solver == MAIN_SOLVER::ADJ_RANS) || (Kind_Solver == MAIN_SOLVER::NEMO_NAVIER_STOKES)) - cout << "Reynolds number: " << Reynolds << ". Reference length " << Length_Reynolds << "." << endl; + cout << "Reynolds number: " << Reynolds <<". Reference length " << Length_Reynolds << "." << endl; if (Fixed_CL_Mode) { cout << "Fixed CL mode, target value: " << Target_CL << "." << endl; } } if (EquivArea) { - cout << "The equivalent area is going to be evaluated on the near-field." << endl; - cout << "The lower integration limit is " << ea_lim[0] << ", and the upper is " << ea_lim[1] << "." << endl; - cout << "The near-field is situated at " << ea_lim[2] << "." << endl; + cout <<"The equivalent area is going to be evaluated on the near-field."<< endl; + cout <<"The lower integration limit is "< 1) || (nRefOriginMoment_Y > 1) || (nRefOriginMoment_Z > 1)) { cout << "Surface(s) where the force coefficients are evaluated and \n"; cout << "their reference origin for moment computation: \n"; for (iMarker_Monitoring = 0; iMarker_Monitoring < nMarker_Monitoring; iMarker_Monitoring++) { - cout << " - " << Marker_Monitoring[iMarker_Monitoring] << " (" << RefOriginMoment_X[iMarker_Monitoring] - << ", " << RefOriginMoment_Y[iMarker_Monitoring] << ", " << RefOriginMoment_Z[iMarker_Monitoring] - << ")"; - if (iMarker_Monitoring < nMarker_Monitoring - 1) - cout << ".\n"; + cout << " - " << Marker_Monitoring[iMarker_Monitoring] << " (" << RefOriginMoment_X[iMarker_Monitoring] <<", "< value <-> param):" << endl; + + + if ((Design_Variable[iDV] != NO_DEFORMATION) && + (Design_Variable[iDV] != FFD_SETTING) && + (Design_Variable[iDV] != SCALE_GRID) && + (Design_Variable[iDV] != TRANSLATE_GRID) && + (Design_Variable[iDV] != ROTATE_GRID) && + (Design_Variable[iDV] != SURFACE_FILE)) { + + if (iDV == 0) + cout << "Design variables definition (markers <-> value <-> param):" << endl; switch (Design_Variable[iDV]) { - case FFD_CONTROL_POINT_2D: - cout << "FFD 2D (control point) <-> "; - break; - case FFD_CAMBER_2D: - cout << "FFD 2D (camber) <-> "; - break; - case FFD_THICKNESS_2D: - cout << "FFD 2D (thickness) <-> "; - break; - case HICKS_HENNE: - cout << "Hicks Henne <-> "; - break; - case SURFACE_BUMP: - cout << "Surface bump <-> "; - break; - case ANGLE_OF_ATTACK: - cout << "Angle of attack <-> "; - break; - case CST: - cout << "Kulfan parameter number (CST) <-> "; - break; - case TRANSLATION: - cout << "Translation design variable."; - break; - case SCALE: - cout << "Scale design variable."; - break; - case NACA_4DIGITS: - cout << "NACA four digits <-> "; - break; - case PARABOLIC: - cout << "Parabolic <-> "; - break; - case AIRFOIL: - cout << "Airfoil <-> "; - break; - case ROTATION: - cout << "Rotation <-> "; - break; - case FFD_CONTROL_POINT: - cout << "FFD (control point) <-> "; - break; - case FFD_NACELLE: - cout << "FFD (nacelle) <-> "; - break; - case FFD_GULL: - cout << "FFD (gull) <-> "; - break; - case FFD_TWIST: - cout << "FFD (twist) <-> "; - break; - case FFD_ROTATION: - cout << "FFD (rotation) <-> "; - break; - case FFD_CONTROL_SURFACE: - cout << "FFD (control surface) <-> "; - break; - case FFD_CAMBER: - cout << "FFD (camber) <-> "; - break; - case FFD_THICKNESS: - cout << "FFD (thickness) -> "; - break; - case FFD_ANGLE_OF_ATTACK: - cout << "FFD (angle of attack) <-> "; - break; + case FFD_CONTROL_POINT_2D: cout << "FFD 2D (control point) <-> "; break; + case FFD_CAMBER_2D: cout << "FFD 2D (camber) <-> "; break; + case FFD_THICKNESS_2D: cout << "FFD 2D (thickness) <-> "; break; + case HICKS_HENNE: cout << "Hicks Henne <-> " ; break; + case SURFACE_BUMP: cout << "Surface bump <-> " ; break; + case ANGLE_OF_ATTACK: cout << "Angle of attack <-> " ; break; + case CST: cout << "Kulfan parameter number (CST) <-> " ; break; + case TRANSLATION: cout << "Translation design variable."; break; + case SCALE: cout << "Scale design variable."; break; + case NACA_4DIGITS: cout << "NACA four digits <-> "; break; + case PARABOLIC: cout << "Parabolic <-> "; break; + case AIRFOIL: cout << "Airfoil <-> "; break; + case ROTATION: cout << "Rotation <-> "; break; + case FFD_CONTROL_POINT: cout << "FFD (control point) <-> "; break; + case FFD_NACELLE: cout << "FFD (nacelle) <-> "; break; + case FFD_GULL: cout << "FFD (gull) <-> "; break; + case FFD_TWIST: cout << "FFD (twist) <-> "; break; + case FFD_ROTATION: cout << "FFD (rotation) <-> "; break; + case FFD_CONTROL_SURFACE: cout << "FFD (control surface) <-> "; break; + case FFD_CAMBER: cout << "FFD (camber) <-> "; break; + case FFD_THICKNESS: cout << "FFD (thickness) -> "; break; + case FFD_ANGLE_OF_ATTACK: cout << "FFD (angle of attack) <-> "; break; } for (iMarker_DV = 0; iMarker_DV < nMarker_DV; iMarker_DV++) { cout << Marker_DV[iMarker_DV]; - if (iMarker_DV < nMarker_DV - 1) - cout << ", "; - else - cout << " <-> "; + if (iMarker_DV < nMarker_DV-1) cout << ", "; + else cout << " <-> "; } for (iDV_Value = 0; iDV_Value < nDV_Value[iDV]; iDV_Value++) { cout << DV_Value[iDV][iDV_Value]; - if (iDV_Value != nDV_Value[iDV] - 1) cout << ", "; + if (iDV_Value != nDV_Value[iDV]-1) cout << ", "; } cout << " <-> "; - if ((Design_Variable[iDV] == NO_DEFORMATION) || (Design_Variable[iDV] == FFD_SETTING) || - (Design_Variable[iDV] == SCALE)) - nParamDV = 0; + if ((Design_Variable[iDV] == NO_DEFORMATION) || + (Design_Variable[iDV] == FFD_SETTING) || + (Design_Variable[iDV] == SCALE) ) nParamDV = 0; if (Design_Variable[iDV] == ANGLE_OF_ATTACK) nParamDV = 1; - if ((Design_Variable[iDV] == FFD_CAMBER_2D) || (Design_Variable[iDV] == FFD_THICKNESS_2D) || - (Design_Variable[iDV] == HICKS_HENNE) || (Design_Variable[iDV] == PARABOLIC) || - (Design_Variable[iDV] == AIRFOIL) || (Design_Variable[iDV] == FFD_GULL) || - (Design_Variable[iDV] == FFD_ANGLE_OF_ATTACK)) - nParamDV = 2; - if ((Design_Variable[iDV] == TRANSLATION) || (Design_Variable[iDV] == NACA_4DIGITS) || - (Design_Variable[iDV] == CST) || (Design_Variable[iDV] == SURFACE_BUMP) || - (Design_Variable[iDV] == FFD_CAMBER) || (Design_Variable[iDV] == FFD_THICKNESS)) - nParamDV = 3; + if ((Design_Variable[iDV] == FFD_CAMBER_2D) || + (Design_Variable[iDV] == FFD_THICKNESS_2D) || + (Design_Variable[iDV] == HICKS_HENNE) || + (Design_Variable[iDV] == PARABOLIC) || + (Design_Variable[iDV] == AIRFOIL) || + (Design_Variable[iDV] == FFD_GULL) || + (Design_Variable[iDV] == FFD_ANGLE_OF_ATTACK) ) nParamDV = 2; + if ((Design_Variable[iDV] == TRANSLATION) || + (Design_Variable[iDV] == NACA_4DIGITS) || + (Design_Variable[iDV] == CST) || + (Design_Variable[iDV] == SURFACE_BUMP) || + (Design_Variable[iDV] == FFD_CAMBER) || + (Design_Variable[iDV] == FFD_THICKNESS) ) nParamDV = 3; if (Design_Variable[iDV] == FFD_CONTROL_POINT_2D) nParamDV = 5; if (Design_Variable[iDV] == ROTATION) nParamDV = 6; - if ((Design_Variable[iDV] == FFD_CONTROL_POINT) || (Design_Variable[iDV] == FFD_ROTATION) || - (Design_Variable[iDV] == FFD_CONTROL_SURFACE)) - nParamDV = 7; + if ((Design_Variable[iDV] == FFD_CONTROL_POINT) || + (Design_Variable[iDV] == FFD_ROTATION) || + (Design_Variable[iDV] == FFD_CONTROL_SURFACE) ) nParamDV = 7; if (Design_Variable[iDV] == FFD_TWIST) nParamDV = 8; for (unsigned short iParamDV = 0; iParamDV < nParamDV; iParamDV++) { + if (iParamDV == 0) cout << "( "; if ((iParamDV == 0) && - ((Design_Variable[iDV] == NO_DEFORMATION) || (Design_Variable[iDV] == FFD_SETTING) || - (Design_Variable[iDV] == FFD_ANGLE_OF_ATTACK) || (Design_Variable[iDV] == FFD_CONTROL_POINT_2D) || - (Design_Variable[iDV] == FFD_CAMBER_2D) || (Design_Variable[iDV] == FFD_THICKNESS_2D) || - (Design_Variable[iDV] == FFD_CONTROL_POINT) || (Design_Variable[iDV] == FFD_NACELLE) || - (Design_Variable[iDV] == FFD_GULL) || (Design_Variable[iDV] == FFD_TWIST) || - (Design_Variable[iDV] == FFD_ROTATION) || (Design_Variable[iDV] == FFD_CONTROL_SURFACE) || - (Design_Variable[iDV] == FFD_CAMBER) || (Design_Variable[iDV] == FFD_THICKNESS))) - cout << FFDTag[iDV]; - else - cout << ParamDV[iDV][iParamDV]; + ((Design_Variable[iDV] == NO_DEFORMATION) || + (Design_Variable[iDV] == FFD_SETTING) || + (Design_Variable[iDV] == FFD_ANGLE_OF_ATTACK) || + (Design_Variable[iDV] == FFD_CONTROL_POINT_2D) || + (Design_Variable[iDV] == FFD_CAMBER_2D) || + (Design_Variable[iDV] == FFD_THICKNESS_2D) || + (Design_Variable[iDV] == FFD_CONTROL_POINT) || + (Design_Variable[iDV] == FFD_NACELLE) || + (Design_Variable[iDV] == FFD_GULL) || + (Design_Variable[iDV] == FFD_TWIST) || + (Design_Variable[iDV] == FFD_ROTATION) || + (Design_Variable[iDV] == FFD_CONTROL_SURFACE) || + (Design_Variable[iDV] == FFD_CAMBER) || + (Design_Variable[iDV] == FFD_THICKNESS))) cout << FFDTag[iDV]; + else cout << ParamDV[iDV][iParamDV]; + + if (iParamDV < nParamDV-1) cout << ", "; + else cout <<" )"<< endl; - if (iParamDV < nParamDV - 1) - cout << ", "; - else - cout << " )" << endl; } } @@ -7071,19 +6523,19 @@ void CConfig::SetOutput(SU2_COMPONENT val_software, unsigned short val_izone) { } else if (Design_Variable[iDV] == FFD_SETTING) { + cout << "Setting the FFD box structure." << endl; cout << "FFD boxes definition (FFD tag <-> degree <-> coord):" << endl; for (unsigned short iFFDBox = 0; iFFDBox < nFFDBox; iFFDBox++) { + cout << TagFFDBox[iFFDBox] << " <-> "; for (unsigned short iDegreeFFD = 0; iDegreeFFD < 3; iDegreeFFD++) { if (iDegreeFFD == 0) cout << "( "; cout << DegreeFFDBox[iFFDBox][iDegreeFFD]; - if (iDegreeFFD < 2) - cout << ", "; - else - cout << " )"; + if (iDegreeFFD < 2) cout << ", "; + else cout <<" )"; } cout << " <-> "; @@ -7091,148 +6543,78 @@ void CConfig::SetOutput(SU2_COMPONENT val_software, unsigned short val_izone) { for (unsigned short iCoordFFD = 0; iCoordFFD < 24; iCoordFFD++) { if (iCoordFFD == 0) cout << "( "; cout << CoordFFDBox[iFFDBox][iCoordFFD]; - if (iCoordFFD < 23) - cout << ", "; - else - cout << " )" << endl; + if (iCoordFFD < 23) cout << ", "; + else cout <<" )"<< endl; } + } } - else - cout << endl; + else cout << endl; + } } - if (((val_software == SU2_COMPONENT::SU2_CFD) && (ContinuousAdjoint || DiscreteAdjoint)) || - (val_software == SU2_COMPONENT::SU2_DOT)) { - cout << endl << "---------------- Design problem definition ( Zone " << iZone << " ) ------------------" << endl; - if (nObj == 1) { + if (((val_software == SU2_COMPONENT::SU2_CFD) && ( ContinuousAdjoint || DiscreteAdjoint)) || (val_software == SU2_COMPONENT::SU2_DOT)) { + + cout << endl <<"---------------- Design problem definition ( Zone " << iZone << " ) ------------------" << endl; + if (nObj==1) { switch (Kind_ObjFunc[0]) { - case DRAG_COEFFICIENT: - cout << "CD objective function"; - if (Fixed_CL_Mode) { - cout << " using fixed CL mode, dCD/dCL = " << dCD_dCL << "." << endl; - } else { - cout << "." << endl; - } - break; - case LIFT_COEFFICIENT: - cout << "CL objective function." << endl; - break; - case MOMENT_X_COEFFICIENT: - cout << "CMx objective function" << endl; - if (Fixed_CL_Mode) { - cout << " using fixed CL mode, dCMx/dCL = " << dCMx_dCL << "." << endl; - } else { - cout << "." << endl; - } - break; - case MOMENT_Y_COEFFICIENT: - cout << "CMy objective function" << endl; - if (Fixed_CL_Mode) { - cout << " using fixed CL mode, dCMy/dCL = " << dCMy_dCL << "." << endl; - } else { - cout << "." << endl; - } - break; - case MOMENT_Z_COEFFICIENT: - cout << "CMz objective function" << endl; - if (Fixed_CL_Mode) { - cout << " using fixed CL mode, dCMz/dCL = " << dCMz_dCL << "." << endl; - } else { - cout << "." << endl; - } - break; - case INVERSE_DESIGN_PRESSURE: - cout << "Inverse design (Cp) objective function." << endl; - break; - case INVERSE_DESIGN_HEATFLUX: - cout << "Inverse design (Heat Flux) objective function." << endl; + case DRAG_COEFFICIENT: cout << "CD objective function"; + if (Fixed_CL_Mode) { cout << " using fixed CL mode, dCD/dCL = " << dCD_dCL << "." << endl; } + else { cout << "." << endl; } break; - case SIDEFORCE_COEFFICIENT: - cout << "Side force objective function." << endl; + case LIFT_COEFFICIENT: cout << "CL objective function." << endl; break; + case MOMENT_X_COEFFICIENT: cout << "CMx objective function" << endl; + if (Fixed_CL_Mode) { cout << " using fixed CL mode, dCMx/dCL = " << dCMx_dCL << "." << endl; } + else { cout << "." << endl; } break; - case EFFICIENCY: - cout << "CL/CD objective function." << endl; + case MOMENT_Y_COEFFICIENT: cout << "CMy objective function" << endl; + if (Fixed_CL_Mode) { cout << " using fixed CL mode, dCMy/dCL = " << dCMy_dCL << "." << endl; } + else { cout << "." << endl; } break; - case EQUIVALENT_AREA: - cout << "Equivalent area objective function. CD weight: " << WeightCd << "." << endl; - break; - case NEARFIELD_PRESSURE: - cout << "Nearfield pressure objective function. CD weight: " << WeightCd << "." << endl; - break; - case FORCE_X_COEFFICIENT: - cout << "X-force objective function." << endl; - break; - case FORCE_Y_COEFFICIENT: - cout << "Y-force objective function." << endl; - break; - case FORCE_Z_COEFFICIENT: - cout << "Z-force objective function." << endl; - break; - case THRUST_COEFFICIENT: - cout << "Thrust objective function." << endl; - break; - case TORQUE_COEFFICIENT: - cout << "Torque efficiency objective function." << endl; - break; - case TOTAL_HEATFLUX: - cout << "Total heat flux objective function." << endl; - break; - case MAXIMUM_HEATFLUX: - cout << "Maximum heat flux objective function." << endl; - break; - case FIGURE_OF_MERIT: - cout << "Rotor Figure of Merit objective function." << endl; - break; - case BUFFET_SENSOR: - cout << "Buffet sensor objective function." << endl; - break; - case SURFACE_TOTAL_PRESSURE: - cout << "Average total pressure objective function." << endl; - break; - case SURFACE_STATIC_PRESSURE: - cout << "Average static pressure objective function." << endl; - break; - case SURFACE_STATIC_TEMPERATURE: - cout << "Average static temperature objective function." << endl; - break; - case SURFACE_MASSFLOW: - cout << "Mass flow rate objective function." << endl; - break; - case SURFACE_MACH: - cout << "Mach number objective function." << endl; - break; - case CUSTOM_OBJFUNC: - cout << "Custom objective function." << endl; - break; - case REFERENCE_GEOMETRY: - cout << "Target geometry objective function." << endl; - break; - case REFERENCE_NODE: - cout << "Target node displacement objective function." << endl; - break; - case VOLUME_FRACTION: - cout << "Volume fraction objective function." << endl; - break; - case TOPOL_DISCRETENESS: - cout << "Topology discreteness objective function." << endl; - break; - case TOPOL_COMPLIANCE: - cout << "Topology compliance objective function." << endl; - break; - case STRESS_PENALTY: - cout << "Stress penalty objective function." << endl; + case MOMENT_Z_COEFFICIENT: cout << "CMz objective function" << endl; + if (Fixed_CL_Mode) { cout << " using fixed CL mode, dCMz/dCL = " << dCMz_dCL << "." << endl; } + else { cout << "." << endl; } break; + case INVERSE_DESIGN_PRESSURE: cout << "Inverse design (Cp) objective function." << endl; break; + case INVERSE_DESIGN_HEATFLUX: cout << "Inverse design (Heat Flux) objective function." << endl; break; + case SIDEFORCE_COEFFICIENT: cout << "Side force objective function." << endl; break; + case EFFICIENCY: cout << "CL/CD objective function." << endl; break; + case EQUIVALENT_AREA: cout << "Equivalent area objective function. CD weight: " << WeightCd <<"."<< endl; break; + case NEARFIELD_PRESSURE: cout << "Nearfield pressure objective function. CD weight: " << WeightCd <<"."<< endl; break; + case FORCE_X_COEFFICIENT: cout << "X-force objective function." << endl; break; + case FORCE_Y_COEFFICIENT: cout << "Y-force objective function." << endl; break; + case FORCE_Z_COEFFICIENT: cout << "Z-force objective function." << endl; break; + case THRUST_COEFFICIENT: cout << "Thrust objective function." << endl; break; + case TORQUE_COEFFICIENT: cout << "Torque efficiency objective function." << endl; break; + case TOTAL_HEATFLUX: cout << "Total heat flux objective function." << endl; break; + case MAXIMUM_HEATFLUX: cout << "Maximum heat flux objective function." << endl; break; + case FIGURE_OF_MERIT: cout << "Rotor Figure of Merit objective function." << endl; break; + case BUFFET_SENSOR: cout << "Buffet sensor objective function." << endl; break; + case SURFACE_TOTAL_PRESSURE: cout << "Average total pressure objective function." << endl; break; + case SURFACE_STATIC_PRESSURE: cout << "Average static pressure objective function." << endl; break; + case SURFACE_STATIC_TEMPERATURE: cout << "Average static temperature objective function." << endl; break; + case SURFACE_MASSFLOW: cout << "Mass flow rate objective function." << endl; break; + case SURFACE_MACH: cout << "Mach number objective function." << endl; break; + case CUSTOM_OBJFUNC: cout << "Custom objective function." << endl; break; + case REFERENCE_GEOMETRY: cout << "Target geometry objective function." << endl; break; + case REFERENCE_NODE: cout << "Target node displacement objective function." << endl; break; + case VOLUME_FRACTION: cout << "Volume fraction objective function." << endl; break; + case TOPOL_DISCRETENESS: cout << "Topology discreteness objective function." << endl; break; + case TOPOL_COMPLIANCE: cout << "Topology compliance objective function." << endl; break; + case STRESS_PENALTY: cout << "Stress penalty objective function." << endl; break; } - } else { + } + else { cout << "Weighted sum objective function." << endl; } + } if (val_software == SU2_COMPONENT::SU2_CFD) { + auto PrintLimiterInfo = [&](const LIMITER kind_limiter) { cout << "Second order integration in space, with slope limiter.\n"; switch (kind_limiter) { @@ -7267,14 +6649,12 @@ void CConfig::SetOutput(SU2_COMPONENT val_software, unsigned short val_izone) { case LIMITER::SHARP_EDGES: cout << "Sharp edges slope-limiting method, with constant: " << Venkat_LimiterCoeff << ".\n"; cout << "The reference element size is: " << RefElemLength << ".\n"; - cout << "The reference sharp edge distance is: " - << AdjSharp_LimiterCoeff * RefElemLength * Venkat_LimiterCoeff << "." << endl; + cout << "The reference sharp edge distance is: " << AdjSharp_LimiterCoeff*RefElemLength*Venkat_LimiterCoeff << "." << endl; break; case LIMITER::WALL_DISTANCE: cout << "Wall distance slope-limiting method, with constant: " << Venkat_LimiterCoeff << ".\n"; cout << "The reference element size is: " << RefElemLength << ".\n"; - cout << "The reference wall distance is: " << AdjSharp_LimiterCoeff * RefElemLength * Venkat_LimiterCoeff - << "." << endl; + cout << "The reference wall distance is: " << AdjSharp_LimiterCoeff*RefElemLength*Venkat_LimiterCoeff << "." << endl; break; default: SU2_MPI::Error("Unknown or invalid limiter type.", CURRENT_FUNCTION); @@ -7282,69 +6662,53 @@ void CConfig::SetOutput(SU2_COMPONENT val_software, unsigned short val_izone) { } }; - cout << endl << "--------------- Space Numerical Integration ( Zone " << iZone << " ) ------------------" << endl; + cout << endl <<"--------------- Space Numerical Integration ( Zone " << iZone << " ) ------------------" << endl; if (SmoothNumGrid) cout << "There are some smoothing iterations on the grid coordinates." << endl; - if ((Kind_Solver == MAIN_SOLVER::EULER) || (Kind_Solver == MAIN_SOLVER::NAVIER_STOKES) || - (Kind_Solver == MAIN_SOLVER::RANS) || (Kind_Solver == MAIN_SOLVER::INC_EULER) || - (Kind_Solver == MAIN_SOLVER::INC_NAVIER_STOKES) || (Kind_Solver == MAIN_SOLVER::INC_RANS) || - (Kind_Solver == MAIN_SOLVER::NEMO_EULER) || (Kind_Solver == MAIN_SOLVER::NEMO_NAVIER_STOKES) || - (Kind_Solver == MAIN_SOLVER::DISC_ADJ_EULER) || (Kind_Solver == MAIN_SOLVER::DISC_ADJ_NAVIER_STOKES) || - (Kind_Solver == MAIN_SOLVER::DISC_ADJ_RANS)) { + if ((Kind_Solver == MAIN_SOLVER::EULER) || (Kind_Solver == MAIN_SOLVER::NAVIER_STOKES) || (Kind_Solver == MAIN_SOLVER::RANS) || + (Kind_Solver == MAIN_SOLVER::INC_EULER) || (Kind_Solver == MAIN_SOLVER::INC_NAVIER_STOKES) || (Kind_Solver == MAIN_SOLVER::INC_RANS) || + (Kind_Solver == MAIN_SOLVER::NEMO_EULER) || (Kind_Solver == MAIN_SOLVER::NEMO_NAVIER_STOKES) || + (Kind_Solver == MAIN_SOLVER::DISC_ADJ_EULER) || (Kind_Solver == MAIN_SOLVER::DISC_ADJ_NAVIER_STOKES) || (Kind_Solver == MAIN_SOLVER::DISC_ADJ_RANS) ) { + if (Kind_ConvNumScheme_Flow == SPACE_CENTERED) { if (Kind_Centered_Flow == CENTERED::LAX) { cout << "Lax-Friedrich scheme (1st order in space) for the flow inviscid terms.\n"; cout << "Lax viscous coefficients (1st): " << Kappa_1st_Flow << ".\n"; cout << "First order integration." << endl; - } else { + } + else { cout << "Jameson-Schmidt-Turkel scheme (2nd order in space) for the flow inviscid terms.\n"; cout << "JST viscous coefficients (2nd & 4th): " << Kappa_2nd_Flow << ", " << Kappa_4th_Flow << ".\n"; - cout << "The method includes a grid stretching correction (p = 0.3)." << endl; + cout << "The method includes a grid stretching correction (p = 0.3)."<< endl; } } if (Kind_ConvNumScheme_Flow == SPACE_UPWIND) { - if (Kind_Upwind_Flow == UPWIND::ROE) - cout << "Roe (with entropy fix = " << EntropyFix_Coeff << ") solver for the flow inviscid terms." << endl; - if (Kind_Upwind_Flow == UPWIND::TURKEL) cout << "Roe-Turkel solver for the flow inviscid terms." << endl; - if (Kind_Upwind_Flow == UPWIND::AUSM) cout << "AUSM solver for the flow inviscid terms." << endl; - if (Kind_Upwind_Flow == UPWIND::HLLC) cout << "HLLC solver for the flow inviscid terms." << endl; - if (Kind_Upwind_Flow == UPWIND::SW) cout << "Steger-Warming solver for the flow inviscid terms." << endl; - if (Kind_Upwind_Flow == UPWIND::MSW) - cout << "Modified Steger-Warming solver for the flow inviscid terms." << endl; - if (Kind_Upwind_Flow == UPWIND::L2ROE) cout << "L2ROE Low Mach ROE solver for the flow inviscid terms." << endl; - if (Kind_Upwind_Flow == UPWIND::LMROE) - cout << "Rieper Low Mach ROE solver for the flow inviscid terms." << endl; - if (Kind_Upwind_Flow == UPWIND::SLAU) - cout << "Simple Low-Dissipation AUSM solver for the flow inviscid terms." << endl; - if (Kind_Upwind_Flow == UPWIND::SLAU2) - cout << "Simple Low-Dissipation AUSM 2 solver for the flow inviscid terms." << endl; - if (Kind_Upwind_Flow == UPWIND::FDS) - cout << "Flux difference splitting (FDS) upwind scheme for the flow inviscid terms." << endl; - if (Kind_Upwind_Flow == UPWIND::AUSMPLUSUP) cout << "AUSM+-up solver for the flow inviscid terms." << endl; - if (Kind_Upwind_Flow == UPWIND::AUSMPLUSUP2) cout << "AUSM+-up2 solver for the flow inviscid terms." << endl; - if (Kind_Upwind_Flow == UPWIND::AUSMPLUSM) cout << "AUSM+M solver for the flow inviscid terms." << endl; - - if (Kind_Solver == MAIN_SOLVER::EULER || Kind_Solver == MAIN_SOLVER::DISC_ADJ_EULER || + if (Kind_Upwind_Flow == UPWIND::ROE) cout << "Roe (with entropy fix = "<< EntropyFix_Coeff <<") solver for the flow inviscid terms."<< endl; + if (Kind_Upwind_Flow == UPWIND::TURKEL) cout << "Roe-Turkel solver for the flow inviscid terms."<< endl; + if (Kind_Upwind_Flow == UPWIND::AUSM) cout << "AUSM solver for the flow inviscid terms."<< endl; + if (Kind_Upwind_Flow == UPWIND::HLLC) cout << "HLLC solver for the flow inviscid terms."<< endl; + if (Kind_Upwind_Flow == UPWIND::SW) cout << "Steger-Warming solver for the flow inviscid terms."<< endl; + if (Kind_Upwind_Flow == UPWIND::MSW) cout << "Modified Steger-Warming solver for the flow inviscid terms."<< endl; + if (Kind_Upwind_Flow == UPWIND::L2ROE) cout << "L2ROE Low Mach ROE solver for the flow inviscid terms."<< endl; + if (Kind_Upwind_Flow == UPWIND::LMROE) cout << "Rieper Low Mach ROE solver for the flow inviscid terms."<< endl; + if (Kind_Upwind_Flow == UPWIND::SLAU) cout << "Simple Low-Dissipation AUSM solver for the flow inviscid terms."<< endl; + if (Kind_Upwind_Flow == UPWIND::SLAU2) cout << "Simple Low-Dissipation AUSM 2 solver for the flow inviscid terms."<< endl; + if (Kind_Upwind_Flow == UPWIND::FDS) cout << "Flux difference splitting (FDS) upwind scheme for the flow inviscid terms."<< endl; + if (Kind_Upwind_Flow == UPWIND::AUSMPLUSUP) cout << "AUSM+-up solver for the flow inviscid terms."<< endl; + if (Kind_Upwind_Flow == UPWIND::AUSMPLUSUP2) cout << "AUSM+-up2 solver for the flow inviscid terms."<< endl; + if (Kind_Upwind_Flow == UPWIND::AUSMPLUSM) cout << "AUSM+M solver for the flow inviscid terms."<< endl; + + if (Kind_Solver == MAIN_SOLVER::EULER || Kind_Solver == MAIN_SOLVER::DISC_ADJ_EULER || Kind_Solver == MAIN_SOLVER::NAVIER_STOKES || Kind_Solver == MAIN_SOLVER::DISC_ADJ_NAVIER_STOKES || - Kind_Solver == MAIN_SOLVER::RANS || Kind_Solver == MAIN_SOLVER::DISC_ADJ_RANS) { + Kind_Solver == MAIN_SOLVER::RANS || Kind_Solver == MAIN_SOLVER::DISC_ADJ_RANS) { switch (Kind_RoeLowDiss) { - case NO_ROELOWDISS: - cout << "Standard Roe without low-dissipation function." << endl; - break; - case NTS: - cout << "Roe with NTS low-dissipation function." << endl; - break; - case FD: - cout << "Roe with DDES's FD low-dissipation function." << endl; - break; - case NTS_DUCROS: - cout << "Roe with NTS low-dissipation function + Ducros shock sensor." << endl; - break; - case FD_DUCROS: - cout << "Roe with DDES's FD low-dissipation function + Ducros shock sensor." << endl; - break; + case NO_ROELOWDISS: cout << "Standard Roe without low-dissipation function."<< endl; break; + case NTS: cout << "Roe with NTS low-dissipation function."<< endl; break; + case FD: cout << "Roe with DDES's FD low-dissipation function."<< endl; break; + case NTS_DUCROS: cout << "Roe with NTS low-dissipation function + Ducros shock sensor."<< endl; break; + case FD_DUCROS: cout << "Roe with DDES's FD low-dissipation function + Ducros shock sensor."<< endl; break; } } @@ -7353,7 +6717,9 @@ void CConfig::SetOutput(SU2_COMPONENT val_software, unsigned short val_izone) { } else { cout << "First order integration in space." << endl; } + } + } if ((Kind_Solver == MAIN_SOLVER::RANS) || (Kind_Solver == MAIN_SOLVER::DISC_ADJ_RANS)) { @@ -7367,25 +6733,24 @@ void CConfig::SetOutput(SU2_COMPONENT val_software, unsigned short val_izone) { } } - if ((Kind_Solver == MAIN_SOLVER::ADJ_EULER) || (Kind_Solver == MAIN_SOLVER::ADJ_NAVIER_STOKES) || - (Kind_Solver == MAIN_SOLVER::ADJ_RANS)) { + if ((Kind_Solver == MAIN_SOLVER::ADJ_EULER) || (Kind_Solver == MAIN_SOLVER::ADJ_NAVIER_STOKES) || (Kind_Solver == MAIN_SOLVER::ADJ_RANS)) { + if (Kind_ConvNumScheme_AdjFlow == SPACE_CENTERED) { if (Kind_Centered_AdjFlow == CENTERED::JST) { - cout << "Jameson-Schmidt-Turkel scheme for the adjoint inviscid terms." << endl; - cout << "JST viscous coefficients (1st, 2nd, & 4th): " << Kappa_1st_AdjFlow << ", " << Kappa_2nd_AdjFlow - << ", " << Kappa_4th_AdjFlow << "." << endl; - cout << "The method includes a grid stretching correction (p = 0.3)." << endl; + cout << "Jameson-Schmidt-Turkel scheme for the adjoint inviscid terms."<< endl; + cout << "JST viscous coefficients (1st, 2nd, & 4th): " << Kappa_1st_AdjFlow + << ", " << Kappa_2nd_AdjFlow << ", " << Kappa_4th_AdjFlow <<"."<< endl; + cout << "The method includes a grid stretching correction (p = 0.3)."<< endl; cout << "Second order integration." << endl; } if (Kind_Centered_AdjFlow == CENTERED::LAX) { - cout << "Lax-Friedrich scheme for the adjoint inviscid terms." << endl; + cout << "Lax-Friedrich scheme for the adjoint inviscid terms."<< endl; cout << "First order integration." << endl; } } if (Kind_ConvNumScheme_AdjFlow == SPACE_UPWIND) { - if (Kind_Upwind_AdjFlow == UPWIND::ROE) - cout << "Roe (with entropy fix = " << EntropyFix_Coeff << ") solver for the adjoint inviscid terms." << endl; + if (Kind_Upwind_AdjFlow == UPWIND::ROE) cout << "Roe (with entropy fix = "<< EntropyFix_Coeff <<") solver for the adjoint inviscid terms."<< endl; if (MUSCL_AdjFlow) { PrintLimiterInfo(Kind_SlopeLimit_AdjFlow); } else { @@ -7393,14 +6758,13 @@ void CConfig::SetOutput(SU2_COMPONENT val_software, unsigned short val_izone) { } } - cout << "The reference sharp edge distance is: " << AdjSharp_LimiterCoeff * RefElemLength * Venkat_LimiterCoeff - << ". " << endl; + cout << "The reference sharp edge distance is: " << AdjSharp_LimiterCoeff*RefElemLength*Venkat_LimiterCoeff <<". "<< endl; + } if ((Kind_Solver == MAIN_SOLVER::ADJ_RANS) && (!Frozen_Visc_Cont)) { if (Kind_ConvNumScheme_AdjTurb == SPACE_UPWIND) { - if (Kind_Upwind_Turb == UPWIND::SCALAR_UPWIND) - cout << "Scalar upwind solver for the adjoint turbulence model." << endl; + if (Kind_Upwind_Turb == UPWIND::SCALAR_UPWIND) cout << "Scalar upwind solver for the adjoint turbulence model." << endl; if (MUSCL_AdjTurb) { PrintLimiterInfo(Kind_SlopeLimit_AdjTurb); } else { @@ -7411,85 +6775,62 @@ void CConfig::SetOutput(SU2_COMPONENT val_software, unsigned short val_izone) { if ((Kind_Solver == MAIN_SOLVER::NAVIER_STOKES) || (Kind_Solver == MAIN_SOLVER::RANS) || (Kind_Solver == MAIN_SOLVER::INC_NAVIER_STOKES) || (Kind_Solver == MAIN_SOLVER::INC_RANS) || - (Kind_Solver == MAIN_SOLVER::NEMO_NAVIER_STOKES) || (Kind_Solver == MAIN_SOLVER::DISC_ADJ_INC_NAVIER_STOKES) || - (Kind_Solver == MAIN_SOLVER::DISC_ADJ_INC_RANS) || (Kind_Solver == MAIN_SOLVER::DISC_ADJ_NAVIER_STOKES) || - (Kind_Solver == MAIN_SOLVER::DISC_ADJ_RANS)) { - cout << "Average of gradients with correction (viscous flow terms)." << endl; + (Kind_Solver == MAIN_SOLVER::NEMO_NAVIER_STOKES) || + (Kind_Solver == MAIN_SOLVER::DISC_ADJ_INC_NAVIER_STOKES) || (Kind_Solver == MAIN_SOLVER::DISC_ADJ_INC_RANS) || + (Kind_Solver == MAIN_SOLVER::DISC_ADJ_NAVIER_STOKES) || (Kind_Solver == MAIN_SOLVER::DISC_ADJ_RANS)) { + cout << "Average of gradients with correction (viscous flow terms)." << endl; } if ((Kind_Solver == MAIN_SOLVER::ADJ_NAVIER_STOKES) || (Kind_Solver == MAIN_SOLVER::ADJ_RANS)) { cout << "Average of gradients with correction (viscous adjoint terms)." << endl; } - if ((Kind_Solver == MAIN_SOLVER::RANS) || (Kind_Solver == MAIN_SOLVER::DISC_ADJ_RANS) || - (Kind_Solver == MAIN_SOLVER::INC_RANS) || (Kind_Solver == MAIN_SOLVER::DISC_ADJ_INC_RANS)) { + if ((Kind_Solver == MAIN_SOLVER::RANS) || (Kind_Solver == MAIN_SOLVER::DISC_ADJ_RANS) || (Kind_Solver == MAIN_SOLVER::INC_RANS) || (Kind_Solver == MAIN_SOLVER::DISC_ADJ_INC_RANS) ) { cout << "Average of gradients with correction (viscous turbulence terms)." << endl; } if ((Kind_Solver == MAIN_SOLVER::ADJ_RANS) && (!Frozen_Visc_Cont)) { - cout << "Average of gradients with correction (2nd order) for computation of adjoint viscous turbulence terms." - << endl; - if (Kind_TimeIntScheme_AdjTurb == EULER_IMPLICIT) - cout << "Euler implicit method for the turbulent adjoint equation." << endl; + cout << "Average of gradients with correction (2nd order) for computation of adjoint viscous turbulence terms." << endl; + if (Kind_TimeIntScheme_AdjTurb == EULER_IMPLICIT) cout << "Euler implicit method for the turbulent adjoint equation." << endl; } - if (Kind_Solver != MAIN_SOLVER::FEM_EULER && Kind_Solver != MAIN_SOLVER::FEM_NAVIER_STOKES && - Kind_Solver != MAIN_SOLVER::FEM_RANS && Kind_Solver != MAIN_SOLVER::FEM_LES && - Kind_Solver != MAIN_SOLVER::DISC_ADJ_FEM_EULER && Kind_Solver != MAIN_SOLVER::DISC_ADJ_FEM_NS && - Kind_Solver != MAIN_SOLVER::DISC_ADJ_FEM_RANS) { - if (!fea) { + if(Kind_Solver != MAIN_SOLVER::FEM_EULER && Kind_Solver != MAIN_SOLVER::FEM_NAVIER_STOKES && + Kind_Solver != MAIN_SOLVER::FEM_RANS && Kind_Solver != MAIN_SOLVER::FEM_LES && + Kind_Solver != MAIN_SOLVER::DISC_ADJ_FEM_EULER && Kind_Solver != MAIN_SOLVER::DISC_ADJ_FEM_NS && + Kind_Solver != MAIN_SOLVER::DISC_ADJ_FEM_RANS) { + if (!fea){ switch (Kind_Gradient_Method_Recon) { - case GREEN_GAUSS: - cout << "Gradient for upwind reconstruction: Green-Gauss." << endl; - break; - case LEAST_SQUARES: - cout << "Gradient for upwind reconstruction: unweighted Least-Squares." << endl; - break; - case WEIGHTED_LEAST_SQUARES: - cout << "Gradient for upwind reconstruction: inverse-distance weighted Least-Squares." << endl; - break; + case GREEN_GAUSS: cout << "Gradient for upwind reconstruction: Green-Gauss." << endl; break; + case LEAST_SQUARES: cout << "Gradient for upwind reconstruction: unweighted Least-Squares." << endl; break; + case WEIGHTED_LEAST_SQUARES: cout << "Gradient for upwind reconstruction: inverse-distance weighted Least-Squares." << endl; break; } switch (Kind_Gradient_Method) { - case GREEN_GAUSS: - cout << "Gradient for viscous and source terms: Green-Gauss." << endl; - break; - case LEAST_SQUARES: - cout << "Gradient for viscous and source terms: unweighted Least-Squares." << endl; - break; - case WEIGHTED_LEAST_SQUARES: - cout << "Gradient for viscous and source terms: inverse-distance weighted Least-Squares." << endl; - break; + case GREEN_GAUSS: cout << "Gradient for viscous and source terms: Green-Gauss." << endl; break; + case LEAST_SQUARES: cout << "Gradient for viscous and source terms: unweighted Least-Squares." << endl; break; + case WEIGHTED_LEAST_SQUARES: cout << "Gradient for viscous and source terms: inverse-distance weighted Least-Squares." << endl; break; } - } else { + } + else{ cout << "Spatial discretization using the Finite Element Method." << endl; } } - if (Kind_Solver == MAIN_SOLVER::FEM_EULER || Kind_Solver == MAIN_SOLVER::FEM_NAVIER_STOKES || - Kind_Solver == MAIN_SOLVER::FEM_RANS || Kind_Solver == MAIN_SOLVER::FEM_LES || - Kind_Solver == MAIN_SOLVER::DISC_ADJ_FEM_EULER || Kind_Solver == MAIN_SOLVER::DISC_ADJ_FEM_NS || - Kind_Solver == MAIN_SOLVER::DISC_ADJ_FEM_RANS) { - if (Kind_FEM_Flow == DG) { + if(Kind_Solver == MAIN_SOLVER::FEM_EULER || Kind_Solver == MAIN_SOLVER::FEM_NAVIER_STOKES || + Kind_Solver == MAIN_SOLVER::FEM_RANS || Kind_Solver == MAIN_SOLVER::FEM_LES || + Kind_Solver == MAIN_SOLVER::DISC_ADJ_FEM_EULER || Kind_Solver == MAIN_SOLVER::DISC_ADJ_FEM_NS || + Kind_Solver == MAIN_SOLVER::DISC_ADJ_FEM_RANS) { + if(Kind_FEM_Flow == DG) { cout << "Discontinuous Galerkin Finite element solver" << endl; - switch (Riemann_Solver_FEM) { - case UPWIND::ROE: - cout << "Roe (with entropy fix) solver for inviscid fluxes over the faces" << endl; - break; - case UPWIND::LAX_FRIEDRICH: - cout << "Lax-Friedrich solver for inviscid fluxes over the faces" << endl; - break; - case UPWIND::AUSM: - cout << "AUSM solver inviscid fluxes over the faces" << endl; - break; - case UPWIND::HLLC: - cout << "HLLC solver inviscid fluxes over the faces" << endl; - break; - default: - break; + switch( Riemann_Solver_FEM ) { + case UPWIND::ROE: cout << "Roe (with entropy fix) solver for inviscid fluxes over the faces" << endl; break; + case UPWIND::LAX_FRIEDRICH: cout << "Lax-Friedrich solver for inviscid fluxes over the faces" << endl; break; + case UPWIND::AUSM: cout << "AUSM solver inviscid fluxes over the faces" << endl; break; + case UPWIND::HLLC: cout << "HLLC solver inviscid fluxes over the faces" << endl; break; + default: break; } - if (Kind_Solver != MAIN_SOLVER::FEM_EULER && Kind_Solver != MAIN_SOLVER::DISC_ADJ_FEM_EULER) { + if(Kind_Solver != MAIN_SOLVER::FEM_EULER && Kind_Solver != MAIN_SOLVER::DISC_ADJ_FEM_EULER) { cout << "Theta symmetrizing terms interior penalty: " << Theta_Interior_Penalty_DGFEM << endl; } } @@ -7501,58 +6842,50 @@ void CConfig::SetOutput(SU2_COMPONENT val_software, unsigned short val_izone) { cout << "Padded matrix size for optimal performance: " << sizeMatMulPadding << endl; } - cout << endl << "--------------- Time Numerical Integration ( Zone " << iZone << " ) ------------------" << endl; + cout << endl <<"--------------- Time Numerical Integration ( Zone " << iZone << " ) ------------------" << endl; if (!fea) { - switch (TimeMarching) { - case TIME_MARCHING::STEADY: - cout << "Local time stepping (steady state simulation)." << endl; - break; - - case TIME_MARCHING::TIME_STEPPING: - cout << "Unsteady simulation using a time stepping strategy." << endl; - if (Unst_CFL != 0.0) { - cout << "Time step computed by the code. Unsteady CFL number: " << Unst_CFL << "." << endl; - if (Delta_UnstTime != 0.0) { - cout << "Synchronization time provided by the user (s): " << Delta_UnstTime << "." << endl; - } - } else - cout << "Unsteady time step provided by the user (s): " << Delta_UnstTime << "." << endl; - break; + switch (TimeMarching) { + case TIME_MARCHING::STEADY: + cout << "Local time stepping (steady state simulation)." << endl; break; + + case TIME_MARCHING::TIME_STEPPING: + cout << "Unsteady simulation using a time stepping strategy."<< endl; + if (Unst_CFL != 0.0) { + cout << "Time step computed by the code. Unsteady CFL number: " << Unst_CFL <<"."<< endl; + if (Delta_UnstTime != 0.0) { + cout << "Synchronization time provided by the user (s): "<< Delta_UnstTime << "." << endl; + } + } + else cout << "Unsteady time step provided by the user (s): "<< Delta_UnstTime << "." << endl; + break; - case TIME_MARCHING::DT_STEPPING_1ST: - case TIME_MARCHING::DT_STEPPING_2ND: - if (TimeMarching == TIME_MARCHING::DT_STEPPING_1ST) - cout << "Unsteady simulation, dual time stepping strategy (first order in time)." << endl; - if (TimeMarching == TIME_MARCHING::DT_STEPPING_2ND) - cout << "Unsteady simulation, dual time stepping strategy (second order in time)." << endl; - if (Unst_CFL != 0.0) - cout << "Time step computed by the code. Unsteady CFL number: " << Unst_CFL << "." << endl; - else - cout << "Unsteady time step provided by the user (s): " << Delta_UnstTime << "." << endl; - break; + case TIME_MARCHING::DT_STEPPING_1ST: case TIME_MARCHING::DT_STEPPING_2ND: + if (TimeMarching == TIME_MARCHING::DT_STEPPING_1ST) cout << "Unsteady simulation, dual time stepping strategy (first order in time)."<< endl; + if (TimeMarching == TIME_MARCHING::DT_STEPPING_2ND) cout << "Unsteady simulation, dual time stepping strategy (second order in time)."<< endl; + if (Unst_CFL != 0.0) cout << "Time step computed by the code. Unsteady CFL number: " << Unst_CFL <<"."<< endl; + else cout << "Unsteady time step provided by the user (s): "<< Delta_UnstTime << "." << endl; + break; - default: - break; - } + default: + break; + } + } + else { + if (Time_Domain) { + cout << "Dynamic structural analysis."<< endl; + cout << "Time step provided by the user for the dynamic analysis(s): "<< Time_Step << "." << endl; } else { - if (Time_Domain) { - cout << "Dynamic structural analysis." << endl; - cout << "Time step provided by the user for the dynamic analysis(s): " << Time_Step << "." << endl; - } else { - cout << "Static structural analysis." << endl; - } + cout << "Static structural analysis." << endl; } + } - if ((Kind_Solver == MAIN_SOLVER::EULER) || (Kind_Solver == MAIN_SOLVER::NAVIER_STOKES) || - (Kind_Solver == MAIN_SOLVER::RANS) || (Kind_Solver == MAIN_SOLVER::INC_EULER) || - (Kind_Solver == MAIN_SOLVER::INC_NAVIER_STOKES) || (Kind_Solver == MAIN_SOLVER::INC_RANS) || + if ((Kind_Solver == MAIN_SOLVER::EULER) || (Kind_Solver == MAIN_SOLVER::NAVIER_STOKES) || (Kind_Solver == MAIN_SOLVER::RANS) || + (Kind_Solver == MAIN_SOLVER::INC_EULER) || (Kind_Solver == MAIN_SOLVER::INC_NAVIER_STOKES) || (Kind_Solver == MAIN_SOLVER::INC_RANS) || (Kind_Solver == MAIN_SOLVER::NEMO_EULER) || (Kind_Solver == MAIN_SOLVER::NEMO_NAVIER_STOKES) || - (Kind_Solver == MAIN_SOLVER::DISC_ADJ_INC_EULER) || (Kind_Solver == MAIN_SOLVER::DISC_ADJ_INC_NAVIER_STOKES) || - (Kind_Solver == MAIN_SOLVER::DISC_ADJ_INC_RANS) || (Kind_Solver == MAIN_SOLVER::DISC_ADJ_EULER) || - (Kind_Solver == MAIN_SOLVER::DISC_ADJ_NAVIER_STOKES) || (Kind_Solver == MAIN_SOLVER::DISC_ADJ_RANS) || - (Kind_Solver == MAIN_SOLVER::DISC_ADJ_FEM_EULER) || (Kind_Solver == MAIN_SOLVER::DISC_ADJ_FEM_NS) || - (Kind_Solver == MAIN_SOLVER::DISC_ADJ_FEM_RANS)) { + (Kind_Solver == MAIN_SOLVER::DISC_ADJ_INC_EULER) || (Kind_Solver == MAIN_SOLVER::DISC_ADJ_INC_NAVIER_STOKES) || (Kind_Solver == MAIN_SOLVER::DISC_ADJ_INC_RANS) || + (Kind_Solver == MAIN_SOLVER::DISC_ADJ_EULER) || (Kind_Solver == MAIN_SOLVER::DISC_ADJ_NAVIER_STOKES) || (Kind_Solver == MAIN_SOLVER::DISC_ADJ_RANS) || + (Kind_Solver == MAIN_SOLVER::DISC_ADJ_FEM_EULER) || (Kind_Solver == MAIN_SOLVER::DISC_ADJ_FEM_NS) || (Kind_Solver == MAIN_SOLVER::DISC_ADJ_FEM_RANS)) { switch (Kind_TimeIntScheme_Flow) { case RUNGE_KUTTA_EXPLICIT: cout << "Runge-Kutta explicit method for the flow equations." << endl; @@ -7569,8 +6902,7 @@ void CConfig::SetOutput(SU2_COMPONENT val_software, unsigned short val_izone) { case EULER_IMPLICIT: cout << "Euler implicit method for the flow equations." << endl; if (Kind_FluidModel == MUTATIONPP) - SU2_MPI::Error("Implicit time scheme is not yet implemented with Mutation++. Use EULER_EXPLICIT.", - CURRENT_FUNCTION); + SU2_MPI::Error("Implicit time scheme is not yet implemented with Mutation++. Use EULER_EXPLICIT.", CURRENT_FUNCTION); switch (Kind_Linear_Solver) { case BCGSTAB: case FGMRES: @@ -7580,40 +6912,24 @@ void CConfig::SetOutput(SU2_COMPONENT val_software, unsigned short val_izone) { else cout << "FGMRES is used for solving the linear system." << endl; switch (Kind_Linear_Solver_Prec) { - case ILU: - cout << "Using a ILU(" << Linear_Solver_ILU_n << ") preconditioning." << endl; - break; - case LINELET: - cout << "Using a linelet preconditioning." << endl; - break; - case LU_SGS: - cout << "Using a LU-SGS preconditioning." << endl; - break; - case JACOBI: - cout << "Using a Jacobi preconditioning." << endl; - break; + case ILU: cout << "Using a ILU("<< Linear_Solver_ILU_n <<") preconditioning."<< endl; break; + case LINELET: cout << "Using a linelet preconditioning."<< endl; break; + case LU_SGS: cout << "Using a LU-SGS preconditioning."<< endl; break; + case JACOBI: cout << "Using a Jacobi preconditioning."<< endl; break; } break; case SMOOTHER: switch (Kind_Linear_Solver_Prec) { - case ILU: - cout << "A ILU(" << Linear_Solver_ILU_n << ")"; - break; - case LINELET: - cout << "A Linelet"; - break; - case LU_SGS: - cout << "A LU-SGS"; - break; - case JACOBI: - cout << "A Jacobi"; - break; + case ILU: cout << "A ILU(" << Linear_Solver_ILU_n << ")"; break; + case LINELET: cout << "A Linelet"; break; + case LU_SGS: cout << "A LU-SGS"; break; + case JACOBI: cout << "A Jacobi"; break; } cout << " method is used for smoothing the linear system." << endl; break; } - cout << "Convergence criteria of the linear solver: " << Linear_Solver_Error << "." << endl; - cout << "Max number of linear iterations: " << Linear_Solver_Iter << "." << endl; + cout << "Convergence criteria of the linear solver: "<< Linear_Solver_Error <<"."<< endl; + cout << "Max number of linear iterations: "<< Linear_Solver_Iter <<"."<< endl; break; case CLASSICAL_RK4_EXPLICIT: cout << "Classical RK4 explicit method for the flow equations." << endl; @@ -7634,27 +6950,25 @@ void CConfig::SetOutput(SU2_COMPONENT val_software, unsigned short val_izone) { switch (Kind_Linear_Solver) { case BCGSTAB: cout << "BCGSTAB is used for solving the linear system." << endl; - cout << "Convergence criteria of the linear solver: " << Linear_Solver_Error << "." << endl; - cout << "Max number of iterations: " << Linear_Solver_Iter << "." << endl; + cout << "Convergence criteria of the linear solver: "<< Linear_Solver_Error <<"."<< endl; + cout << "Max number of iterations: "<< Linear_Solver_Iter <<"."<< endl; break; - case FGMRES: - case RESTARTED_FGMRES: + case FGMRES: case RESTARTED_FGMRES: cout << "FGMRES is used for solving the linear system." << endl; - cout << "Convergence criteria of the linear solver: " << Linear_Solver_Error << "." << endl; - cout << "Max number of iterations: " << Linear_Solver_Iter << "." << endl; + cout << "Convergence criteria of the linear solver: "<< Linear_Solver_Error <<"."<< endl; + cout << "Max number of iterations: "<< Linear_Solver_Iter <<"."<< endl; break; case CONJUGATE_GRADIENT: cout << "A Conjugate Gradient method is used for solving the linear system." << endl; - cout << "Convergence criteria of the linear solver: " << Linear_Solver_Error << "." << endl; - cout << "Max number of iterations: " << Linear_Solver_Iter << "." << endl; + cout << "Convergence criteria of the linear solver: "<< Linear_Solver_Error <<"."<< endl; + cout << "Max number of iterations: "<< Linear_Solver_Iter <<"."<< endl; break; } break; } } - if ((Kind_Solver == MAIN_SOLVER::ADJ_EULER) || (Kind_Solver == MAIN_SOLVER::ADJ_NAVIER_STOKES) || - (Kind_Solver == MAIN_SOLVER::ADJ_RANS)) { + if ((Kind_Solver == MAIN_SOLVER::ADJ_EULER) || (Kind_Solver == MAIN_SOLVER::ADJ_NAVIER_STOKES) || (Kind_Solver == MAIN_SOLVER::ADJ_RANS)) { switch (Kind_TimeIntScheme_AdjFlow) { case RUNGE_KUTTA_EXPLICIT: cout << "Runge-Kutta explicit method for the adjoint equations." << endl; @@ -7665,17 +6979,13 @@ void CConfig::SetOutput(SU2_COMPONENT val_software, unsigned short val_izone) { } cout << endl; break; - case EULER_EXPLICIT: - cout << "Euler explicit method for the adjoint equations." << endl; - break; - case EULER_IMPLICIT: - cout << "Euler implicit method for the adjoint equations." << endl; - break; + case EULER_EXPLICIT: cout << "Euler explicit method for the adjoint equations." << endl; break; + case EULER_IMPLICIT: cout << "Euler implicit method for the adjoint equations." << endl; break; } } - if (Kind_Solver == MAIN_SOLVER::FEM_EULER || Kind_Solver == MAIN_SOLVER::FEM_NAVIER_STOKES || - Kind_Solver == MAIN_SOLVER::FEM_RANS || Kind_Solver == MAIN_SOLVER::FEM_LES) { + if(Kind_Solver == MAIN_SOLVER::FEM_EULER || Kind_Solver == MAIN_SOLVER::FEM_NAVIER_STOKES || + Kind_Solver == MAIN_SOLVER::FEM_RANS || Kind_Solver == MAIN_SOLVER::FEM_LES) { switch (Kind_TimeIntScheme_FEM_Flow) { case RUNGE_KUTTA_EXPLICIT: cout << "Runge-Kutta explicit method for the flow equations." << endl; @@ -7694,13 +7004,13 @@ void CConfig::SetOutput(SU2_COMPONENT val_software, unsigned short val_izone) { break; case ADER_DG: - if (nLevels_TimeAccurateLTS == 1) + if(nLevels_TimeAccurateLTS == 1) cout << "ADER-DG for the flow equations with global time stepping." << endl; else cout << "ADER-DG for the flow equations with " << nLevels_TimeAccurateLTS << " levels for time accurate local time stepping." << endl; - switch (Kind_ADER_Predictor) { + switch( Kind_ADER_Predictor ) { case ADER_ALIASED_PREDICTOR: cout << "An aliased approach is used in the predictor step. " << endl; break; @@ -7710,19 +7020,19 @@ void CConfig::SetOutput(SU2_COMPONENT val_software, unsigned short val_izone) { } cout << "Number of time DOFs ADER-DG predictor step: " << nTimeDOFsADER_DG << endl; cout << "Location of time DOFs ADER-DG on the interval [-1,1]: "; - for (unsigned short iDOF = 0; iDOF < nTimeDOFsADER_DG; iDOF++) { + for (unsigned short iDOF=0; iDOF& option_value) { +bool CConfig::TokenizeString(string & str, string & option_name, + vector & option_value) { const string delimiters(" (){}:,\t\n\v\f\r"); // check for comments or empty string string::size_type pos, last_pos; pos = str.find_first_of('%'); - if ((str.length() == 0) || (pos == 0)) { + if ( (str.length() == 0) || (pos == 0) ) { // str is empty or a comment line, so no option here return false; } @@ -8288,22 +7596,24 @@ bool CConfig::TokenizeString(string& str, string& option_name, vector& o pos = str.find('='); if (pos == string::npos) { cerr << "Error in TokenizeString(): " - << "line in the configuration file with no \"=\" sign." << endl; + << "line in the configuration file with no \"=\" sign." + << endl; cout << "Look for: " << str << endl; cout << "str.length() = " << str.length() << endl; throw(-1); } name_part = str.substr(0, pos); - value_part = str.substr(pos + 1, string::npos); - // cout << "name_part = |" << name_part << "|" << endl; - // cout << "value_part = |" << value_part << "|" << endl; + value_part = str.substr(pos+1, string::npos); + //cout << "name_part = |" << name_part << "|" << endl; + //cout << "value_part = |" << value_part << "|" << endl; // the first_part should consist of one string with no interior delimiters last_pos = name_part.find_first_not_of(delimiters, 0); pos = name_part.find_first_of(delimiters, last_pos); - if ((name_part.length() == 0) || (last_pos == string::npos)) { + if ( (name_part.length() == 0) || (last_pos == string::npos) ) { cerr << "Error in CConfig::TokenizeString(): " - << "line in the configuration file with no name before the \"=\" sign." << endl; + << "line in the configuration file with no name before the \"=\" sign." + << endl; throw(-1); } if (pos == string::npos) pos = name_part.length(); @@ -8311,13 +7621,14 @@ bool CConfig::TokenizeString(string& str, string& option_name, vector& o last_pos = name_part.find_first_not_of(delimiters, pos); if (last_pos != string::npos) { cerr << "Error in TokenizeString(): " - << "two or more options before an \"=\" sign in the configuration file." << endl; + << "two or more options before an \"=\" sign in the configuration file." + << endl; throw(-1); } StringToUpperCase(option_name); - // cout << "option_name = |" << option_name << "|" << endl; - // cout << "pos = " << pos << ": last_pos = " << last_pos << endl; + //cout << "option_name = |" << option_name << "|" << endl; + //cout << "pos = " << pos << ": last_pos = " << last_pos << endl; // now fill the option value vector option_value.clear(); @@ -8325,7 +7636,7 @@ bool CConfig::TokenizeString(string& str, string& option_name, vector& o // detect a raw string if (value_part[last_pos] == '\'' && value_part.back() == '\'') { - option_value.push_back(value_part.substr(last_pos + 1, value_part.size() - last_pos - 2)); + option_value.push_back(value_part.substr(last_pos+1, value_part.size()-last_pos-2)); return true; } @@ -8340,7 +7651,8 @@ bool CConfig::TokenizeString(string& str, string& option_name, vector& o } if (option_value.empty()) { cerr << "Error in TokenizeString(): " - << "option " << option_name << " in configuration file with no value assigned." << endl; + << "option " << option_name << " in configuration file with no value assigned." + << endl; throw(-1); } @@ -8363,7 +7675,7 @@ bool CConfig::TokenizeString(string& str, string& option_name, vector& o pos = it->find(';'); if (pos != string::npos) { string before_semi = it->substr(0, pos); - string after_semi = it->substr(pos + 1, string::npos); + string after_semi= it->substr(pos+1, string::npos); if (before_semi.empty()) { *it = ";"; it++; @@ -8373,13 +7685,14 @@ bool CConfig::TokenizeString(string& str, string& option_name, vector& o it++; vector to_insert; to_insert.emplace_back(";"); - if (!after_semi.empty()) to_insert.push_back(after_semi); + if (!after_semi.empty()) + to_insert.push_back(after_semi); option_value.insert(it, to_insert.begin(), to_insert.end()); } - it = option_value.begin(); // go back to beginning; not efficient + it = option_value.begin(); // go back to beginning; not efficient continue; - } - it++; + } it++; + } #if 0 cout << "option value(s) = "; @@ -8413,13 +7726,14 @@ bool CConfig::TokenizeString(string& str, string& option_name, vector& o } unsigned short CConfig::GetMarker_CfgFile_TagBound(const string& val_marker) const { + unsigned short iMarker_CfgFile; for (iMarker_CfgFile = 0; iMarker_CfgFile < nMarker_CfgFile; iMarker_CfgFile++) { - if (Marker_CfgFile_TagBound[iMarker_CfgFile] == val_marker) return iMarker_CfgFile; + if (Marker_CfgFile_TagBound[iMarker_CfgFile] == val_marker) + return iMarker_CfgFile; } - SU2_MPI::Error(string("The configuration file doesn't have any definition for marker ") + val_marker, - CURRENT_FUNCTION); + SU2_MPI::Error(string("The configuration file doesn't have any definition for marker ") + val_marker, CURRENT_FUNCTION); return 0; } @@ -8534,7 +7848,7 @@ unsigned short CConfig::GetMarker_CfgFile_Fluid_Load(const string& val_marker) c unsigned short CConfig::GetMarker_CfgFile_PyCustom(const string& val_marker) const { unsigned short iMarker_CfgFile; - for (iMarker_CfgFile = 0; iMarker_CfgFile < nMarker_CfgFile; iMarker_CfgFile++) + for (iMarker_CfgFile=0; iMarker_CfgFile < nMarker_CfgFile; iMarker_CfgFile++) if (Marker_CfgFile_TagBound[iMarker_CfgFile] == val_marker) break; return Marker_CfgFile_PyCustom[iMarker_CfgFile]; } @@ -8561,64 +7875,70 @@ unsigned short CConfig::GetMarker_CfgFile_SobolevBC(const string& val_marker) co } bool CConfig::GetViscous_Wall(unsigned short iMarker) const { - return (Marker_All_KindBC[iMarker] == HEAT_FLUX || Marker_All_KindBC[iMarker] == ISOTHERMAL || - Marker_All_KindBC[iMarker] == HEAT_TRANSFER || Marker_All_KindBC[iMarker] == SMOLUCHOWSKI_MAXWELL || + + return (Marker_All_KindBC[iMarker] == HEAT_FLUX || + Marker_All_KindBC[iMarker] == ISOTHERMAL || + Marker_All_KindBC[iMarker] == HEAT_TRANSFER || + Marker_All_KindBC[iMarker] == SMOLUCHOWSKI_MAXWELL || Marker_All_KindBC[iMarker] == CHT_WALL_INTERFACE); } bool CConfig::GetCatalytic_Wall(unsigned short iMarker) const { + bool catalytic = false; - for (unsigned short iMarker_Catalytic = 0; iMarker_Catalytic < nWall_Catalytic; iMarker_Catalytic++) { + for (unsigned short iMarker_Catalytic = 0; iMarker_Catalytic < nWall_Catalytic; iMarker_Catalytic++){ string Catalytic_Tag = Wall_Catalytic[iMarker_Catalytic]; - if (Catalytic_Tag == Marker_All_TagBound[iMarker]) { - catalytic = true; - break; - } + if (Catalytic_Tag == Marker_All_TagBound[iMarker]) { catalytic = true; break; } } return catalytic; } bool CConfig::GetSolid_Wall(unsigned short iMarker) const { - return GetViscous_Wall(iMarker) || Marker_All_KindBC[iMarker] == EULER_WALL; + + return GetViscous_Wall(iMarker) || + Marker_All_KindBC[iMarker] == EULER_WALL; } void CConfig::SetSurface_Movement(unsigned short iMarker, unsigned short kind_movement) { + auto* new_surface_movement = new unsigned short[nMarker_Moving + 1]; - auto* new_marker_moving = new string[nMarker_Moving + 1]; + auto* new_marker_moving = new string[nMarker_Moving+1]; - for (unsigned short iMarker_Moving = 0; iMarker_Moving < nMarker_Moving; iMarker_Moving++) { + for (unsigned short iMarker_Moving = 0; iMarker_Moving < nMarker_Moving; iMarker_Moving++){ new_surface_movement[iMarker_Moving] = Kind_SurfaceMovement[iMarker_Moving]; new_marker_moving[iMarker_Moving] = Marker_Moving[iMarker_Moving]; } - if (nKind_SurfaceMovement > 0) { - delete[] Marker_Moving; - delete[] Kind_SurfaceMovement; + if (nKind_SurfaceMovement > 0){ + delete [] Marker_Moving; + delete [] Kind_SurfaceMovement; } Kind_SurfaceMovement = new_surface_movement; - Marker_Moving = new_marker_moving; + Marker_Moving = new_marker_moving; Kind_SurfaceMovement[nMarker_Moving] = kind_movement; Marker_Moving[nMarker_Moving] = Marker_All_TagBound[iMarker]; nMarker_Moving++; nKind_SurfaceMovement++; + } CConfig::~CConfig() { + unsigned long iDV, iMarker; /*--- Delete all of the option objects in the global option map ---*/ - for (auto itr = option_map.begin(); itr != option_map.end(); itr++) { + for(auto itr = option_map.begin(); itr != option_map.end(); itr++) { delete itr->second; } - delete[] TimeDOFsADER_DG; - delete[] TimeIntegrationADER_DG; - delete[] WeightsIntegrationADER_DG; + delete [] TimeDOFsADER_DG; + delete [] TimeIntegrationADER_DG; + delete [] WeightsIntegrationADER_DG; /*--- Free memory for Aeroelastic problems. ---*/ @@ -8688,12 +8008,12 @@ CConfig::~CConfig() { if (DV_Value != nullptr) { for (iDV = 0; iDV < nDV; iDV++) delete[] DV_Value[iDV]; - delete[] DV_Value; + delete [] DV_Value; } if (ParamDV != nullptr) { for (iDV = 0; iDV < nDV; iDV++) delete[] ParamDV[iDV]; - delete[] ParamDV; + delete [] ParamDV; } delete[] Exhaust_Pressure; @@ -8784,13 +8104,15 @@ CConfig::~CConfig() { delete[] Surface_IDR; if (Riemann_FlowDir != nullptr) { - for (iMarker = 0; iMarker < nMarker_Riemann; iMarker++) delete[] Riemann_FlowDir[iMarker]; - delete[] Riemann_FlowDir; + for (iMarker = 0; iMarker < nMarker_Riemann; iMarker++) + delete [] Riemann_FlowDir[iMarker]; + delete [] Riemann_FlowDir; } if (Giles_FlowDir != nullptr) { - for (iMarker = 0; iMarker < nMarker_Giles; iMarker++) delete[] Giles_FlowDir[iMarker]; - delete[] Giles_FlowDir; + for (iMarker = 0; iMarker < nMarker_Giles; iMarker++) + delete [] Giles_FlowDir[iMarker]; + delete [] Giles_FlowDir; } delete[] PlaneTag; @@ -8798,29 +8120,30 @@ CConfig::~CConfig() { /*--- Delete some arrays needed just for initializing options. ---*/ - delete[] FFDTag; - delete[] nDV_Value; + delete [] FFDTag; + delete [] nDV_Value; - delete[] Kind_Data_Riemann; - delete[] Riemann_Var1; - delete[] Riemann_Var2; - delete[] Kind_Data_Giles; - delete[] Giles_Var1; - delete[] Giles_Var2; - delete[] RelaxFactorAverage; - delete[] RelaxFactorFourier; - delete[] nSpan_iZones; + delete [] Kind_Data_Riemann; + delete [] Riemann_Var1; + delete [] Riemann_Var2; + delete [] Kind_Data_Giles; + delete [] Giles_Var1; + delete [] Giles_Var2; + delete [] RelaxFactorAverage; + delete [] RelaxFactorFourier; + delete [] nSpan_iZones; - delete[] Marker_TurboBoundIn; - delete[] Marker_TurboBoundOut; - delete[] Marker_Riemann; - delete[] Marker_Giles; + delete [] Marker_TurboBoundIn; + delete [] Marker_TurboBoundOut; + delete [] Marker_Riemann; + delete [] Marker_Giles; - delete[] nBlades; - delete[] FreeStreamTurboNormal; + delete [] nBlades; + delete [] FreeStreamTurboNormal; } string CConfig::GetFilename(string filename, const string& ext, int timeIter) const { + /*--- Remove any extension --- */ unsigned short lastindex = filename.find_last_of('.'); @@ -8831,21 +8154,22 @@ string CConfig::GetFilename(string filename, const string& ext, int timeIter) co filename = filename + string(ext); /*--- Append the zone number if multizone problems ---*/ - if (Multizone_Problem) filename = GetMultizone_FileName(filename, GetiZone(), ext); + if (Multizone_Problem) + filename = GetMultizone_FileName(filename, GetiZone(), ext); /*--- Append the zone number if multiple instance problems ---*/ - if (GetnTimeInstances() > 1) filename = GetMultiInstance_FileName(filename, GetiInst(), ext); + if (GetnTimeInstances() > 1) + filename = GetMultiInstance_FileName(filename, GetiInst(), ext); /*--- Append the iteration number for unsteady problems ---*/ - if (GetTime_Domain()) { + if (GetTime_Domain()){ filename = GetUnsteady_FileName(filename, timeIter, ext); } return filename; } -string CConfig::GetFilename_Iter(const string& filename_iter, unsigned long curInnerIter, - unsigned long curOuterIter) const { +string CConfig::GetFilename_Iter(const string& filename_iter, unsigned long curInnerIter, unsigned long curOuterIter) const { const auto iter = GetMultizone_Problem() ? curOuterIter : curInnerIter; std::stringstream iter_ss; iter_ss << filename_iter << "_" << std::setw(6) << std::setfill('0') << iter; @@ -8853,6 +8177,7 @@ string CConfig::GetFilename_Iter(const string& filename_iter, unsigned long curI } string CConfig::GetUnsteady_FileName(string val_filename, int val_iter, const string& ext) const { + string UnstExt, UnstFilename = std::move(val_filename); char buffer[50]; @@ -8868,11 +8193,12 @@ string CConfig::GetUnsteady_FileName(string val_filename, int val_iter, const st /*--- Append iteration number for unsteady cases ---*/ if (Time_Domain) { - if ((val_iter >= 0) && (val_iter < 10)) SPRINTF(buffer, "_0000%d", val_iter); - if ((val_iter >= 10) && (val_iter < 100)) SPRINTF(buffer, "_000%d", val_iter); - if ((val_iter >= 100) && (val_iter < 1000)) SPRINTF(buffer, "_00%d", val_iter); - if ((val_iter >= 1000) && (val_iter < 10000)) SPRINTF(buffer, "_0%d", val_iter); - if (val_iter >= 10000) SPRINTF(buffer, "_%d", val_iter); + + if ((val_iter >= 0) && (val_iter < 10)) SPRINTF (buffer, "_0000%d", val_iter); + if ((val_iter >= 10) && (val_iter < 100)) SPRINTF (buffer, "_000%d", val_iter); + if ((val_iter >= 100) && (val_iter < 1000)) SPRINTF (buffer, "_00%d", val_iter); + if ((val_iter >= 1000) && (val_iter < 10000)) SPRINTF (buffer, "_0%d", val_iter); + if (val_iter >= 10000) SPRINTF (buffer, "_%d", val_iter); UnstExt = string(buffer); } UnstExt += ext; @@ -8882,234 +8208,152 @@ string CConfig::GetUnsteady_FileName(string val_filename, int val_iter, const st } string CConfig::GetMultizone_FileName(string val_filename, int val_iZone, const string& ext) const { - string multizone_filename = std::move(val_filename); - char buffer[50]; - unsigned short lastindex = multizone_filename.find_last_of('.'); - multizone_filename = multizone_filename.substr(0, lastindex); + string multizone_filename = std::move(val_filename); + char buffer[50]; - if (Multizone_Problem) { - SPRINTF(buffer, "_%d", SU2_TYPE::Int(val_iZone)); - multizone_filename.append(string(buffer)); - } + unsigned short lastindex = multizone_filename.find_last_of('.'); + multizone_filename = multizone_filename.substr(0, lastindex); - multizone_filename += ext; - return multizone_filename; + if (Multizone_Problem) { + SPRINTF (buffer, "_%d", SU2_TYPE::Int(val_iZone)); + multizone_filename.append(string(buffer)); + } + + multizone_filename += ext; + return multizone_filename; } string CConfig::GetMultizone_HistoryFileName(string val_filename, int val_iZone, const string& ext) const { - string multizone_filename = std::move(val_filename); - char buffer[50]; - unsigned short lastindex = multizone_filename.find_last_of('.'); - multizone_filename = multizone_filename.substr(0, lastindex); - if (Multizone_Problem) { - SPRINTF(buffer, "_%d", SU2_TYPE::Int(val_iZone)); - multizone_filename.append(string(buffer)); - } - multizone_filename += ext; - return multizone_filename; + + string multizone_filename = std::move(val_filename); + char buffer[50]; + unsigned short lastindex = multizone_filename.find_last_of('.'); + multizone_filename = multizone_filename.substr(0, lastindex); + if (Multizone_Problem) { + SPRINTF (buffer, "_%d", SU2_TYPE::Int(val_iZone)); + multizone_filename.append(string(buffer)); + } + multizone_filename += ext; + return multizone_filename; } string CConfig::GetMultiInstance_FileName(string val_filename, int val_iInst, const string& ext) const { + string multizone_filename = std::move(val_filename); char buffer[50]; unsigned short lastindex = multizone_filename.find_last_of('.'); multizone_filename = multizone_filename.substr(0, lastindex); - SPRINTF(buffer, "_%d", SU2_TYPE::Int(val_iInst)); + SPRINTF (buffer, "_%d", SU2_TYPE::Int(val_iInst)); multizone_filename.append(string(buffer)); multizone_filename += ext; return multizone_filename; } string CConfig::GetMultiInstance_HistoryFileName(string val_filename, int val_iInst) const { + string multizone_filename = std::move(val_filename); char buffer[50]; unsigned short lastindex = multizone_filename.find_last_of('.'); multizone_filename = multizone_filename.substr(0, lastindex); - SPRINTF(buffer, "_%d", SU2_TYPE::Int(val_iInst)); + SPRINTF (buffer, "_%d", SU2_TYPE::Int(val_iInst)); multizone_filename.append(string(buffer)); return multizone_filename; } string CConfig::GetObjFunc_Extension(string val_filename) const { + string AdjExt, Filename = std::move(val_filename); if (ContinuousAdjoint || DiscreteAdjoint) { + /*--- Remove filename extension (.dat) ---*/ unsigned short lastindex = Filename.find_last_of('.'); Filename = Filename.substr(0, lastindex); - if (nObj == 1) { + if (nObj==1) { switch (Kind_ObjFunc[0]) { - case DRAG_COEFFICIENT: - AdjExt = "_cd"; - break; - case LIFT_COEFFICIENT: - AdjExt = "_cl"; - break; - case SIDEFORCE_COEFFICIENT: - AdjExt = "_csf"; - break; - case INVERSE_DESIGN_PRESSURE: - AdjExt = "_invpress"; - break; - case INVERSE_DESIGN_HEATFLUX: - AdjExt = "_invheat"; - break; - case MOMENT_X_COEFFICIENT: - AdjExt = "_cmx"; - break; - case MOMENT_Y_COEFFICIENT: - AdjExt = "_cmy"; - break; - case MOMENT_Z_COEFFICIENT: - AdjExt = "_cmz"; - break; - case EFFICIENCY: - AdjExt = "_eff"; - break; - case EQUIVALENT_AREA: - AdjExt = "_ea"; - break; - case NEARFIELD_PRESSURE: - AdjExt = "_nfp"; - break; - case FORCE_X_COEFFICIENT: - AdjExt = "_cfx"; - break; - case FORCE_Y_COEFFICIENT: - AdjExt = "_cfy"; - break; - case FORCE_Z_COEFFICIENT: - AdjExt = "_cfz"; - break; - case THRUST_COEFFICIENT: - AdjExt = "_ct"; - break; - case TORQUE_COEFFICIENT: - AdjExt = "_cq"; - break; - case TOTAL_HEATFLUX: - AdjExt = "_totheat"; - break; - case MAXIMUM_HEATFLUX: - AdjExt = "_maxheat"; - break; - case AVG_TEMPERATURE: - AdjExt = "_avtp"; - break; - case FIGURE_OF_MERIT: - AdjExt = "_merit"; - break; - case BUFFET_SENSOR: - AdjExt = "_buffet"; - break; - case SURFACE_TOTAL_PRESSURE: - AdjExt = "_pt"; - break; - case SURFACE_STATIC_PRESSURE: - AdjExt = "_pe"; - break; - case SURFACE_STATIC_TEMPERATURE: - AdjExt = "_T"; - break; - case SURFACE_MASSFLOW: - AdjExt = "_mfr"; - break; - case SURFACE_UNIFORMITY: - AdjExt = "_uniform"; - break; - case SURFACE_SECONDARY: - AdjExt = "_second"; - break; - case SURFACE_MOM_DISTORTION: - AdjExt = "_distort"; - break; - case SURFACE_SECOND_OVER_UNIFORM: - AdjExt = "_sou"; - break; - case SURFACE_PRESSURE_DROP: - AdjExt = "_dp"; - break; - case SURFACE_SPECIES_0: - AdjExt = "_avgspec0"; - break; - case SURFACE_SPECIES_VARIANCE: - AdjExt = "_specvar"; - break; - case SURFACE_MACH: - AdjExt = "_mach"; - break; - case CUSTOM_OBJFUNC: - AdjExt = "_custom"; - break; - case REFERENCE_GEOMETRY: - AdjExt = "_refgeom"; - break; - case REFERENCE_NODE: - AdjExt = "_refnode"; - break; - case VOLUME_FRACTION: - AdjExt = "_volfrac"; - break; - case TOPOL_DISCRETENESS: - AdjExt = "_topdisc"; - break; - case TOPOL_COMPLIANCE: - AdjExt = "_topcomp"; - break; - case STRESS_PENALTY: - AdjExt = "_stress"; - break; + case DRAG_COEFFICIENT: AdjExt = "_cd"; break; + case LIFT_COEFFICIENT: AdjExt = "_cl"; break; + case SIDEFORCE_COEFFICIENT: AdjExt = "_csf"; break; + case INVERSE_DESIGN_PRESSURE: AdjExt = "_invpress"; break; + case INVERSE_DESIGN_HEATFLUX: AdjExt = "_invheat"; break; + case MOMENT_X_COEFFICIENT: AdjExt = "_cmx"; break; + case MOMENT_Y_COEFFICIENT: AdjExt = "_cmy"; break; + case MOMENT_Z_COEFFICIENT: AdjExt = "_cmz"; break; + case EFFICIENCY: AdjExt = "_eff"; break; + case EQUIVALENT_AREA: AdjExt = "_ea"; break; + case NEARFIELD_PRESSURE: AdjExt = "_nfp"; break; + case FORCE_X_COEFFICIENT: AdjExt = "_cfx"; break; + case FORCE_Y_COEFFICIENT: AdjExt = "_cfy"; break; + case FORCE_Z_COEFFICIENT: AdjExt = "_cfz"; break; + case THRUST_COEFFICIENT: AdjExt = "_ct"; break; + case TORQUE_COEFFICIENT: AdjExt = "_cq"; break; + case TOTAL_HEATFLUX: AdjExt = "_totheat"; break; + case MAXIMUM_HEATFLUX: AdjExt = "_maxheat"; break; + case AVG_TEMPERATURE: AdjExt = "_avtp"; break; + case FIGURE_OF_MERIT: AdjExt = "_merit"; break; + case BUFFET_SENSOR: AdjExt = "_buffet"; break; + case SURFACE_TOTAL_PRESSURE: AdjExt = "_pt"; break; + case SURFACE_STATIC_PRESSURE: AdjExt = "_pe"; break; + case SURFACE_STATIC_TEMPERATURE: AdjExt = "_T"; break; + case SURFACE_MASSFLOW: AdjExt = "_mfr"; break; + case SURFACE_UNIFORMITY: AdjExt = "_uniform"; break; + case SURFACE_SECONDARY: AdjExt = "_second"; break; + case SURFACE_MOM_DISTORTION: AdjExt = "_distort"; break; + case SURFACE_SECOND_OVER_UNIFORM: AdjExt = "_sou"; break; + case SURFACE_PRESSURE_DROP: AdjExt = "_dp"; break; + case SURFACE_SPECIES_0: AdjExt = "_avgspec0"; break; + case SURFACE_SPECIES_VARIANCE: AdjExt = "_specvar"; break; + case SURFACE_MACH: AdjExt = "_mach"; break; + case CUSTOM_OBJFUNC: AdjExt = "_custom"; break; + case REFERENCE_GEOMETRY: AdjExt = "_refgeom"; break; + case REFERENCE_NODE: AdjExt = "_refnode"; break; + case VOLUME_FRACTION: AdjExt = "_volfrac"; break; + case TOPOL_DISCRETENESS: AdjExt = "_topdisc"; break; + case TOPOL_COMPLIANCE: AdjExt = "_topcomp"; break; + case STRESS_PENALTY: AdjExt = "_stress"; break; } - } else { + } + else{ AdjExt = "_combo"; } Filename.append(AdjExt); /*--- Lastly, add the .dat extension ---*/ Filename.append(".dat"); + } return Filename; } unsigned short CConfig::GetContainerPosition(unsigned short val_eqsystem) { + switch (val_eqsystem) { - case RUNTIME_FLOW_SYS: - return FLOW_SOL; - case RUNTIME_TURB_SYS: - return TURB_SOL; - case RUNTIME_TRANS_SYS: - return TRANS_SOL; - case RUNTIME_SPECIES_SYS: - return SPECIES_SOL; - case RUNTIME_HEAT_SYS: - return HEAT_SOL; - case RUNTIME_FEA_SYS: - return FEA_SOL; - case RUNTIME_ADJFLOW_SYS: - return ADJFLOW_SOL; - case RUNTIME_ADJTURB_SYS: - return ADJTURB_SOL; - case RUNTIME_ADJSPECIES_SYS: - return ADJSPECIES_SOL; - case RUNTIME_ADJFEA_SYS: - return ADJFEA_SOL; - case RUNTIME_RADIATION_SYS: - return RAD_SOL; - case RUNTIME_MULTIGRID_SYS: - return 0; + case RUNTIME_FLOW_SYS: return FLOW_SOL; + case RUNTIME_TURB_SYS: return TURB_SOL; + case RUNTIME_TRANS_SYS: return TRANS_SOL; + case RUNTIME_SPECIES_SYS: return SPECIES_SOL; + case RUNTIME_HEAT_SYS: return HEAT_SOL; + case RUNTIME_FEA_SYS: return FEA_SOL; + case RUNTIME_ADJFLOW_SYS: return ADJFLOW_SOL; + case RUNTIME_ADJTURB_SYS: return ADJTURB_SOL; + case RUNTIME_ADJSPECIES_SYS:return ADJSPECIES_SOL; + case RUNTIME_ADJFEA_SYS: return ADJFEA_SOL; + case RUNTIME_RADIATION_SYS: return RAD_SOL; + case RUNTIME_MULTIGRID_SYS: return 0; } return 0; } -void CConfig::SetKind_ConvNumScheme(unsigned short val_kind_convnumscheme, CENTERED val_kind_centered, - UPWIND val_kind_upwind, LIMITER val_kind_slopelimit, bool val_muscl, +void CConfig::SetKind_ConvNumScheme(unsigned short val_kind_convnumscheme, + CENTERED val_kind_centered, UPWIND val_kind_upwind, + LIMITER val_kind_slopelimit, bool val_muscl, unsigned short val_kind_fem) { Kind_ConvNumScheme = val_kind_convnumscheme; Kind_Centered = val_kind_centered; @@ -9117,19 +8361,23 @@ void CConfig::SetKind_ConvNumScheme(unsigned short val_kind_convnumscheme, CENTE Kind_FEM = val_kind_fem; Kind_SlopeLimit = val_kind_slopelimit; MUSCL = val_muscl; + } -void CConfig::SetGlobalParam(MAIN_SOLVER val_solver, unsigned short val_system) { +void CConfig::SetGlobalParam(MAIN_SOLVER val_solver, + unsigned short val_system) { + /*--- Set the simulation global time ---*/ - Current_UnstTime = static_cast(TimeIter) * Delta_UnstTime; - Current_UnstTimeND = static_cast(TimeIter) * Delta_UnstTimeND; + Current_UnstTime = static_cast(TimeIter)*Delta_UnstTime; + Current_UnstTimeND = static_cast(TimeIter)*Delta_UnstTimeND; /*--- Set the solver methods ---*/ auto SetFlowParam = [&]() { if (val_system == RUNTIME_FLOW_SYS) { - SetKind_ConvNumScheme(Kind_ConvNumScheme_Flow, Kind_Centered_Flow, Kind_Upwind_Flow, Kind_SlopeLimit_Flow, + SetKind_ConvNumScheme(Kind_ConvNumScheme_Flow, Kind_Centered_Flow, + Kind_Upwind_Flow, Kind_SlopeLimit_Flow, MUSCL_Flow, NONE); SetKind_TimeIntScheme(Kind_TimeIntScheme_Flow); } @@ -9137,7 +8385,8 @@ void CConfig::SetGlobalParam(MAIN_SOLVER val_solver, unsigned short val_system) auto SetTurbParam = [&]() { if (val_system == RUNTIME_TURB_SYS) { - SetKind_ConvNumScheme(Kind_ConvNumScheme_Turb, Kind_Centered_Turb, Kind_Upwind_Turb, Kind_SlopeLimit_Turb, + SetKind_ConvNumScheme(Kind_ConvNumScheme_Turb, Kind_Centered_Turb, + Kind_Upwind_Turb, Kind_SlopeLimit_Turb, MUSCL_Turb, NONE); SetKind_TimeIntScheme(Kind_TimeIntScheme_Turb); } @@ -9145,56 +8394,51 @@ void CConfig::SetGlobalParam(MAIN_SOLVER val_solver, unsigned short val_system) auto SetHeatParam = [&]() { if (val_system == RUNTIME_HEAT_SYS) { - SetKind_ConvNumScheme(Kind_ConvNumScheme_Heat, Kind_Centered_Heat, Kind_Upwind_Heat, Kind_SlopeLimit_Heat, - MUSCL_Heat, NONE); + SetKind_ConvNumScheme(Kind_ConvNumScheme_Heat, Kind_Centered_Heat, + Kind_Upwind_Heat, Kind_SlopeLimit_Heat, MUSCL_Heat, NONE); SetKind_TimeIntScheme(Kind_TimeIntScheme_Heat); } }; auto SetSpeciesParam = [&]() { if (val_system == RUNTIME_SPECIES_SYS) { - SetKind_ConvNumScheme(Kind_ConvNumScheme_Species, Kind_Centered_Species, Kind_Upwind_Species, - Kind_SlopeLimit_Species, MUSCL_Species, NONE); + SetKind_ConvNumScheme(Kind_ConvNumScheme_Species, Kind_Centered_Species, + Kind_Upwind_Species, Kind_SlopeLimit_Species, + MUSCL_Species, NONE); SetKind_TimeIntScheme(Kind_TimeIntScheme_Species); } }; auto SetAdjFlowParam = [&]() { if (val_system == RUNTIME_ADJFLOW_SYS) { - SetKind_ConvNumScheme(Kind_ConvNumScheme_AdjFlow, Kind_Centered_AdjFlow, Kind_Upwind_AdjFlow, - Kind_SlopeLimit_AdjFlow, MUSCL_AdjFlow, NONE); + SetKind_ConvNumScheme(Kind_ConvNumScheme_AdjFlow, Kind_Centered_AdjFlow, + Kind_Upwind_AdjFlow, Kind_SlopeLimit_AdjFlow, + MUSCL_AdjFlow, NONE); SetKind_TimeIntScheme(Kind_TimeIntScheme_AdjFlow); } }; switch (val_solver) { - case MAIN_SOLVER::EULER: - case MAIN_SOLVER::INC_EULER: - case MAIN_SOLVER::NEMO_EULER: - case MAIN_SOLVER::DISC_ADJ_EULER: - case MAIN_SOLVER::DISC_ADJ_INC_EULER: + case MAIN_SOLVER::EULER: case MAIN_SOLVER::INC_EULER: case MAIN_SOLVER::NEMO_EULER: + case MAIN_SOLVER::DISC_ADJ_EULER: case MAIN_SOLVER::DISC_ADJ_INC_EULER: SetFlowParam(); break; - case MAIN_SOLVER::NAVIER_STOKES: - case MAIN_SOLVER::INC_NAVIER_STOKES: - case MAIN_SOLVER::NEMO_NAVIER_STOKES: - case MAIN_SOLVER::DISC_ADJ_NAVIER_STOKES: - case MAIN_SOLVER::DISC_ADJ_INC_NAVIER_STOKES: + case MAIN_SOLVER::NAVIER_STOKES: case MAIN_SOLVER::INC_NAVIER_STOKES: case MAIN_SOLVER::NEMO_NAVIER_STOKES: + case MAIN_SOLVER::DISC_ADJ_NAVIER_STOKES: case MAIN_SOLVER::DISC_ADJ_INC_NAVIER_STOKES: SetFlowParam(); SetSpeciesParam(); SetHeatParam(); break; - case MAIN_SOLVER::RANS: - case MAIN_SOLVER::INC_RANS: - case MAIN_SOLVER::DISC_ADJ_RANS: - case MAIN_SOLVER::DISC_ADJ_INC_RANS: + case MAIN_SOLVER::RANS: case MAIN_SOLVER::INC_RANS: + case MAIN_SOLVER::DISC_ADJ_RANS: case MAIN_SOLVER::DISC_ADJ_INC_RANS: SetFlowParam(); SetTurbParam(); SetSpeciesParam(); SetHeatParam(); if (val_system == RUNTIME_TRANS_SYS) { - SetKind_ConvNumScheme(Kind_ConvNumScheme_Turb, Kind_Centered_Turb, Kind_Upwind_Turb, Kind_SlopeLimit_Turb, + SetKind_ConvNumScheme(Kind_ConvNumScheme_Turb, Kind_Centered_Turb, + Kind_Upwind_Turb, Kind_SlopeLimit_Turb, MUSCL_Turb, NONE); SetKind_TimeIntScheme(Kind_TimeIntScheme_Turb); } @@ -9207,7 +8451,8 @@ void CConfig::SetGlobalParam(MAIN_SOLVER val_solver, unsigned short val_system) case MAIN_SOLVER::DISC_ADJ_FEM_NS: case MAIN_SOLVER::DISC_ADJ_FEM_RANS: if (val_system == RUNTIME_FLOW_SYS) { - SetKind_ConvNumScheme(Kind_ConvNumScheme_FEM_Flow, Kind_Centered_Flow, Kind_Upwind_Flow, Kind_SlopeLimit_Flow, + SetKind_ConvNumScheme(Kind_ConvNumScheme_FEM_Flow, Kind_Centered_Flow, + Kind_Upwind_Flow, Kind_SlopeLimit_Flow, MUSCL_Flow, Kind_FEM_Flow); SetKind_TimeIntScheme(Kind_TimeIntScheme_FEM_Flow); } @@ -9223,8 +8468,9 @@ void CConfig::SetGlobalParam(MAIN_SOLVER val_solver, unsigned short val_system) SetAdjFlowParam(); if (val_system == RUNTIME_ADJTURB_SYS) { - SetKind_ConvNumScheme(Kind_ConvNumScheme_AdjTurb, Kind_Centered_AdjTurb, Kind_Upwind_AdjTurb, - Kind_SlopeLimit_AdjTurb, MUSCL_AdjTurb, NONE); + SetKind_ConvNumScheme(Kind_ConvNumScheme_AdjTurb, Kind_Centered_AdjTurb, + Kind_Upwind_AdjTurb, Kind_SlopeLimit_AdjTurb, + MUSCL_AdjTurb, NONE); SetKind_TimeIntScheme(Kind_TimeIntScheme_AdjTurb); } break; @@ -9291,115 +8537,113 @@ unsigned short CConfig::GetMarker_Periodic_Donor(const string& val_marker) const su2double CConfig::GetActDisk_NetThrust(const string& val_marker) const { unsigned short iMarker_ActDisk; for (iMarker_ActDisk = 0; iMarker_ActDisk < nMarker_ActDiskInlet; iMarker_ActDisk++) - if ((Marker_ActDiskInlet[iMarker_ActDisk] == val_marker) || (Marker_ActDiskOutlet[iMarker_ActDisk] == val_marker)) - break; + if ((Marker_ActDiskInlet[iMarker_ActDisk] == val_marker) || + (Marker_ActDiskOutlet[iMarker_ActDisk] == val_marker)) break; return ActDisk_NetThrust[iMarker_ActDisk]; } su2double CConfig::GetActDisk_Power(const string& val_marker) const { unsigned short iMarker_ActDisk; for (iMarker_ActDisk = 0; iMarker_ActDisk < nMarker_ActDiskInlet; iMarker_ActDisk++) - if ((Marker_ActDiskInlet[iMarker_ActDisk] == val_marker) || (Marker_ActDiskOutlet[iMarker_ActDisk] == val_marker)) - break; + if ((Marker_ActDiskInlet[iMarker_ActDisk] == val_marker) || + (Marker_ActDiskOutlet[iMarker_ActDisk] == val_marker)) break; return ActDisk_Power[iMarker_ActDisk]; } su2double CConfig::GetActDisk_MassFlow(const string& val_marker) const { unsigned short iMarker_ActDisk; for (iMarker_ActDisk = 0; iMarker_ActDisk < nMarker_ActDiskInlet; iMarker_ActDisk++) - if ((Marker_ActDiskInlet[iMarker_ActDisk] == val_marker) || (Marker_ActDiskOutlet[iMarker_ActDisk] == val_marker)) - break; + if ((Marker_ActDiskInlet[iMarker_ActDisk] == val_marker) || + (Marker_ActDiskOutlet[iMarker_ActDisk] == val_marker)) break; return ActDisk_MassFlow[iMarker_ActDisk]; } su2double CConfig::GetActDisk_Mach(const string& val_marker) const { unsigned short iMarker_ActDisk; for (iMarker_ActDisk = 0; iMarker_ActDisk < nMarker_ActDiskInlet; iMarker_ActDisk++) - if ((Marker_ActDiskInlet[iMarker_ActDisk] == val_marker) || (Marker_ActDiskOutlet[iMarker_ActDisk] == val_marker)) - break; + if ((Marker_ActDiskInlet[iMarker_ActDisk] == val_marker) || + (Marker_ActDiskOutlet[iMarker_ActDisk] == val_marker)) break; return ActDisk_Mach[iMarker_ActDisk]; } su2double CConfig::GetActDisk_Force(const string& val_marker) const { unsigned short iMarker_ActDisk; for (iMarker_ActDisk = 0; iMarker_ActDisk < nMarker_ActDiskInlet; iMarker_ActDisk++) - if ((Marker_ActDiskInlet[iMarker_ActDisk] == val_marker) || (Marker_ActDiskOutlet[iMarker_ActDisk] == val_marker)) - break; + if ((Marker_ActDiskInlet[iMarker_ActDisk] == val_marker) || + (Marker_ActDiskOutlet[iMarker_ActDisk] == val_marker)) break; return ActDisk_Force[iMarker_ActDisk]; } su2double CConfig::GetActDisk_BCThrust(const string& val_marker) const { unsigned short iMarker_ActDisk; for (iMarker_ActDisk = 0; iMarker_ActDisk < nMarker_ActDiskInlet; iMarker_ActDisk++) - if ((Marker_ActDiskInlet[iMarker_ActDisk] == val_marker) || (Marker_ActDiskOutlet[iMarker_ActDisk] == val_marker)) - break; + if ((Marker_ActDiskInlet[iMarker_ActDisk] == val_marker) || + (Marker_ActDiskOutlet[iMarker_ActDisk] == val_marker)) break; return ActDisk_BCThrust[iMarker_ActDisk]; } su2double CConfig::GetActDisk_BCThrust_Old(const string& val_marker) const { unsigned short iMarker_ActDisk; for (iMarker_ActDisk = 0; iMarker_ActDisk < nMarker_ActDiskInlet; iMarker_ActDisk++) - if ((Marker_ActDiskInlet[iMarker_ActDisk] == val_marker) || (Marker_ActDiskOutlet[iMarker_ActDisk] == val_marker)) - break; + if ((Marker_ActDiskInlet[iMarker_ActDisk] == val_marker) || + (Marker_ActDiskOutlet[iMarker_ActDisk] == val_marker)) break; return ActDisk_BCThrust_Old[iMarker_ActDisk]; } void CConfig::SetActDisk_BCThrust(const string& val_marker, su2double val_actdisk_bcthrust) { unsigned short iMarker_ActDisk; for (iMarker_ActDisk = 0; iMarker_ActDisk < nMarker_ActDiskInlet; iMarker_ActDisk++) - if ((Marker_ActDiskInlet[iMarker_ActDisk] == val_marker) || (Marker_ActDiskOutlet[iMarker_ActDisk] == val_marker)) - break; + if ((Marker_ActDiskInlet[iMarker_ActDisk] == val_marker) || + (Marker_ActDiskOutlet[iMarker_ActDisk] == val_marker)) break; ActDisk_BCThrust[iMarker_ActDisk] = val_actdisk_bcthrust; } void CConfig::SetActDisk_BCThrust_Old(const string& val_marker, su2double val_actdisk_bcthrust_old) { unsigned short iMarker_ActDisk; for (iMarker_ActDisk = 0; iMarker_ActDisk < nMarker_ActDiskInlet; iMarker_ActDisk++) - if ((Marker_ActDiskInlet[iMarker_ActDisk] == val_marker) || (Marker_ActDiskOutlet[iMarker_ActDisk] == val_marker)) - break; + if ((Marker_ActDiskInlet[iMarker_ActDisk] == val_marker) || + (Marker_ActDiskOutlet[iMarker_ActDisk] == val_marker)) break; ActDisk_BCThrust_Old[iMarker_ActDisk] = val_actdisk_bcthrust_old; } su2double CConfig::GetActDisk_Area(const string& val_marker) const { unsigned short iMarker_ActDisk; for (iMarker_ActDisk = 0; iMarker_ActDisk < nMarker_ActDiskInlet; iMarker_ActDisk++) - if ((Marker_ActDiskInlet[iMarker_ActDisk] == val_marker) || (Marker_ActDiskOutlet[iMarker_ActDisk] == val_marker)) - break; + if ((Marker_ActDiskInlet[iMarker_ActDisk] == val_marker) || + (Marker_ActDiskOutlet[iMarker_ActDisk] == val_marker)) break; return ActDisk_Area[iMarker_ActDisk]; } su2double CConfig::GetActDisk_ReverseMassFlow(const string& val_marker) const { unsigned short iMarker_ActDisk; for (iMarker_ActDisk = 0; iMarker_ActDisk < nMarker_ActDiskInlet; iMarker_ActDisk++) - if ((Marker_ActDiskInlet[iMarker_ActDisk] == val_marker) || (Marker_ActDiskOutlet[iMarker_ActDisk] == val_marker)) - break; + if ((Marker_ActDiskInlet[iMarker_ActDisk] == val_marker) || + (Marker_ActDiskOutlet[iMarker_ActDisk] == val_marker)) break; return ActDisk_ReverseMassFlow[iMarker_ActDisk]; } su2double CConfig::GetActDisk_PressJump(const string& val_marker, unsigned short val_value) const { unsigned short iMarker_ActDisk; for (iMarker_ActDisk = 0; iMarker_ActDisk < nMarker_ActDiskInlet; iMarker_ActDisk++) - if ((Marker_ActDiskInlet[iMarker_ActDisk] == val_marker) || (Marker_ActDiskOutlet[iMarker_ActDisk] == val_marker)) - break; + if ((Marker_ActDiskInlet[iMarker_ActDisk] == val_marker) || + (Marker_ActDiskOutlet[iMarker_ActDisk] == val_marker)) break; return ActDisk_PressJump[iMarker_ActDisk][val_value]; } su2double CConfig::GetActDisk_TempJump(const string& val_marker, unsigned short val_value) const { unsigned short iMarker_ActDisk; for (iMarker_ActDisk = 0; iMarker_ActDisk < nMarker_ActDiskInlet; iMarker_ActDisk++) - if ((Marker_ActDiskInlet[iMarker_ActDisk] == val_marker) || (Marker_ActDiskOutlet[iMarker_ActDisk] == val_marker)) - break; - return ActDisk_TempJump[iMarker_ActDisk][val_value]; - ; + if ((Marker_ActDiskInlet[iMarker_ActDisk] == val_marker) || + (Marker_ActDiskOutlet[iMarker_ActDisk] == val_marker)) break; + return ActDisk_TempJump[iMarker_ActDisk][val_value];; } su2double CConfig::GetActDisk_Omega(const string& val_marker, unsigned short val_value) const { unsigned short iMarker_ActDisk; for (iMarker_ActDisk = 0; iMarker_ActDisk < nMarker_ActDiskInlet; iMarker_ActDisk++) - if ((Marker_ActDiskInlet[iMarker_ActDisk] == val_marker) || (Marker_ActDiskOutlet[iMarker_ActDisk] == val_marker)) - break; - return ActDisk_Omega[iMarker_ActDisk][val_value]; - ; + if ((Marker_ActDiskInlet[iMarker_ActDisk] == val_marker) || + (Marker_ActDiskOutlet[iMarker_ActDisk] == val_marker)) break; + return ActDisk_Omega[iMarker_ActDisk][val_value];; } su2double CConfig::GetOutlet_MassFlow(const string& val_marker) const { @@ -9458,21 +8702,24 @@ unsigned short CConfig::GetMarker_CfgFile_EngineExhaust(const string& val_marker bool CConfig::GetVolumetric_Movement() const { bool volumetric_movement = false; - if (GetSurface_Movement(AEROELASTIC) || GetSurface_Movement(AEROELASTIC_RIGID_MOTION) || - GetSurface_Movement(EXTERNAL) || GetSurface_Movement(EXTERNAL_ROTATION)) { + if (GetSurface_Movement(AEROELASTIC) || + GetSurface_Movement(AEROELASTIC_RIGID_MOTION)|| + GetSurface_Movement(EXTERNAL) || + GetSurface_Movement(EXTERNAL_ROTATION)){ volumetric_movement = true; } - if (Kind_SU2 == SU2_COMPONENT::SU2_DEF || Kind_SU2 == SU2_COMPONENT::SU2_DOT || DirectDiff) { - volumetric_movement = true; - } + if (Kind_SU2 == SU2_COMPONENT::SU2_DEF || + Kind_SU2 == SU2_COMPONENT::SU2_DOT || + DirectDiff) + { volumetric_movement = true;} return volumetric_movement; } bool CConfig::GetSurface_Movement(unsigned short kind_movement) const { - for (unsigned short iMarkerMoving = 0; iMarkerMoving < nKind_SurfaceMovement; iMarkerMoving++) { - if (Kind_SurfaceMovement[iMarkerMoving] == kind_movement) { + for (unsigned short iMarkerMoving = 0; iMarkerMoving < nKind_SurfaceMovement; iMarkerMoving++){ + if (Kind_SurfaceMovement[iMarkerMoving] == kind_movement){ return true; } } @@ -9574,7 +8821,8 @@ su2double CConfig::GetInlet_Ptotal(const string& val_marker) const { void CConfig::SetInlet_Ptotal(su2double val_pressure, const string& val_marker) { unsigned short iMarker_Inlet; for (iMarker_Inlet = 0; iMarker_Inlet < nMarker_Inlet; iMarker_Inlet++) - if (Marker_Inlet[iMarker_Inlet] == val_marker) Inlet_Ptotal[iMarker_Inlet] = val_pressure; + if (Marker_Inlet[iMarker_Inlet] == val_marker) + Inlet_Ptotal[iMarker_Inlet] = val_pressure; } const su2double* CConfig::GetInlet_FlowDir(const string& val_marker) const { @@ -9633,7 +8881,8 @@ su2double CConfig::GetOutlet_Pressure(const string& val_marker) const { void CConfig::SetOutlet_Pressure(su2double val_pressure, const string& val_marker) { unsigned short iMarker_Outlet; for (iMarker_Outlet = 0; iMarker_Outlet < nMarker_Outlet; iMarker_Outlet++) - if (Marker_Outlet[iMarker_Outlet] == val_marker) Outlet_Pressure[iMarker_Outlet] = val_pressure; + if (Marker_Outlet[iMarker_Outlet] == val_marker) + Outlet_Pressure[iMarker_Outlet] = val_pressure; } su2double CConfig::GetRiemann_Var1(const string& val_marker) const { @@ -9716,31 +8965,29 @@ unsigned short CConfig::GetKind_Data_Giles(const string& val_marker) const { su2double CConfig::GetPressureOut_BC() const { unsigned short iMarker_BC; su2double pres_out = 0.0; - for (iMarker_BC = 0; iMarker_BC < nMarker_Giles; iMarker_BC++) { - if (Kind_Data_Giles[iMarker_BC] == STATIC_PRESSURE || Kind_Data_Giles[iMarker_BC] == STATIC_PRESSURE_1D || - Kind_Data_Giles[iMarker_BC] == RADIAL_EQUILIBRIUM) { + for (iMarker_BC = 0; iMarker_BC < nMarker_Giles; iMarker_BC++){ + if (Kind_Data_Giles[iMarker_BC] == STATIC_PRESSURE || Kind_Data_Giles[iMarker_BC] == STATIC_PRESSURE_1D || Kind_Data_Giles[iMarker_BC] == RADIAL_EQUILIBRIUM ){ pres_out = Giles_Var1[iMarker_BC]; } } - for (iMarker_BC = 0; iMarker_BC < nMarker_Riemann; iMarker_BC++) { - if (Kind_Data_Riemann[iMarker_BC] == STATIC_PRESSURE || Kind_Data_Riemann[iMarker_BC] == RADIAL_EQUILIBRIUM) { + for (iMarker_BC = 0; iMarker_BC < nMarker_Riemann; iMarker_BC++){ + if (Kind_Data_Riemann[iMarker_BC] == STATIC_PRESSURE || Kind_Data_Riemann[iMarker_BC] == RADIAL_EQUILIBRIUM){ pres_out = Riemann_Var1[iMarker_BC]; } } - return pres_out / Pressure_Ref; + return pres_out/Pressure_Ref; } void CConfig::SetPressureOut_BC(su2double val_press) { unsigned short iMarker_BC; - for (iMarker_BC = 0; iMarker_BC < nMarker_Giles; iMarker_BC++) { - if (Kind_Data_Giles[iMarker_BC] == STATIC_PRESSURE || Kind_Data_Giles[iMarker_BC] == STATIC_PRESSURE_1D || - Kind_Data_Giles[iMarker_BC] == RADIAL_EQUILIBRIUM) { - Giles_Var1[iMarker_BC] = val_press * Pressure_Ref; + for (iMarker_BC = 0; iMarker_BC < nMarker_Giles; iMarker_BC++){ + if (Kind_Data_Giles[iMarker_BC] == STATIC_PRESSURE || Kind_Data_Giles[iMarker_BC] == STATIC_PRESSURE_1D || Kind_Data_Giles[iMarker_BC] == RADIAL_EQUILIBRIUM ){ + Giles_Var1[iMarker_BC] = val_press*Pressure_Ref; } } - for (iMarker_BC = 0; iMarker_BC < nMarker_Riemann; iMarker_BC++) { - if (Kind_Data_Riemann[iMarker_BC] == STATIC_PRESSURE || Kind_Data_Riemann[iMarker_BC] == RADIAL_EQUILIBRIUM) { - Riemann_Var1[iMarker_BC] = val_press * Pressure_Ref; + for (iMarker_BC = 0; iMarker_BC < nMarker_Riemann; iMarker_BC++){ + if (Kind_Data_Riemann[iMarker_BC] == STATIC_PRESSURE || Kind_Data_Riemann[iMarker_BC] == RADIAL_EQUILIBRIUM){ + Riemann_Var1[iMarker_BC] = val_press*Pressure_Ref; } } } @@ -9748,159 +8995,175 @@ void CConfig::SetPressureOut_BC(su2double val_press) { su2double CConfig::GetTotalPressureIn_BC() const { unsigned short iMarker_BC; su2double tot_pres_in = 0.0; - for (iMarker_BC = 0; iMarker_BC < nMarker_Giles; iMarker_BC++) { - if (Kind_Data_Giles[iMarker_BC] == TOTAL_CONDITIONS_PT || Kind_Data_Giles[iMarker_BC] == TOTAL_CONDITIONS_PT_1D) { + for (iMarker_BC = 0; iMarker_BC < nMarker_Giles; iMarker_BC++){ + if (Kind_Data_Giles[iMarker_BC] == TOTAL_CONDITIONS_PT || Kind_Data_Giles[iMarker_BC] == TOTAL_CONDITIONS_PT_1D){ tot_pres_in = Giles_Var1[iMarker_BC]; } } - for (iMarker_BC = 0; iMarker_BC < nMarker_Riemann; iMarker_BC++) { - if (Kind_Data_Riemann[iMarker_BC] == TOTAL_CONDITIONS_PT) { + for (iMarker_BC = 0; iMarker_BC < nMarker_Riemann; iMarker_BC++){ + if (Kind_Data_Riemann[iMarker_BC] == TOTAL_CONDITIONS_PT ){ tot_pres_in = Riemann_Var1[iMarker_BC]; } } - if (nMarker_Inlet == 1 && Kind_Inlet == INLET_TYPE::TOTAL_CONDITIONS) { + if(nMarker_Inlet == 1 && Kind_Inlet == INLET_TYPE::TOTAL_CONDITIONS){ tot_pres_in = Inlet_Ptotal[0]; } - return tot_pres_in / Pressure_Ref; + return tot_pres_in/Pressure_Ref; } su2double CConfig::GetTotalTemperatureIn_BC() const { unsigned short iMarker_BC; su2double tot_temp_in = 0.0; - for (iMarker_BC = 0; iMarker_BC < nMarker_Giles; iMarker_BC++) { - if (Kind_Data_Giles[iMarker_BC] == TOTAL_CONDITIONS_PT || Kind_Data_Giles[iMarker_BC] == TOTAL_CONDITIONS_PT_1D) { + for (iMarker_BC = 0; iMarker_BC < nMarker_Giles; iMarker_BC++){ + if (Kind_Data_Giles[iMarker_BC] == TOTAL_CONDITIONS_PT || Kind_Data_Giles[iMarker_BC] == TOTAL_CONDITIONS_PT_1D){ tot_temp_in = Giles_Var2[iMarker_BC]; } } - for (iMarker_BC = 0; iMarker_BC < nMarker_Riemann; iMarker_BC++) { - if (Kind_Data_Riemann[iMarker_BC] == TOTAL_CONDITIONS_PT) { + for (iMarker_BC = 0; iMarker_BC < nMarker_Riemann; iMarker_BC++){ + if (Kind_Data_Riemann[iMarker_BC] == TOTAL_CONDITIONS_PT ){ tot_temp_in = Riemann_Var2[iMarker_BC]; } } - if (nMarker_Inlet == 1 && Kind_Inlet == INLET_TYPE::TOTAL_CONDITIONS) { + if(nMarker_Inlet == 1 && Kind_Inlet == INLET_TYPE::TOTAL_CONDITIONS){ tot_temp_in = Inlet_Ttotal[0]; } - return tot_temp_in / Temperature_Ref; + return tot_temp_in/Temperature_Ref; } void CConfig::SetTotalTemperatureIn_BC(su2double val_temp) { unsigned short iMarker_BC; - for (iMarker_BC = 0; iMarker_BC < nMarker_Giles; iMarker_BC++) { - if (Kind_Data_Giles[iMarker_BC] == TOTAL_CONDITIONS_PT || Kind_Data_Giles[iMarker_BC] == TOTAL_CONDITIONS_PT_1D) { - Giles_Var2[iMarker_BC] = val_temp * Temperature_Ref; + for (iMarker_BC = 0; iMarker_BC < nMarker_Giles; iMarker_BC++){ + if (Kind_Data_Giles[iMarker_BC] == TOTAL_CONDITIONS_PT || Kind_Data_Giles[iMarker_BC] == TOTAL_CONDITIONS_PT_1D){ + Giles_Var2[iMarker_BC] = val_temp*Temperature_Ref; } } - for (iMarker_BC = 0; iMarker_BC < nMarker_Riemann; iMarker_BC++) { - if (Kind_Data_Riemann[iMarker_BC] == TOTAL_CONDITIONS_PT) { - Riemann_Var2[iMarker_BC] = val_temp * Temperature_Ref; + for (iMarker_BC = 0; iMarker_BC < nMarker_Riemann; iMarker_BC++){ + if (Kind_Data_Riemann[iMarker_BC] == TOTAL_CONDITIONS_PT ){ + Riemann_Var2[iMarker_BC] = val_temp*Temperature_Ref; } } - if (nMarker_Inlet == 1 && Kind_Inlet == INLET_TYPE::TOTAL_CONDITIONS) { - Inlet_Ttotal[0] = val_temp * Temperature_Ref; + if(nMarker_Inlet == 1 && Kind_Inlet == INLET_TYPE::TOTAL_CONDITIONS){ + Inlet_Ttotal[0] = val_temp*Temperature_Ref; } } su2double CConfig::GetFlowAngleIn_BC() const { unsigned short iMarker_BC; su2double alpha_in = 0.0; - for (iMarker_BC = 0; iMarker_BC < nMarker_Giles; iMarker_BC++) { - if (Kind_Data_Giles[iMarker_BC] == TOTAL_CONDITIONS_PT || Kind_Data_Giles[iMarker_BC] == TOTAL_CONDITIONS_PT_1D) { - alpha_in = atan(Giles_FlowDir[iMarker_BC][1] / Giles_FlowDir[iMarker_BC][0]); + for (iMarker_BC = 0; iMarker_BC < nMarker_Giles; iMarker_BC++){ + if (Kind_Data_Giles[iMarker_BC] == TOTAL_CONDITIONS_PT || Kind_Data_Giles[iMarker_BC] == TOTAL_CONDITIONS_PT_1D){ + alpha_in = atan(Giles_FlowDir[iMarker_BC][1]/Giles_FlowDir[iMarker_BC][0]); } } - for (iMarker_BC = 0; iMarker_BC < nMarker_Riemann; iMarker_BC++) { - if (Kind_Data_Riemann[iMarker_BC] == TOTAL_CONDITIONS_PT) { - alpha_in = atan(Riemann_FlowDir[iMarker_BC][1] / Riemann_FlowDir[iMarker_BC][0]); + for (iMarker_BC = 0; iMarker_BC < nMarker_Riemann; iMarker_BC++){ + if (Kind_Data_Riemann[iMarker_BC] == TOTAL_CONDITIONS_PT ){ + alpha_in = atan(Riemann_FlowDir[iMarker_BC][1]/Riemann_FlowDir[iMarker_BC][0]); } } - if (nMarker_Inlet == 1 && Kind_Inlet == INLET_TYPE::TOTAL_CONDITIONS) { - alpha_in = atan(Inlet_FlowDir[0][1] / Inlet_FlowDir[0][0]); + if(nMarker_Inlet == 1 && Kind_Inlet == INLET_TYPE::TOTAL_CONDITIONS){ + alpha_in = atan(Inlet_FlowDir[0][1]/Inlet_FlowDir[0][0]); } return alpha_in; } su2double CConfig::GetIncInlet_BC() const { + su2double val_out = 0.0; if (nMarker_Inlet > 0) { if (Kind_Inc_Inlet[0] == INLET_TYPE::VELOCITY_INLET) - val_out = Inlet_Ptotal[0] / Velocity_Ref; + val_out = Inlet_Ptotal[0]/Velocity_Ref; else if (Kind_Inc_Inlet[0] == INLET_TYPE::PRESSURE_INLET) - val_out = Inlet_Ptotal[0] / Pressure_Ref; + val_out = Inlet_Ptotal[0]/Pressure_Ref; } return val_out; } void CConfig::SetIncInlet_BC(su2double val_in) { + if (nMarker_Inlet > 0) { if (Kind_Inc_Inlet[0] == INLET_TYPE::VELOCITY_INLET) - Inlet_Ptotal[0] = val_in * Velocity_Ref; + Inlet_Ptotal[0] = val_in*Velocity_Ref; else if (Kind_Inc_Inlet[0] == INLET_TYPE::PRESSURE_INLET) - Inlet_Ptotal[0] = val_in * Pressure_Ref; + Inlet_Ptotal[0] = val_in*Pressure_Ref; } } su2double CConfig::GetIncTemperature_BC() const { + su2double val_out = 0.0; - if (nMarker_Inlet > 0) val_out = Inlet_Ttotal[0] / Temperature_Ref; + if (nMarker_Inlet > 0) + val_out = Inlet_Ttotal[0]/Temperature_Ref; return val_out; } void CConfig::SetIncTemperature_BC(su2double val_temperature) { - if (nMarker_Inlet > 0) Inlet_Ttotal[0] = val_temperature * Temperature_Ref; + if (nMarker_Inlet > 0) + Inlet_Ttotal[0] = val_temperature*Temperature_Ref; } su2double CConfig::GetIncPressureOut_BC() const { + su2double pressure_out = 0.0; - if (nMarker_FarField > 0) { + if (nMarker_FarField > 0){ pressure_out = Pressure_FreeStreamND; } else if (nMarker_Outlet > 0) { - pressure_out = Outlet_Pressure[0] / Pressure_Ref; + pressure_out = Outlet_Pressure[0]/Pressure_Ref; } return pressure_out; } void CConfig::SetIncPressureOut_BC(su2double val_pressure) { - if (nMarker_FarField > 0) { + + if (nMarker_FarField > 0){ Pressure_FreeStreamND = val_pressure; } else if (nMarker_Outlet > 0) { - Outlet_Pressure[0] = val_pressure * Pressure_Ref; + Outlet_Pressure[0] = val_pressure*Pressure_Ref; } + } su2double CConfig::GetIsothermal_Temperature(const string& val_marker) const { + for (unsigned short iMarker_Isothermal = 0; iMarker_Isothermal < nMarker_Isothermal; iMarker_Isothermal++) - if (Marker_Isothermal[iMarker_Isothermal] == val_marker) return Isothermal_Temperature[iMarker_Isothermal]; + if (Marker_Isothermal[iMarker_Isothermal] == val_marker) + return Isothermal_Temperature[iMarker_Isothermal]; return Isothermal_Temperature[0]; } su2double CConfig::GetWall_HeatFlux(const string& val_marker) const { + for (unsigned short iMarker_HeatFlux = 0; iMarker_HeatFlux < nMarker_HeatFlux; iMarker_HeatFlux++) - if (Marker_HeatFlux[iMarker_HeatFlux] == val_marker) return Heat_Flux[iMarker_HeatFlux]; + if (Marker_HeatFlux[iMarker_HeatFlux] == val_marker) + return Heat_Flux[iMarker_HeatFlux]; return Heat_Flux[0]; } su2double CConfig::GetWall_HeatTransfer_Coefficient(const string& val_marker) const { + for (unsigned short iMarker_HeatTransfer = 0; iMarker_HeatTransfer < nMarker_HeatTransfer; iMarker_HeatTransfer++) - if (Marker_HeatTransfer[iMarker_HeatTransfer] == val_marker) return HeatTransfer_Coeff[iMarker_HeatTransfer]; + if (Marker_HeatTransfer[iMarker_HeatTransfer] == val_marker) + return HeatTransfer_Coeff[iMarker_HeatTransfer]; return HeatTransfer_Coeff[0]; } su2double CConfig::GetWall_HeatTransfer_Temperature(const string& val_marker) const { + for (unsigned short iMarker_HeatTransfer = 0; iMarker_HeatTransfer < nMarker_HeatTransfer; iMarker_HeatTransfer++) - if (Marker_HeatTransfer[iMarker_HeatTransfer] == val_marker) return HeatTransfer_WallTemp[iMarker_HeatTransfer]; + if (Marker_HeatTransfer[iMarker_HeatTransfer] == val_marker) + return HeatTransfer_WallTemp[iMarker_HeatTransfer]; return HeatTransfer_WallTemp[0]; } @@ -9917,10 +9180,11 @@ pair CConfig::GetWallRoughnessProperties(const string& val } WALL_FUNCTIONS CConfig::GetWallFunction_Treatment(const string& val_marker) const { + WALL_FUNCTIONS WallFunction = WALL_FUNCTIONS::NONE; - for (unsigned short iMarker = 0; iMarker < nMarker_WallFunctions; iMarker++) { - if (Marker_WallFunctions[iMarker] == val_marker) { + for(unsigned short iMarker=0; iMarker 0) { @@ -10275,6 +9540,7 @@ su2double CConfig::GetWall_Emissivity(const string& val_marker) const { } bool CConfig::GetMarker_StrongBC(const string& val_marker) const { + unsigned short iMarker_StrongBC = 0; for (iMarker_StrongBC = 0; iMarker_StrongBC < nMarker_StrongBC; iMarker_StrongBC++) @@ -10284,9 +9550,10 @@ bool CConfig::GetMarker_StrongBC(const string& val_marker) const { } short CConfig::FindInterfaceMarker(unsigned short iInterface) const { + /*--- The names of the two markers that form the interface. ---*/ - const auto& sideA = Marker_ZoneInterface[2 * iInterface]; - const auto& sideB = Marker_ZoneInterface[2 * iInterface + 1]; + const auto& sideA = Marker_ZoneInterface[2*iInterface]; + const auto& sideB = Marker_ZoneInterface[2*iInterface+1]; for (unsigned short iMarker = 0; iMarker < nMarker_All; iMarker++) { /*--- If the marker is sideA or sideB of the interface (order does not matter). ---*/ const auto& tag = Marker_All_TagBound[iMarker]; @@ -10295,13 +9562,16 @@ short CConfig::FindInterfaceMarker(unsigned short iInterface) const { return -1; } -void CConfig::Tick(double* val_start_time) { +void CConfig::Tick(double *val_start_time) { + #ifdef PROFILE *val_start_time = SU2_MPI::Wtime(); #endif + } void CConfig::Tock(double val_start_time, const string& val_function_name, int val_group_id) { + #ifdef PROFILE double val_stop_time = 0.0, val_elapsed_time = 0.0; @@ -10317,9 +9587,11 @@ void CConfig::Tock(double val_start_time, const string& val_function_name, int v Profile_ID_tp.push_back(val_group_id); #endif + } void CConfig::SetProfilingCSV() { + #ifdef PROFILE int rank = MASTER_NODE; @@ -10337,18 +9609,21 @@ void CConfig::SetProfilingCSV() { min and max values for each function. ---*/ for (unsigned int i = 0; i < Profile_Function_tp.size(); i++) { + /*--- Add the function and initialize if not already stored (the ID only needs to be stored the first time).---*/ if (Profile_Map_tp.find(Profile_Function_tp[i]) == Profile_Map_tp.end()) { - vector profile; - profile.push_back(i); - Profile_Map_tp.insert(pair >(Profile_Function_tp[i], profile)); + + vector profile; profile.push_back(i); + Profile_Map_tp.insert(pair >(Profile_Function_tp[i],profile)); } else { + /*--- This function has already been added, so simply increment the number of calls and total time for this function. ---*/ Profile_Map_tp[Profile_Function_tp[i]].push_back(i); + } } @@ -10356,31 +9631,33 @@ void CConfig::SetProfilingCSV() { each function and store the min/max times. ---*/ int map_size = 0; - for (map >::iterator it = Profile_Map_tp.begin(); it != Profile_Map_tp.end(); ++it) { + for (map >::iterator it=Profile_Map_tp.begin(); it!=Profile_Map_tp.end(); ++it) { map_size++; } /*--- Allocate and initialize memory ---*/ double *l_min_red = NULL, *l_max_red = NULL, *l_tot_red = NULL, *l_avg_red = NULL; - int* n_calls_red = NULL; + int *n_calls_red = NULL; double* l_min = new double[map_size]; double* l_max = new double[map_size]; double* l_tot = new double[map_size]; double* l_avg = new double[map_size]; - int* n_calls = new int[map_size]; - for (int i = 0; i < map_size; i++) { - l_min[i] = 1e10; - l_max[i] = 0.0; - l_tot[i] = 0.0; - l_avg[i] = 0.0; + int* n_calls = new int[map_size]; + for (int i = 0; i < map_size; i++) + { + l_min[i] = 1e10; + l_max[i] = 0.0; + l_tot[i] = 0.0; + l_avg[i] = 0.0; n_calls[i] = 0; } /*--- Collect the info for each function from the current rank ---*/ int func_counter = 0; - for (map >::iterator it = Profile_Map_tp.begin(); it != Profile_Map_tp.end(); ++it) { + for (map >::iterator it=Profile_Map_tp.begin(); it!=Profile_Map_tp.end(); ++it) { + for (unsigned int i = 0; i < (it->second).size(); i++) { n_calls[func_counter]++; l_tot[func_counter] += Profile_Time_tp[(it->second)[i]]; @@ -10388,8 +9665,9 @@ void CConfig::SetProfilingCSV() { l_min[func_counter] = Profile_Time_tp[(it->second)[i]]; if (Profile_Time_tp[(it->second)[i]] > l_max[func_counter]) l_max[func_counter] = Profile_Time_tp[(it->second)[i]]; + } - l_avg[func_counter] = l_tot[func_counter] / ((double)n_calls[func_counter]); + l_avg[func_counter] = l_tot[func_counter]/((double)n_calls[func_counter]); func_counter++; } @@ -10400,7 +9678,7 @@ void CConfig::SetProfilingCSV() { l_max_red = new double[map_size]; l_tot_red = new double[map_size]; l_avg_red = new double[map_size]; - n_calls_red = new int[map_size]; + n_calls_red = new int[map_size]; } #ifdef HAVE_MPI @@ -10410,22 +9688,23 @@ void CConfig::SetProfilingCSV() { MPI_Reduce(l_min, l_min_red, map_size, MPI_DOUBLE, MPI_MIN, MASTER_NODE, SU2_MPI::GetComm()); MPI_Reduce(l_max, l_max_red, map_size, MPI_DOUBLE, MPI_MAX, MASTER_NODE, SU2_MPI::GetComm()); #else - memcpy(n_calls_red, n_calls, map_size * sizeof(int)); - memcpy(l_tot_red, l_tot, map_size * sizeof(double)); - memcpy(l_avg_red, l_avg, map_size * sizeof(double)); - memcpy(l_min_red, l_min, map_size * sizeof(double)); - memcpy(l_max_red, l_max, map_size * sizeof(double)); + memcpy(n_calls_red, n_calls, map_size*sizeof(int)); + memcpy(l_tot_red, l_tot, map_size*sizeof(double)); + memcpy(l_avg_red, l_avg, map_size*sizeof(double)); + memcpy(l_min_red, l_min, map_size*sizeof(double)); + memcpy(l_max_red, l_max, map_size*sizeof(double)); #endif /*--- The master rank will write the file ---*/ if (rank == MASTER_NODE) { + /*--- Take averages over all ranks on the master ---*/ for (int i = 0; i < map_size; i++) { - l_tot_red[i] = l_tot_red[i] / (double)size; - l_avg_red[i] = l_avg_red[i] / (double)size; - n_calls_red[i] = n_calls_red[i] / size; + l_tot_red[i] = l_tot_red[i]/(double)size; + l_avg_red[i] = l_avg_red[i]/(double)size; + n_calls_red[i] = n_calls_red[i]/size; } /*--- Now write a CSV file with the processed results ---*/ @@ -10436,40 +9715,40 @@ void CConfig::SetProfilingCSV() { /*--- Create the CSV header ---*/ - Profile_File << "\"Function_Name\", \"N_Calls\", \"Avg_Total_Time\", \"Avg_Time\", \"Min_Time\", \"Max_Time\", " - "\"Function_ID\"" - << endl; + Profile_File << "\"Function_Name\", \"N_Calls\", \"Avg_Total_Time\", \"Avg_Time\", \"Min_Time\", \"Max_Time\", \"Function_ID\"" << endl; /*--- Loop through the map and write the results to the file ---*/ func_counter = 0; - for (map >::iterator it = Profile_Map_tp.begin(); it != Profile_Map_tp.end(); ++it) { - Profile_File << scientific << it->first << ", " << n_calls_red[func_counter] << ", " << l_tot_red[func_counter] - << ", " << l_avg_red[func_counter] << ", " << l_min_red[func_counter] << ", " - << l_max_red[func_counter] << ", " << (int)Profile_ID_tp[(it->second)[0]] << endl; + for (map >::iterator it=Profile_Map_tp.begin(); it!=Profile_Map_tp.end(); ++it) { + + Profile_File << scientific << it->first << ", " << n_calls_red[func_counter] << ", " << l_tot_red[func_counter] << ", " << l_avg_red[func_counter] << ", " << l_min_red[func_counter] << ", " << l_max_red[func_counter] << ", " << (int)Profile_ID_tp[(it->second)[0]] << endl; func_counter++; } Profile_File.close(); + } - delete[] l_min; - delete[] l_max; - delete[] l_avg; - delete[] l_tot; - delete[] n_calls; + delete [] l_min; + delete [] l_max; + delete [] l_avg; + delete [] l_tot; + delete [] n_calls; if (rank == MASTER_NODE) { - delete[] l_min_red; - delete[] l_max_red; - delete[] l_avg_red; - delete[] l_tot_red; - delete[] n_calls_red; + delete [] l_min_red; + delete [] l_max_red; + delete [] l_avg_red; + delete [] l_tot_red; + delete [] n_calls_red; } #endif + } -void CConfig::GEMM_Tick(double* val_start_time) const { +void CConfig::GEMM_Tick(double *val_start_time) const { + #ifdef PROFILE #ifdef HAVE_MKL @@ -10479,9 +9758,11 @@ void CConfig::GEMM_Tick(double* val_start_time) const { #endif #endif + } void CConfig::GEMM_Tock(double val_start_time, int M, int N, int K) const { + #ifdef PROFILE /* Determine the timing value. The actual function called depends on @@ -10502,7 +9783,8 @@ void CConfig::GEMM_Tock(double val_start_time, int M, int N, int K) const { CLong3T MNK(M, N, K); map::iterator MI = GEMM_Profile_MNK.find(MNK); - if (MI == GEMM_Profile_MNK.end()) { + if(MI == GEMM_Profile_MNK.end()) { + /* Entry is not present yet. Create it. */ const int ind = GEMM_Profile_MNK.size(); GEMM_Profile_MNK[MNK] = ind; @@ -10511,20 +9793,24 @@ void CConfig::GEMM_Tock(double val_start_time, int M, int N, int K) const { GEMM_Profile_TotTime.push_back(val_elapsed_time); GEMM_Profile_MinTime.push_back(val_elapsed_time); GEMM_Profile_MaxTime.push_back(val_elapsed_time); - } else { + } + else { + /* Entry is already present. Determine its index in the map and update the corresponding vectors. */ const int ind = MI->second; ++GEMM_Profile_NCalls[ind]; GEMM_Profile_TotTime[ind] += val_elapsed_time; - GEMM_Profile_MinTime[ind] = min(GEMM_Profile_MinTime[ind], val_elapsed_time); - GEMM_Profile_MaxTime[ind] = max(GEMM_Profile_MaxTime[ind], val_elapsed_time); + GEMM_Profile_MinTime[ind] = min(GEMM_Profile_MinTime[ind], val_elapsed_time); + GEMM_Profile_MaxTime[ind] = max(GEMM_Profile_MaxTime[ind], val_elapsed_time); } #endif + } void CConfig::GEMMProfilingCSV() { + #ifdef PROFILE /* Initialize the rank to the master node. */ @@ -10538,9 +9824,11 @@ void CConfig::GEMMProfilingCSV() { SU2_MPI::Comm_size(SU2_MPI::GetComm(), &size); /* Check for the master node. */ - if (rank == MASTER_NODE) { + if(rank == MASTER_NODE) { + /* Master node. Loop over the other ranks to receive their data. */ - for (int proc = 1; proc < size; ++proc) { + for(int proc=1; proc recvBufNCalls(nEntries); + vector recvBufNCalls(nEntries); vector recvBufTotTime(nEntries); vector recvBufMinTime(nEntries); vector recvBufMaxTime(nEntries); - vector recvBufMNK(3 * nEntries); - - SU2_MPI::Recv(recvBufNCalls.data(), recvBufNCalls.size(), MPI_LONG, proc, 0, SU2_MPI::GetComm(), &status); - SU2_MPI::Recv(recvBufTotTime.data(), recvBufTotTime.size(), MPI_DOUBLE, proc, 1, SU2_MPI::GetComm(), &status); - SU2_MPI::Recv(recvBufMinTime.data(), recvBufMinTime.size(), MPI_DOUBLE, proc, 2, SU2_MPI::GetComm(), &status); - SU2_MPI::Recv(recvBufMaxTime.data(), recvBufMaxTime.size(), MPI_DOUBLE, proc, 3, SU2_MPI::GetComm(), &status); - SU2_MPI::Recv(recvBufMNK.data(), recvBufMNK.size(), MPI_LONG, proc, 4, SU2_MPI::GetComm(), &status); + vector recvBufMNK(3*nEntries); + + SU2_MPI::Recv(recvBufNCalls.data(), recvBufNCalls.size(), + MPI_LONG, proc, 0, SU2_MPI::GetComm(), &status); + SU2_MPI::Recv(recvBufTotTime.data(), recvBufTotTime.size(), + MPI_DOUBLE, proc, 1, SU2_MPI::GetComm(), &status); + SU2_MPI::Recv(recvBufMinTime.data(), recvBufMinTime.size(), + MPI_DOUBLE, proc, 2, SU2_MPI::GetComm(), &status); + SU2_MPI::Recv(recvBufMaxTime.data(), recvBufMaxTime.size(), + MPI_DOUBLE, proc, 3, SU2_MPI::GetComm(), &status); + SU2_MPI::Recv(recvBufMNK.data(), recvBufMNK.size(), + MPI_LONG, proc, 4, SU2_MPI::GetComm(), &status); /* Loop over the number of entries. */ - for (int i = 0; i < nEntries; ++i) { + for(int i=0; i::iterator MI = GEMM_Profile_MNK.find(MNK); - if (MI == GEMM_Profile_MNK.end()) { + if(MI == GEMM_Profile_MNK.end()) { + /* Entry is not present yet. Create it. */ const int ind = GEMM_Profile_MNK.size(); GEMM_Profile_MNK[MNK] = ind; @@ -10579,47 +9874,58 @@ void CConfig::GEMMProfilingCSV() { GEMM_Profile_TotTime.push_back(recvBufTotTime[i]); GEMM_Profile_MinTime.push_back(recvBufMinTime[i]); GEMM_Profile_MaxTime.push_back(recvBufMaxTime[i]); - } else { + } + else { + /* Entry is already present. Determine its index in the map and update the corresponding vectors. */ const int ind = MI->second; - GEMM_Profile_NCalls[ind] += recvBufNCalls[i]; + GEMM_Profile_NCalls[ind] += recvBufNCalls[i]; GEMM_Profile_TotTime[ind] += recvBufTotTime[i]; - GEMM_Profile_MinTime[ind] = min(GEMM_Profile_MinTime[ind], recvBufMinTime[i]); - GEMM_Profile_MaxTime[ind] = max(GEMM_Profile_MaxTime[ind], recvBufMaxTime[i]); + GEMM_Profile_MinTime[ind] = min(GEMM_Profile_MinTime[ind], recvBufMinTime[i]); + GEMM_Profile_MaxTime[ind] = max(GEMM_Profile_MaxTime[ind], recvBufMaxTime[i]); } } } - } else { + } + else { + /* Not the master node. Create the send buffer for the MNK data. */ - vector sendBufMNK(3 * GEMM_Profile_NCalls.size()); - for (map::iterator MI = GEMM_Profile_MNK.begin(); MI != GEMM_Profile_MNK.end(); ++MI) { - const int ind = 3 * MI->second; - sendBufMNK[ind] = MI->first.long0; - sendBufMNK[ind + 1] = MI->first.long1; - sendBufMNK[ind + 2] = MI->first.long2; + vector sendBufMNK(3*GEMM_Profile_NCalls.size()); + for(map::iterator MI =GEMM_Profile_MNK.begin(); + MI!=GEMM_Profile_MNK.end(); ++MI) { + + const int ind = 3*MI->second; + sendBufMNK[ind] = MI->first.long0; + sendBufMNK[ind+1] = MI->first.long1; + sendBufMNK[ind+2] = MI->first.long2; } /* Send the data to the master node using blocking sends. */ - SU2_MPI::Send(GEMM_Profile_NCalls.data(), GEMM_Profile_NCalls.size(), MPI_LONG, MASTER_NODE, 0, SU2_MPI::GetComm()); - SU2_MPI::Send(GEMM_Profile_TotTime.data(), GEMM_Profile_TotTime.size(), MPI_DOUBLE, MASTER_NODE, 1, - SU2_MPI::GetComm()); - SU2_MPI::Send(GEMM_Profile_MinTime.data(), GEMM_Profile_MinTime.size(), MPI_DOUBLE, MASTER_NODE, 2, - SU2_MPI::GetComm()); - SU2_MPI::Send(GEMM_Profile_MaxTime.data(), GEMM_Profile_MaxTime.size(), MPI_DOUBLE, MASTER_NODE, 3, - SU2_MPI::GetComm()); - SU2_MPI::Send(sendBufMNK.data(), sendBufMNK.size(), MPI_LONG, MASTER_NODE, 4, SU2_MPI::GetComm()); + SU2_MPI::Send(GEMM_Profile_NCalls.data(), GEMM_Profile_NCalls.size(), + MPI_LONG, MASTER_NODE, 0, SU2_MPI::GetComm()); + SU2_MPI::Send(GEMM_Profile_TotTime.data(), GEMM_Profile_TotTime.size(), + MPI_DOUBLE, MASTER_NODE, 1, SU2_MPI::GetComm()); + SU2_MPI::Send(GEMM_Profile_MinTime.data(), GEMM_Profile_MinTime.size(), + MPI_DOUBLE, MASTER_NODE, 2, SU2_MPI::GetComm()); + SU2_MPI::Send(GEMM_Profile_MaxTime.data(), GEMM_Profile_MaxTime.size(), + MPI_DOUBLE, MASTER_NODE, 3, SU2_MPI::GetComm()); + SU2_MPI::Send(sendBufMNK.data(), sendBufMNK.size(), + MPI_LONG, MASTER_NODE, 4, SU2_MPI::GetComm()); } #endif /*--- The master rank will write the file ---*/ if (rank == MASTER_NODE) { + /* Store the elements of the map GEMM_Profile_MNK in vectors for post processing reasons. */ const unsigned int nItems = GEMM_Profile_MNK.size(); vector M(nItems), N(nItems), K(nItems); - for (map::iterator MI = GEMM_Profile_MNK.begin(); MI != GEMM_Profile_MNK.end(); ++MI) { + for(map::iterator MI =GEMM_Profile_MNK.begin(); + MI!=GEMM_Profile_MNK.end(); ++MI) { + const int ind = MI->second; M[ind] = MI->first.long0; N[ind] = MI->first.long1; @@ -10631,7 +9937,7 @@ void CConfig::GEMMProfilingCSV() { out this sort. */ vector > sortedTime; - for (unsigned int i = 0; i < GEMM_Profile_TotTime.size(); ++i) + for(unsigned int i=0; i >::reverse_iterator rit = sortedTime.rbegin(); rit != sortedTime.rend(); - ++rit) { + for(vector >::reverse_iterator rit =sortedTime.rbegin(); + rit!=sortedTime.rend(); ++rit) { /* Determine the original index in the profiling vectors. */ const unsigned int ind = rit->second; - const double AvgTime = GEMM_Profile_TotTime[ind] / GEMM_Profile_NCalls[ind]; - const double GFlops = 2.0e-9 * M[ind] * N[ind] * K[ind] / AvgTime; + const double AvgTime = GEMM_Profile_TotTime[ind]/GEMM_Profile_NCalls[ind]; + const double GFlops = 2.0e-9*M[ind]*N[ind]*K[ind]/AvgTime; /* Write the data. */ - Profile_File << scientific << GEMM_Profile_TotTime[ind] << ", " << GEMM_Profile_NCalls[ind] << ", " << AvgTime - << ", " << GEMM_Profile_MinTime[ind] << ", " << GEMM_Profile_MaxTime[ind] << ", " << M[ind] << ", " - << N[ind] << ", " << K[ind] << ", " << GFlops << endl; + Profile_File << scientific << GEMM_Profile_TotTime[ind] << ", " << GEMM_Profile_NCalls[ind] << ", " + << AvgTime << ", " << GEMM_Profile_MinTime[ind] << ", " << GEMM_Profile_MaxTime[ind] << ", " + << M[ind] << ", " << N[ind] << ", " << K[ind] << ", " << GFlops << endl; } /* Close the file. */ @@ -10667,73 +9971,74 @@ void CConfig::GEMMProfilingCSV() { } #endif + } -void CConfig::SetFreeStreamTurboNormal(const su2double* turboNormal) { +void CConfig::SetFreeStreamTurboNormal(const su2double* turboNormal){ + FreeStreamTurboNormal[0] = turboNormal[0]; FreeStreamTurboNormal[1] = turboNormal[1]; FreeStreamTurboNormal[2] = 0.0; + } -void CConfig::SetMultizone(const CConfig* driver_config, const CConfig* const* config_container) { - for (unsigned short iZone = 0; iZone < nZone; iZone++) { - if (config_container[iZone]->GetTime_Domain() != GetTime_Domain()) { +void CConfig::SetMultizone(const CConfig *driver_config, const CConfig* const* config_container){ + + for (unsigned short iZone = 0; iZone < nZone; iZone++){ + + if (config_container[iZone]->GetTime_Domain() != GetTime_Domain()){ SU2_MPI::Error("Option TIME_DOMAIN must be the same in all zones.", CURRENT_FUNCTION); } - if (config_container[iZone]->GetnTime_Iter() != GetnTime_Iter()) { + if (config_container[iZone]->GetnTime_Iter() != GetnTime_Iter()){ SU2_MPI::Error("Option TIME_ITER must be the same in all zones.", CURRENT_FUNCTION); } - if (config_container[iZone]->GetnOuter_Iter() != GetnOuter_Iter()) { + if (config_container[iZone]->GetnOuter_Iter() != GetnOuter_Iter()){ SU2_MPI::Error("Option OUTER_ITER must be the same in all zones.", CURRENT_FUNCTION); } - if (config_container[iZone]->GetTime_Step() != GetTime_Step()) { + if (config_container[iZone]->GetTime_Step() != GetTime_Step()){ SU2_MPI::Error("Option TIME_STEP must be the same in all zones.", CURRENT_FUNCTION); } - if (config_container[iZone]->GetUnst_CFL() != 0.0) { - SU2_MPI::Error( - "Option UNST_CFL_NUMBER cannot be used in multizone problems (must be 0)," - " use a fixed TIME_STEP instead.", - CURRENT_FUNCTION); + if (config_container[iZone]->GetUnst_CFL() != 0.0){ + SU2_MPI::Error("Option UNST_CFL_NUMBER cannot be used in multizone problems (must be 0)," + " use a fixed TIME_STEP instead.", CURRENT_FUNCTION); } - if (config_container[iZone]->GetMultizone_Problem() != GetMultizone_Problem()) { + if (config_container[iZone]->GetMultizone_Problem() != GetMultizone_Problem()){ SU2_MPI::Error("Option MULTIZONE must be the same in all zones.", CURRENT_FUNCTION); } - if (config_container[iZone]->GetMultizone_Mesh() != GetMultizone_Mesh()) { + if (config_container[iZone]->GetMultizone_Mesh() != GetMultizone_Mesh()){ SU2_MPI::Error("Option MULTIZONE_MESH must be the same in all zones.", CURRENT_FUNCTION); } - if (config_container[iZone]->GetWnd_Cauchy_Crit()) { + if(config_container[iZone]->GetWnd_Cauchy_Crit()){ SU2_MPI::Error("Option WINDOW_CAUCHY_CRIT must be deactivated for multizone problems.", CURRENT_FUNCTION); } } - if (driver_config->GetWnd_Cauchy_Crit()) { + if(driver_config->GetWnd_Cauchy_Crit()){ SU2_MPI::Error("Option WINDOW_CAUCHY_CRIT must be deactivated for multizone problems.", CURRENT_FUNCTION); } bool multiblockDriver = false; - for (unsigned short iFiles = 0; iFiles < driver_config->GetnVolumeOutputFiles(); iFiles++) { - if (driver_config->GetVolumeOutputFiles()[iFiles] == OUTPUT_TYPE::PARAVIEW_MULTIBLOCK) { + for (unsigned short iFiles = 0; iFiles < driver_config->GetnVolumeOutputFiles(); iFiles++){ + if (driver_config->GetVolumeOutputFiles()[iFiles] == OUTPUT_TYPE::PARAVIEW_MULTIBLOCK){ multiblockDriver = true; } } bool multiblockZone = false; - for (unsigned short iZone = 0; iZone < nZone; iZone++) { + for (unsigned short iZone = 0; iZone < nZone; iZone++){ multiblockZone = false; - for (unsigned short iFiles = 0; iFiles < config_container[iZone]->GetnVolumeOutputFiles(); iFiles++) { - if (config_container[iZone]->GetVolumeOutputFiles()[iFiles] == OUTPUT_TYPE::PARAVIEW_MULTIBLOCK) { + for (unsigned short iFiles = 0; iFiles < config_container[iZone]->GetnVolumeOutputFiles(); iFiles++){ + if (config_container[iZone]->GetVolumeOutputFiles()[iFiles] == OUTPUT_TYPE::PARAVIEW_MULTIBLOCK){ multiblockZone = true; } } - if (multiblockZone != multiblockDriver) { - SU2_MPI::Error( - "To enable PARAVIEW_MULTIBLOCK output, add it to OUTPUT_FILES option in main config and\n" - "remove option from sub-config files.", - CURRENT_FUNCTION); + if (multiblockZone != multiblockDriver){ + SU2_MPI::Error("To enable PARAVIEW_MULTIBLOCK output, add it to OUTPUT_FILES option in main config and\n" + "remove option from sub-config files.", CURRENT_FUNCTION); } } /*--- Fix the Time Step for all subdomains, for the case of time-dependent problems ---*/ - if (driver_config->GetTime_Domain()) { + if (driver_config->GetTime_Domain()){ Delta_UnstTime = driver_config->GetTime_Step(); Time_Domain = true; From b668005f5d9755f007e323688f1ebf002db7d1b9 Mon Sep 17 00:00:00 2001 From: bigfooted Date: Fri, 11 Aug 2023 09:29:41 +0200 Subject: [PATCH 22/34] remove marker_flowload --- Common/src/CConfig.cpp | 9 --------- 1 file changed, 9 deletions(-) diff --git a/Common/src/CConfig.cpp b/Common/src/CConfig.cpp index 1365f1a3cd9..77e7f40f8f8 100644 --- a/Common/src/CConfig.cpp +++ b/Common/src/CConfig.cpp @@ -7300,15 +7300,6 @@ void CConfig::SetOutput(SU2_COMPONENT val_software, unsigned short val_izone) { BoundaryTable.PrintFooter(); } - // if (nMarker_FlowLoad != 0) { - // BoundaryTable << "Flow load boundary"; - // for (iMarker_FlowLoad = 0; iMarker_FlowLoad < nMarker_FlowLoad; iMarker_FlowLoad++) { - // BoundaryTable << Marker_FlowLoad[iMarker_FlowLoad]; - // if (iMarker_FlowLoad < nMarker_FlowLoad-1) BoundaryTable << " "; - // } - // BoundaryTable.PrintFooter(); - // } - if (nMarker_Internal != 0) { BoundaryTable << "Internal boundary"; for (iMarker_Internal = 0; iMarker_Internal < nMarker_Internal; iMarker_Internal++) { From 80193b646079dccd094cbc4b5b675589fa1775b9 Mon Sep 17 00:00:00 2001 From: bigfooted Date: Tue, 22 Aug 2023 00:06:55 +0200 Subject: [PATCH 23/34] change actdisk --- Common/src/CConfig.cpp | 2 +- Common/src/geometry/meshreader/CSU2ASCIIMeshReaderFVM.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Common/src/CConfig.cpp b/Common/src/CConfig.cpp index 26c15cbd8ec..62ae961b3d0 100644 --- a/Common/src/CConfig.cpp +++ b/Common/src/CConfig.cpp @@ -1650,7 +1650,7 @@ void CConfig::SetConfig_Options() { /* DESCRIPTION: Only half engine is in the computational grid */ addBoolOption("ENGINE_HALF_MODEL", Engine_HalfModel, false); // /* DESCRIPTION: Actuator disk double surface */ - // addBoolOption("ACTDISK_SU2_DEF", ActDisk_SU2_DEF, false); + addBoolOption("ACTDISK_SU2_DEF", ActDisk_SU2_DEF, false); /* DESCRIPTION: Definition of the distortion rack (radial number of proves / circumferential density (degree) */ distortion[0] = 5.0; distortion[1] = 15.0; addDoubleArrayOption("DISTORTION_RACK", 2, distortion); diff --git a/Common/src/geometry/meshreader/CSU2ASCIIMeshReaderFVM.cpp b/Common/src/geometry/meshreader/CSU2ASCIIMeshReaderFVM.cpp index bf91c423d05..a32c290c4d9 100644 --- a/Common/src/geometry/meshreader/CSU2ASCIIMeshReaderFVM.cpp +++ b/Common/src/geometry/meshreader/CSU2ASCIIMeshReaderFVM.cpp @@ -34,9 +34,9 @@ CSU2ASCIIMeshReaderFVM::CSU2ASCIIMeshReaderFVM(CConfig* val_config, unsigned sho myZone(val_iZone), nZones(val_nZone), meshFilename(config->GetMesh_FileName()) { - actuator_disk = - (((config->GetnMarker_ActDiskInlet() != 0) || (config->GetnMarker_ActDiskOutlet() != 0)) && - ((config->GetKind_SU2() == SU2_COMPONENT::SU2_CFD) || ((config->GetKind_SU2() == SU2_COMPONENT::SU2_DEF)))); + actuator_disk = (((config->GetnMarker_ActDiskInlet() != 0) || (config->GetnMarker_ActDiskOutlet() != 0)) && + ((config->GetKind_SU2() == SU2_COMPONENT::SU2_CFD) || + ((config->GetKind_SU2() == SU2_COMPONENT::SU2_DEF) && (config->GetActDisk_SU2_DEF())))); if (config->GetActDisk_DoubleSurface()) actuator_disk = false; /* Read the basic metadata and perform some basic error checks. */ From 219feae5b49ccc1e1b32eb4aa95203c776cc9d25 Mon Sep 17 00:00:00 2001 From: bigfooted Date: Tue, 22 Aug 2023 00:09:49 +0200 Subject: [PATCH 24/34] change actdisk --- Common/include/CConfig.hpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Common/include/CConfig.hpp b/Common/include/CConfig.hpp index b3379b587cb..7426906bb21 100644 --- a/Common/include/CConfig.hpp +++ b/Common/include/CConfig.hpp @@ -96,6 +96,7 @@ class CConfig { *TemperatureLimits; /*!< \brief Limits for the primitive variables */ bool ActDisk_DoubleSurface; /*!< \brief actuator disk double surface */ bool Engine_HalfModel; /*!< \brief only half model is in the computational grid */ + bool ActDisk_SU2_DEF; /*!< \brief actuator disk double surface */ unsigned short nFFD_Iter; /*!< \brief Iteration for the point inversion problem. */ unsigned short FFD_Blending; /*!< \brief Kind of FFD Blending function. */ su2double FFD_Tol; /*!< \brief Tolerance in the point inversion problem. */ From 461e104c3006f704fcba84f4d056ae5b94868d1c Mon Sep 17 00:00:00 2001 From: bigfooted Date: Wed, 23 Aug 2023 12:05:34 +0200 Subject: [PATCH 25/34] add disk --- Common/include/CConfig.hpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Common/include/CConfig.hpp b/Common/include/CConfig.hpp index 7426906bb21..268d4342479 100644 --- a/Common/include/CConfig.hpp +++ b/Common/include/CConfig.hpp @@ -5761,6 +5761,12 @@ class CConfig { */ bool GetEngine_HalfModel(void) const { return Engine_HalfModel; } + /*! + * \brief Actuator disk defined with a double surface. + * \return TRUE if the elements must be divided; otherwise FALSE. + */ + bool GetActDisk_SU2_DEF(void) const { return ActDisk_SU2_DEF; } + /*! * \brief Value of the design variable step, we use this value in design problems. * \param[in] val_dv - Number of the design variable that we want to read. From a9136c7a662e8d9bc0a0ab38f8c5dc37d91f4edd Mon Sep 17 00:00:00 2001 From: bigfooted Date: Thu, 21 Sep 2023 21:22:45 +0200 Subject: [PATCH 26/34] remove commented lined --- Common/src/CConfig.cpp | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/Common/src/CConfig.cpp b/Common/src/CConfig.cpp index a31136a866f..6c2ac514097 100644 --- a/Common/src/CConfig.cpp +++ b/Common/src/CConfig.cpp @@ -1458,9 +1458,6 @@ void CConfig::SetConfig_Options() { /*!\par CONFIG_CATEGORY: Boundary Markers \ingroup Config*/ /*--- Options related to various boundary markers ---*/ - /*!\brief HTP_AXIS\n DESCRIPTION: Location of the HTP axis*/ - //htp_axis[0] = 0.0; htp_axis[1] = 0.0; - //addDoubleArrayOption("HTP_AXIS", 2, htp_axis); /*!\brief MARKER_PLOTTING\n DESCRIPTION: Marker(s) of the surface in the surface flow solution file \ingroup Config*/ addStringListOption("MARKER_PLOTTING", nMarker_Plotting, Marker_Plotting); /*!\brief MARKER_MONITORING\n DESCRIPTION: Marker(s) of the surface where evaluate the non-dimensional coefficients \ingroup Config*/ @@ -1649,7 +1646,7 @@ void CConfig::SetConfig_Options() { addBoolOption("ACTDISK_DOUBLE_SURFACE", ActDisk_DoubleSurface, false); /* DESCRIPTION: Only half engine is in the computational grid */ addBoolOption("ENGINE_HALF_MODEL", Engine_HalfModel, false); - // /* DESCRIPTION: Actuator disk double surface */ + /* DESCRIPTION: Actuator disk SU2_DEF */ addBoolOption("ACTDISK_SU2_DEF", ActDisk_SU2_DEF, false); /* DESCRIPTION: Definition of the distortion rack (radial number of proves / circumferential density (degree) */ distortion[0] = 5.0; distortion[1] = 15.0; @@ -1678,9 +1675,6 @@ void CConfig::SetConfig_Options() { /* DESCRIPTION: Load boundary marker(s) Format: (inlet marker, load, multiplier, dir_x, dir_y, dir_z, ... ), i.e. primitive variables specified. */ addInletOption("MARKER_DISPLACEMENT", nMarker_Disp_Dir, Marker_Disp_Dir, Disp_Dir_Value, Disp_Dir_Multiplier, Disp_Dir); - /* DESCRIPTION: Sine load boundary marker(s) - Format: (inlet marker, load, multiplier, dir_x, dir_y, dir_z, ... ), i.e. primitive variables specified. */ - //addInletOption("MARKER_SINE_LOAD", nMarker_Load_Sine, Marker_Load_Sine, Load_Sine_Amplitude, Load_Sine_Frequency, Load_Sine_Dir); /*!\brief SINE_LOAD\n DESCRIPTION: option to apply the load as a sine*/ addBoolOption("SINE_LOAD", Sine_Load, false); sineload_coeff[0] = 0.0; sineload_coeff[1] = 0.0; sineload_coeff[2] = 0.0; @@ -1689,8 +1683,6 @@ void CConfig::SetConfig_Options() { /*!\brief RAMP_AND_RELEASE\n DESCRIPTION: release the load after applying the ramp*/ addBoolOption("RAMP_AND_RELEASE_LOAD", RampAndRelease, false); - /* DESCRIPTION: Flow load boundary marker(s) */ - //addStringDoubleListOption("MARKER_FLOWLOAD", nMarker_FlowLoad, Marker_FlowLoad, FlowLoad_Value); /* DESCRIPTION: Damping factor for engine inlet condition */ addDoubleOption("DAMP_ENGINE_INFLOW", Damp_Engine_Inflow, 0.95); /* DESCRIPTION: Damping factor for engine exhaust condition */ @@ -2347,14 +2339,6 @@ void CConfig::SetConfig_Options() { /* DESCRIPTION: Maximum number of iterations of the linear solver for the implicit formulation */ addUnsignedLongOption("DEFORM_LINEAR_SOLVER_ITER", Deform_Linear_Solver_Iter, 1000); - /*!\par CONFIG_CATEGORY: Rotorcraft problem \ingroup Config*/ - /*--- option related to rotorcraft problems ---*/ - - // /* DESCRIPTION: MISSING ---*/ - // addDoubleOption("CYCLIC_PITCH", Cyclic_Pitch, 0.0); - // /* DESCRIPTION: MISSING ---*/ - // addDoubleOption("COLLECTIVE_PITCH", Collective_Pitch, 0.0); - /*!\par CONFIG_CATEGORY: FEM flow solver definition \ingroup Config*/ /*--- Options related to the finite element flow solver---*/ From 6e83a4b2b66af4d1a6e88e8f78f22c7120f60025 Mon Sep 17 00:00:00 2001 From: bigfooted Date: Mon, 25 Sep 2023 07:54:02 +0200 Subject: [PATCH 27/34] remove commented line --- Common/include/CConfig.hpp | 2 -- config_template.cfg | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/Common/include/CConfig.hpp b/Common/include/CConfig.hpp index 3dc28e10f8d..57b58ecf01b 100644 --- a/Common/include/CConfig.hpp +++ b/Common/include/CConfig.hpp @@ -917,8 +917,6 @@ class CConfig { bool RampAndRelease; /*!< \brief option for ramp load and release */ bool Sine_Load; /*!< \brief option for sine load */ su2double Thermal_Diffusivity; /*!< \brief Thermal diffusivity used in the heat solver. */ - //su2double Cyclic_Pitch, /*!< \brief Cyclic pitch for rotorcraft simulations. */ - //Collective_Pitch; /*!< \brief Collective pitch for rotorcraft simulations. */ su2double Mach_Motion; /*!< \brief Mach number based on mesh velocity and freestream quantities. */ su2double Motion_Origin[3] = {0.0}, /*!< \brief Mesh motion origin. */ diff --git a/config_template.cfg b/config_template.cfg index 18239c801bc..19930447b06 100644 --- a/config_template.cfg +++ b/config_template.cfg @@ -2266,7 +2266,7 @@ EXTRA_HEAT_ZONE_OUTPUT= -1 % Mesh input file MESH_FILENAME= mesh_NACA0012_inv.su2 % -% Mesh input file format (SU2, CGNS, RECTANGLE, BOX) +% Mesh input file format (SU2, CGNS) MESH_FORMAT= SU2 % % List of the number of grid points in the RECTANGLE or BOX grid in the x,y,z directions. (default: (33,33,33) ). From 458b636f3dae87de99df235979146d5995502524 Mon Sep 17 00:00:00 2001 From: Nijso Date: Mon, 6 Nov 2023 11:03:21 +0100 Subject: [PATCH 28/34] Update Common/include/CConfig.hpp Co-authored-by: Pedro Gomes <38071223+pcarruscag@users.noreply.github.com> --- Common/include/CConfig.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Common/include/CConfig.hpp b/Common/include/CConfig.hpp index 57b58ecf01b..580e4c9329d 100644 --- a/Common/include/CConfig.hpp +++ b/Common/include/CConfig.hpp @@ -1551,7 +1551,7 @@ class CConfig { * \brief Get the values of subsonic engine. * \return Values of subsonic engine. */ - const su2double *GetSubsonicEngine_Values(void) const { return eng_val; } + const su2double *GetSubsonicEngine_Values(void) const { return eng_val; } /*! * \brief Get the cycle of a subsonic engine. From 1f4dca2ec368b87f964256ccba61a26f94fa475d Mon Sep 17 00:00:00 2001 From: bigfooted Date: Mon, 6 Nov 2023 11:33:25 +0100 Subject: [PATCH 29/34] remove duplicate entries, add deprecation statements --- Common/include/CConfig.hpp | 8 +++--- Common/src/CConfig.cpp | 4 +-- config_template.cfg | 52 +++++--------------------------------- 3 files changed, 13 insertions(+), 51 deletions(-) diff --git a/Common/include/CConfig.hpp b/Common/include/CConfig.hpp index 580e4c9329d..ed235fee02c 100644 --- a/Common/include/CConfig.hpp +++ b/Common/include/CConfig.hpp @@ -6443,8 +6443,8 @@ class CConfig { su2double GetWeightCd(void) const { return WeightCd; } /*! - * \brief Value of the weight of the CD, CL, CM optimization. - * \return Value of the weight of the CD, CL, CM optimization. + * \brief Value of the damping factor for the Thrust BC (actuator disk). + * \return Value of the damping factor. */ void SetdNetThrust_dBCThrust(su2double val_dnetthrust_dbcthrust); @@ -8560,8 +8560,8 @@ class CConfig { unsigned long GetIter_Fixed_NetThrust(void) const { return Iter_Fixed_NetThrust; } /*! - * \brief Get the value of the damping coefficient for fixed CL mode. - * \return Damping coefficient for fixed CL mode. + * \brief Get the value of NetThrust_dBCThrust. + * \return Value NetThrust_dBCThrust. */ su2double GetdNetThrust_dBCThrust(void) const { return dNetThrust_dBCThrust; } diff --git a/Common/src/CConfig.cpp b/Common/src/CConfig.cpp index 45771e6b3a6..696fe17326e 100644 --- a/Common/src/CConfig.cpp +++ b/Common/src/CConfig.cpp @@ -1415,7 +1415,7 @@ void CConfig::SetConfig_Options() { addDoubleOption("TARGET_CL", Target_CL, 0.0); /* DESCRIPTION: Damping factor for fixed CL mode. */ addDoubleOption("DCL_DALPHA", dCL_dAlpha, 0.2); - /* DESCRIPTION: Damping factor for fixed CL mode. */ + /* DESCRIPTION: dCM/dHi */ addDoubleOption("DCM_DIH", dCM_diH, 0.05); /* DESCRIPTION: Maximum number of iterations between AoA updates for fixed CL problem. */ addUnsignedLongOption("UPDATE_AOA_ITER_LIMIT", Update_AoA_Iter_Limit, 200); @@ -1423,7 +1423,7 @@ void CConfig::SetConfig_Options() { addUnsignedLongOption("UPDATE_IH", Update_iH, 5); /* DESCRIPTION: Number of iterations to evaluate dCL_dAlpha . */ addUnsignedLongOption("ITER_DCL_DALPHA", Iter_dCL_dAlpha, 500); - /* DESCRIPTION: Damping factor for fixed CL mode. */ + /* DESCRIPTION: Value of dNetThrust/dBCThrust */ addDoubleOption("DNETTHRUST_DBCTHRUST", dNetThrust_dBCThrust, 1.0); /* DESCRIPTION: Number of times Alpha is updated in a fix CL problem. */ addUnsignedLongOption("UPDATE_BCTHRUST", Update_BCThrust, 5); diff --git a/config_template.cfg b/config_template.cfg index 19930447b06..0a3daef4450 100644 --- a/config_template.cfg +++ b/config_template.cfg @@ -310,7 +310,7 @@ TARGET_CL= 0.80 % Estimation of dCL/dAlpha (0.2 per degree by default) DCL_DALPHA= 0.2 % -% Damping factor for fixed CL mode +% Value of dCm/dHi (0.05 by default) DCM_DIH= 0.05 % % Maximum number of iterations between AoA updates @@ -324,7 +324,8 @@ ITER_DCL_DALPHA= 500 % % Evaluate the dOF_dCL or dOF_dCMy during run time EVAL_DOF_DCX= NO -% Damping factor for fixed CL mode. +% +% Damping factor for thrust BC (actuator disk). NETTHRUST_DBCTHRUST= 1.0 % % parameter for the definition of a complex objective function @@ -448,20 +449,6 @@ VT_RESIDUAL_LIMITING= NO INLET_TEMPERATURE_VE = 288.15 INLET_GAS_COMPOSITION = (0.77, 0.23, 0.0, 0.0, 0.0) -% --------------------------- REFERENCE VALUES FOR DEFORMATION ----------------% -% -% Consider a reference solution for the structure -REFERENCE_GEOMETRY= NO -% -% Penalty weight value for the objective function -REFERENCE_GEOMETRY_PENALTY= 1E6 -% -% Reference geometry filename -REFERENCE_GEOMETRY_FILENAME= reference_geometry.dat -% -% Format of the reference geometry file -REFERENCE_GEOMETRY_FORMAT= - % --------------------------- VISCOSITY MODEL ---------------------------------% % % Viscosity model (SUTHERLAND, CONSTANT_VISCOSITY, POLYNOMIAL_VISCOSITY, FLAMELET). @@ -781,7 +768,7 @@ HB_PRECONDITION= NO % Omega_HB = 2*PI*frequency - frequencies for Harmonic Balance method OMEGA_HB= (0,1.0,-1.0) % -% Determines if the single-zone driver is used. (TEMPORARY) +% Determines if the single-zone driver is used. (deprecated) SINGLEZONE_DRIVER= NO % % Determines if the special output is written out @@ -1964,13 +1951,13 @@ DEAD_LOAD= NO % pseudo static analysis (no density in dynamic analysis) PSEUDO_STATIC= NO % -% Dynamic or static structural analysis +% Dynamic or static structural analysis (deprecated -> use TIME_DOMAIN) DYNAMIC_ANALYSIS= NO % -% Time Step for dynamic analysis (s) +% Time Step for dynamic analysis (s) (deprecated -> use TIME_STEP) DYN_TIMESTEP= 0.0 % -% Total Physical Time for dual time stepping simulations (s) +% Total Physical Time for dual time stepping simulations (s) (deprecated -> use MAX_TIME) DYN_TIME= 1.0 % ---------------- MESH DEFORMATION PARAMETERS (NEW SOLVER) -------------------% @@ -2472,28 +2459,3 @@ PASTIX_VERBOSITY_LEVEL= 0 % % Level of fill for PaStiX incomplete LU factorization PASTIX_FILL_LEVEL= 1 - -% --------------------- PYTHON PARAMETERS -----------------------% -% DESCRIPTION: Gradient method -%GRADIENT_METHOD -% -% DESCRIPTION: Geometrical Parameter -%GEO_PARAM -% -% DESCRIPTION: Current value of the design variables -%DV_VALUE_NEW -% -% DESCRIPTION: Previous value of the design variables -%DV_VALUE_OLD -% -% DESCRIPTION: Number of partitions of the mesh -NUMBER_PART= 1 -% -% DESCRIPTION: Verbosity of the python scripts to Stdout -%CONSOLE -% -% DESCRIPTION: Flag specifying if the mesh was decomposed -%DECOMPOSED -% -% DESCRIPTION: Number of zones of the problem -%NZONES= 1 From 8531ae8920b9381d1c8c86c99d8444d3f7bce81b Mon Sep 17 00:00:00 2001 From: bigfooted Date: Sun, 12 Nov 2023 11:18:57 +0100 Subject: [PATCH 30/34] remove dcm_dih --- Common/include/CConfig.hpp | 13 ------------- Common/src/CConfig.cpp | 2 -- config_template.cfg | 3 --- 3 files changed, 18 deletions(-) diff --git a/Common/include/CConfig.hpp b/Common/include/CConfig.hpp index ed235fee02c..cae0d4c82a4 100644 --- a/Common/include/CConfig.hpp +++ b/Common/include/CConfig.hpp @@ -655,7 +655,6 @@ class CConfig { su2double Total_CM; /*!< \brief Specify a Total CM instead of AoA (external flow only). */ su2double Total_CD; /*!< \brief Specify a target CD instead of AoA (external flow only). */ su2double dCL_dAlpha; /*!< \brief value of dCl/dAlpha. */ - su2double dCM_diH; /*!< \brief value of dCM/dHi. */ unsigned long Iter_Fixed_CM; /*!< \brief Iterations to re-evaluate the angle of attack (external flow only). */ unsigned long Iter_Fixed_NetThrust; /*!< \brief Iterations to re-evaluate the angle of attack (external flow only). */ unsigned long Iter_dCL_dAlpha; /*!< \brief Number of iterations to evaluate dCL_dAlpha. */ @@ -6508,12 +6507,6 @@ class CConfig { */ void SetdCL_dAlpha(su2double val_dcl_dalpha) { dCL_dAlpha = val_dcl_dalpha; } - /*! - * \brief Value of the weight of the CD, CL, CM optimization. - * \return Value of the weight of the CD, CL, CM optimization. - */ - void SetdCM_diH(su2double val_dcm_dhi) { dCM_diH = val_dcm_dhi; } - /*! * \brief Value of the weight of the CD, CL, CM optimization. * \return Value of the weight of the CD, CL, CM optimization. @@ -8547,12 +8540,6 @@ class CConfig { */ unsigned long GetIter_dCL_dAlpha(void) const { return Iter_dCL_dAlpha; } - /*! - * \brief Get the value of the damping coefficient for fixed CL mode. - * \return Damping coefficient for fixed CL mode. - */ - su2double GetdCM_diH(void) const { return dCM_diH; } - /*! * \brief Get the value of iterations to re-evaluate the angle of attack. * \return Number of iterations. diff --git a/Common/src/CConfig.cpp b/Common/src/CConfig.cpp index 696fe17326e..1e44096b1c4 100644 --- a/Common/src/CConfig.cpp +++ b/Common/src/CConfig.cpp @@ -1415,8 +1415,6 @@ void CConfig::SetConfig_Options() { addDoubleOption("TARGET_CL", Target_CL, 0.0); /* DESCRIPTION: Damping factor for fixed CL mode. */ addDoubleOption("DCL_DALPHA", dCL_dAlpha, 0.2); - /* DESCRIPTION: dCM/dHi */ - addDoubleOption("DCM_DIH", dCM_diH, 0.05); /* DESCRIPTION: Maximum number of iterations between AoA updates for fixed CL problem. */ addUnsignedLongOption("UPDATE_AOA_ITER_LIMIT", Update_AoA_Iter_Limit, 200); /* DESCRIPTION: Number of times Alpha is updated in a fix CL problem. */ diff --git a/config_template.cfg b/config_template.cfg index 0a3daef4450..da912f823a3 100644 --- a/config_template.cfg +++ b/config_template.cfg @@ -310,9 +310,6 @@ TARGET_CL= 0.80 % Estimation of dCL/dAlpha (0.2 per degree by default) DCL_DALPHA= 0.2 % -% Value of dCm/dHi (0.05 by default) -DCM_DIH= 0.05 -% % Maximum number of iterations between AoA updates UPDATE_AOA_ITER_LIMIT= 100 % From 18bb23bae978729c0db87e89dbee8d94d0d3a17c Mon Sep 17 00:00:00 2001 From: bigfooted Date: Fri, 17 Nov 2023 07:39:26 +0100 Subject: [PATCH 31/34] remove comment --- Common/src/CConfig.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Common/src/CConfig.cpp b/Common/src/CConfig.cpp index d57e688df28..35c66022926 100644 --- a/Common/src/CConfig.cpp +++ b/Common/src/CConfig.cpp @@ -2658,7 +2658,7 @@ void CConfig::SetConfig_Options() { /*!\par CONFIG_CATEGORY: Visualize Control Volumes \ingroup Config*/ /*--- options related to visualizing control volumes ---*/ - /* DESCRIPTION: Node number for the CV to be visualized (tecplot) (nijso: delete?) */ + /* DESCRIPTION: Node number for the CV to be visualized (tecplot) */ addLongOption("VISUALIZE_CV", Visualize_CV, -1); /*!\par CONFIG_CATEGORY: Inverse design problem \ingroup Config*/ From 063379375320b09909e4a39e500f18e3951bee0c Mon Sep 17 00:00:00 2001 From: bigfooted Date: Fri, 17 Nov 2023 13:04:44 +0100 Subject: [PATCH 32/34] update regression test --- TestCases/hybrid_regression_AD.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/TestCases/hybrid_regression_AD.py b/TestCases/hybrid_regression_AD.py index cf419bde4e9..bf9db115aec 100644 --- a/TestCases/hybrid_regression_AD.py +++ b/TestCases/hybrid_regression_AD.py @@ -238,7 +238,7 @@ def main(): pywrapper_FEA_AD_FlowLoad.cfg_dir = "py_wrapper/disc_adj_fea/flow_load_sens" pywrapper_FEA_AD_FlowLoad.cfg_file = "configAD_fem.cfg" pywrapper_FEA_AD_FlowLoad.test_iter = 100 - pywrapper_FEA_AD_FlowLoad.test_vals = [-0.131742, -0.553318, -0.000364, -0.003101] #last 4 columns + pywrapper_FEA_AD_FlowLoad.test_vals = [-0.132159, -0.554968, -0.000364, -0.003101] #last 4 columns pywrapper_FEA_AD_FlowLoad.test_vals_aarch64 = [-0.131745, -0.553214, -0.000364, -0.003101] pywrapper_FEA_AD_FlowLoad.command = TestCase.Command(exec = "python", param = "run_adjoint.py --parallel -f") pywrapper_FEA_AD_FlowLoad.timeout = 1600 @@ -253,7 +253,7 @@ def main(): pywrapper_CFD_AD_MeshDisp.cfg_dir = "py_wrapper/disc_adj_flow/mesh_disp_sens" pywrapper_CFD_AD_MeshDisp.cfg_file = "configAD_flow.cfg" pywrapper_CFD_AD_MeshDisp.test_iter = 1000 - pywrapper_CFD_AD_MeshDisp.test_vals = [30.000000, -2.520967, 1.375188, 0.000000] #last 4 columns + pywrapper_CFD_AD_MeshDisp.test_vals = [30.000000, -2.521422, 1.372295, 0.000000] #last 4 columns pywrapper_CFD_AD_MeshDisp.test_vals_aarch64 = [30.000000, -2.516536, 1.386443, 0.000000] pywrapper_CFD_AD_MeshDisp.command = TestCase.Command(exec = "python", param = "run_adjoint.py --parallel -f") pywrapper_CFD_AD_MeshDisp.timeout = 1600 From 0cd77ae9e07e6f35bb1e087bc678040213df8082 Mon Sep 17 00:00:00 2001 From: bigfooted Date: Fri, 17 Nov 2023 15:44:51 +0100 Subject: [PATCH 33/34] update regression test --- TestCases/hybrid_regression_AD.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TestCases/hybrid_regression_AD.py b/TestCases/hybrid_regression_AD.py index bf9db115aec..d763888fe99 100644 --- a/TestCases/hybrid_regression_AD.py +++ b/TestCases/hybrid_regression_AD.py @@ -238,7 +238,7 @@ def main(): pywrapper_FEA_AD_FlowLoad.cfg_dir = "py_wrapper/disc_adj_fea/flow_load_sens" pywrapper_FEA_AD_FlowLoad.cfg_file = "configAD_fem.cfg" pywrapper_FEA_AD_FlowLoad.test_iter = 100 - pywrapper_FEA_AD_FlowLoad.test_vals = [-0.132159, -0.554968, -0.000364, -0.003101] #last 4 columns + pywrapper_FEA_AD_FlowLoad.test_vals = [-0.131415, -0.551701, -0.000364, -0.003101] #last 4 columns pywrapper_FEA_AD_FlowLoad.test_vals_aarch64 = [-0.131745, -0.553214, -0.000364, -0.003101] pywrapper_FEA_AD_FlowLoad.command = TestCase.Command(exec = "python", param = "run_adjoint.py --parallel -f") pywrapper_FEA_AD_FlowLoad.timeout = 1600 From c3d8b9c170711ce4505e11aa188b8d20f1d2446d Mon Sep 17 00:00:00 2001 From: bigfooted Date: Fri, 17 Nov 2023 16:06:01 +0100 Subject: [PATCH 34/34] update regression test --- TestCases/hybrid_regression_AD.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TestCases/hybrid_regression_AD.py b/TestCases/hybrid_regression_AD.py index d763888fe99..7205140ad4c 100644 --- a/TestCases/hybrid_regression_AD.py +++ b/TestCases/hybrid_regression_AD.py @@ -242,7 +242,7 @@ def main(): pywrapper_FEA_AD_FlowLoad.test_vals_aarch64 = [-0.131745, -0.553214, -0.000364, -0.003101] pywrapper_FEA_AD_FlowLoad.command = TestCase.Command(exec = "python", param = "run_adjoint.py --parallel -f") pywrapper_FEA_AD_FlowLoad.timeout = 1600 - pywrapper_FEA_AD_FlowLoad.tol = 1e-3 + pywrapper_FEA_AD_FlowLoad.tol = 5e-3 pywrapper_FEA_AD_FlowLoad.new_output = False pywrapper_FEA_AD_FlowLoad.enabled_with_tsan = False test_list.append(pywrapper_FEA_AD_FlowLoad)