diff --git a/.travis.yml b/.travis.yml
index 07b1bda0b8d3..09224bc7c3da 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -72,11 +72,11 @@ install:
before_script:
# Get the test cases
- - git clone -b develop https://github.com/su2code/TestCases.git ./TestData
+ - git clone --depth=1 -b feature_input_output https://github.com/su2code/TestCases.git ./TestData
- cp -R ./TestData/* ./TestCases/
# Get the tutorial cases
- - git clone -b develop https://github.com/su2code/su2code.github.io ./Tutorials
+ - git clone --depth=1 -b feature_input_output https://github.com/su2code/su2code.github.io ./Tutorials
# Enter the SU2/TestCases/ directory, which is now ready to run
- cd TestCases/
diff --git a/Common/include/config_structure.hpp b/Common/include/config_structure.hpp
index 4776ca081d00..95c7c13cd9d7 100644
--- a/Common/include/config_structure.hpp
+++ b/Common/include/config_structure.hpp
@@ -86,22 +86,13 @@ class CConfig {
unsigned short nZoneSpecified; /*!< \brief Number of zones that are specified in config file. */
su2double Highlite_Area; /*!< \brief Highlite area. */
su2double Fan_Poly_Eff; /*!< \brief Highlite area. */
- su2double OrderMagResidual; /*!< \brief Order of magnitude reduction. */
su2double MinLogResidual; /*!< \brief Minimum value of the log residual. */
- su2double OrderMagResidualFSI; /*!< \brief Order of magnitude reduction. */
- su2double MinLogResidualFSI; /*!< \brief Minimum value of the log residual. */
- su2double OrderMagResidual_BGS_F; /*!< \brief Order of magnitude reduction. */
- su2double MinLogResidual_BGS_F; /*!< \brief Minimum value of the log residual. */
- su2double OrderMagResidual_BGS_S; /*!< \brief Order of magnitude reduction. */
- su2double MinLogResidual_BGS_S; /*!< \brief Minimum value of the log residual. */
- su2double Res_FEM_UTOL; /*!< \brief UTOL criteria for structural FEM. */
- su2double Res_FEM_RTOL; /*!< \brief RTOL criteria for structural FEM. */
- su2double Res_FEM_ETOL; /*!< \brief ETOL criteria for structural FEM. */
- su2double Res_FEM_ADJ; /*!< \brief Convergence criteria for adjoint FEM. */
su2double EA_ScaleFactor; /*!< \brief Equivalent Area scaling factor */
su2double* EA_IntLimit; /*!< \brief Integration limits of the Equivalent Area computation */
su2double AdjointLimit; /*!< \brief Adjoint variable limit */
su2double* Obj_ChainRuleCoeff; /*!< \brief Array defining objective function for adjoint problem based on chain rule in terms of gradient w.r.t. density, velocity, pressure */
+ string* ConvField;
+ unsigned short nConvField;
bool MG_AdjointFlow; /*!< \brief MG with the adjoint flow problem */
su2double* SubsonicEngine_Cyl; /*!< \brief Coordinates of the box subsonic region */
su2double* SubsonicEngine_Values; /*!< \brief Values of the box subsonic region */
@@ -120,7 +111,7 @@ class CConfig {
su2double FFD_Tol; /*!< \brief Tolerance in the point inversion problem. */
su2double Opt_RelaxFactor; /*!< \brief Scale factor for the line search. */
su2double Opt_LineSearch_Bound; /*!< \brief Bounds for the line search. */
- bool Write_Conv_FSI; /*!< \brief Write convergence file for FSI problems. */
+ su2double StartTime;
bool ContinuousAdjoint, /*!< \brief Flag to know if the code is solving an adjoint problem. */
Viscous, /*!< \brief Flag to know if the code is solving a viscous problem. */
EquivArea, /*!< \brief Flag to know if the code is going to compute and plot the equivalent area. */
@@ -163,7 +154,7 @@ class CConfig {
su2double CL_Target; /*!< \brief Weight of the drag coefficient. */
su2double CM_Target; /*!< \brief Weight of the drag coefficient. */
su2double *HTP_Min_XCoord, *HTP_Min_YCoord; /*!< \brief Identification of the HTP. */
- unsigned short Unsteady_Simulation; /*!< \brief Steady or unsteady (time stepping or dual time stepping) computation. */
+ unsigned short TimeMarching; /*!< \brief Steady or unsteady (time stepping or dual time stepping) computation. */
unsigned short Dynamic_Analysis; /*!< \brief Static or dynamic structural analysis. */
unsigned short nStartUpIter; /*!< \brief Start up iterations using the fine grid. */
su2double FixAzimuthalLine; /*!< \brief Fix an azimuthal line due to misalignments of the nearfield. */
@@ -402,6 +393,8 @@ class CConfig {
unsigned long ExtIter_OffSet; /*!< \brief External iteration number offset. */
unsigned long IntIter; /*!< \brief Current internal iteration number. */
unsigned long OuterIter; /*!< \brief Current Outer Iteration for multizone problems. */
+ unsigned long InnerIter; /*!< \brief Current Outer Iteration for multizone problems. */
+ unsigned long TimeIter; /*!< \brief Current Outer Iteration for multizone problems. */
unsigned long Unst_nIntIter; /*!< \brief Number of internal iterations (Dual time Method). */
unsigned long Dyn_nIntIter; /*!< \brief Number of internal iterations (Newton-Raphson Method for nonlinear structural analysis). */
long Unst_RestartIter; /*!< \brief Iteration number to restart an unsteady simulation (Dual time Method). */
@@ -646,7 +639,6 @@ class CConfig {
Wrt_Sol_Freq_DualTime, /*!< \brief Writing solution frequency for Dual Time. */
Wrt_Con_Freq, /*!< \brief Writing convergence history frequency. */
Wrt_Con_Freq_DualTime; /*!< \brief Writing convergence history frequency. */
- bool Wrt_Unsteady; /*!< \brief Write unsteady data adding header and prefix. */
bool Wrt_Dynamic; /*!< \brief Write dynamic data adding header and prefix. */
bool Restart, /*!< \brief Restart solution (for direct, adjoint, and linearized problems).*/
Wrt_Binary_Restart, /*!< \brief Write binary SU2 native restart files.*/
@@ -712,7 +704,7 @@ class CConfig {
unsigned short Analytical_Surface; /*!< \brief Information about the analytical definition of the surface for grid adaptation. */
unsigned short Geo_Description; /*!< \brief Description of the geometry. */
unsigned short Mesh_FileFormat; /*!< \brief Mesh input format. */
- unsigned short Output_FileFormat; /*!< \brief Format of the output files. */
+ unsigned short Tab_FileFormat; /*!< \brief Format of the output files. */
unsigned short ActDisk_Jump; /*!< \brief Format of the output files. */
bool CFL_Adapt; /*!< \brief Adaptive CFL number. */
bool HB_Precondition; /*< \brief Flag to turn on harmonic balance source term preconditioning */
@@ -738,37 +730,24 @@ class CConfig {
su2double* Mesh_Box_Offset; /*!< \brief Array containing the offset from 0.0 in the x-, y-, and z-directions for the analytic RECTANGLE and BOX grid formats. */
string Mesh_FileName, /*!< \brief Mesh input file. */
Mesh_Out_FileName, /*!< \brief Mesh output file. */
- Solution_FlowFileName, /*!< \brief Flow solution input file. */
+ Solution_FileName, /*!< \brief Flow solution input file. */
Solution_LinFileName, /*!< \brief Linearized flow solution input file. */
Solution_AdjFileName, /*!< \brief Adjoint solution input file for drag functional. */
- Solution_FEMFileName, /*!< \brief Solution input file for structural problem. */
- Solution_AdjFEMFileName, /*!< \brief Adjoint solution input file for structural problem. */
- Flow_FileName, /*!< \brief Flow variables output file. */
- Structure_FileName, /*!< \brief Structure variables output file. */
- SurfStructure_FileName, /*!< \brief Surface structure variables output file. */
- AdjStructure_FileName, /*!< \brief Structure variables output file. */
- AdjSurfStructure_FileName, /*!< \brief Surface structure variables output file. */
- SurfHeat_FileName, /*!< \brief Surface structure variables output file. */
- Heat_FileName, /*!< \brief Heat variables output file. */
+ Volume_FileName, /*!< \brief Flow variables output file. */
Residual_FileName, /*!< \brief Residual variables output file. */
Conv_FileName, /*!< \brief Convergence history output file. */
Breakdown_FileName, /*!< \brief Breakdown output file. */
- Conv_FileName_FSI, /*!< \brief Convergence history output file. */
- Restart_FlowFileName, /*!< \brief Restart file for flow variables. */
- Restart_HeatFileName, /*!< \brief Restart file for heat variables. */
+ Restart_FileName, /*!< \brief Restart file for flow variables. */
Restart_AdjFileName, /*!< \brief Restart file for adjoint variables, drag functional. */
- Restart_FEMFileName, /*!< \brief Restart file for FEM elasticity. */
- Restart_AdjFEMFileName, /*!< \brief Restart file for FEM elasticity. */
Adj_FileName, /*!< \brief Output file with the adjoint variables. */
ObjFunc_Grad_FileName, /*!< \brief Gradient of the objective function. */
ObjFunc_Value_FileName, /*!< \brief Objective function. */
- SurfFlowCoeff_FileName, /*!< \brief Output file with the flow variables on the surface. */
+ SurfCoeff_FileName, /*!< \brief Output file with the flow variables on the surface. */
SurfAdjCoeff_FileName, /*!< \brief Output file with the adjoint variables on the surface. */
New_SU2_FileName, /*!< \brief Output SU2 mesh file converted from CGNS format. */
SurfSens_FileName, /*!< \brief Output file for the sensitivity on the surface (discrete adjoint). */
VolSens_FileName; /*!< \brief Output file for the sensitivity in the volume (discrete adjoint). */
- bool Low_MemoryOutput, /*!< \brief Output less information for lower memory use */
- Wrt_Output, /*!< \brief Write any output files */
+ bool Wrt_Output, /*!< \brief Write any output files */
Wrt_Vol_Sol, /*!< \brief Write a volume solution file */
Wrt_Srf_Sol, /*!< \brief Write a surface solution file */
Wrt_Csv_Sol, /*!< \brief Write a surface comma-separated values solution file */
@@ -1078,17 +1057,30 @@ class CConfig {
ofstream *ConvHistFile; /*!< \brief Store the pointer to each history file */
bool Time_Domain; /*!< \brief Determines if the multizone problem is solved in time-domain */
- unsigned long Outer_Iter, /*!< \brief Determines the number of outer iterations in the multizone problem */
- Inner_Iter, /*!< \brief Determines the number of inner iterations in each multizone block */
- Time_Iter, /*!< \brief Determines the number of time iterations in the multizone problem */
- Iter, /*!< \brief Determines the number of pseudo-time iterations in a single-zone problem */
+ unsigned long nOuterIter, /*!< \brief Determines the number of outer iterations in the multizone problem */
+ nInnerIter, /*!< \brief Determines the number of inner iterations in each multizone block */
+ nTimeIter, /*!< \brief Determines the number of time iterations in the multizone problem */
+ nIter, /*!< \brief Determines the number of pseudo-time iterations in a single-zone problem */
Restart_Iter; /*!< \brief Determines the restart iteration in the multizone problem */
su2double Time_Step; /*!< \brief Determines the time step for the multizone problem */
su2double Max_Time; /*!< \brief Determines the maximum time for the time-domain problems */
+ su2double *default_wrt_freq;
+ unsigned long HistoryWrtFreq[3], /*!< \brief Array containing history writing frequencies for timer iter, outer iter, inner iter */
+ ScreenWrtFreq[3]; /*!< \brief Array containing screen writing frequencies for timer iter, outer iter, inner iter */
+ unsigned long VolumeWrtFreq; /*!< \brief Writing frequency for solution files. */
+ unsigned short* VolumeOutputFiles; /*!< \brief File formats to output */
+ unsigned short nVolumeOutputFiles; /*!< \brief Number of File formats to output */
+
bool Multizone_Mesh; /*!< \brief Determines if the mesh contains multiple zones. */
bool SinglezoneDriver; /*!< \brief Determines if the single-zone driver is used. (TEMPORARY) */
+ bool Wrt_ZoneConv; /*!< \brief Write the convergence history of each individual zone to screen. */
+ bool Wrt_ZoneHist; /*!< \brief Write the convergence history of each individual zone to file. */
bool SpecialOutput, /*!< \brief Determines if the special output is written. */
Wrt_ForcesBreakdown; /*!< \brief Determines if the forces breakdown file is written. */
+ string *ScreenOutput, /*!< \brief Kind of the screen output. */
+ *HistoryOutput, *VolumeOutput; /*!< \brief Kind of the output printed to the history file. */
+ unsigned short nScreenOutput, /*!< \brief Number of screen output variables (max: 6). */
+ nHistoryOutput, nVolumeOutput; /*!< \brief Number of variables printed to the history file. */
bool Multizone_Residual; /*!< \brief Determines if memory should be allocated for the multizone residual. */
bool using_uq; /*!< \brief Using uncertainty quantification with SST model */
@@ -2973,7 +2965,6 @@ class CConfig {
* \return Total number of boundary markers.
*/
unsigned short GetnMarker_NearFieldBound(void);
-
/*!
* \brief Get the total number of deformable markers at the boundary.
* \return Total number of deformable markers at the boundary.
@@ -3064,12 +3055,6 @@ class CConfig {
*/
void SetnMarker_All(unsigned short val_nmarker);
- /*!
- * \brief Get the number of external iterations.
- * \return Number of external iterations.
- */
- unsigned long GetnExtIter(void);
-
/*!
* \brief Get the number of internal iterations.
* \return Number of internal iterations.
@@ -3082,12 +3067,6 @@ class CConfig {
*/
unsigned long GetDyn_nIntIter(void);
- /*!
- * \brief Get the restart iteration number for unsteady simulations.
- * \return Restart iteration number for unsteady simulations.
- */
- long GetUnst_RestartIter(void);
-
/*!
* \brief Get the starting direct iteration number for the unsteady adjoint (reverse time integration).
* \return Starting direct iteration number for the unsteady adjoint.
@@ -3100,12 +3079,6 @@ class CConfig {
*/
unsigned long GetIter_Avg_Objective(void);
- /*!
- * \brief Get the restart iteration number for dynamic structural simulations.
- * \return Restart iteration number for dynamic structural simulations.
- */
- long GetDyn_RestartIter(void);
-
/*!
* \brief Retrieves the number of periodic time instances for Harmonic Balance.
* \return: Number of periodic time instances for Harmonic Balance.
@@ -3118,43 +3091,35 @@ class CConfig {
*/
su2double GetHarmonicBalance_Period(void);
- /*!
- * \brief Set the number of external iterations.
- * \note This is important in no time depending methods, where only
- * one external iteration is needed.
- * \param[in] val_niter - Set the number of external iterations.
- */
- void SetnExtIter(unsigned long val_niter);
-
/*!
* \brief Set the current external iteration number.
* \param[in] val_iter - Current external iteration number.
*/
- void SetExtIter(unsigned long val_iter);
+ void SetExtIter_OffSet(unsigned long val_iter);
/*!
- * \brief Set the current external iteration number.
- * \param[in] val_iter - Current external iteration number.
+ * \brief Set the current FSI iteration number.
+ * \param[in] val_iter - Current FSI iteration number.
*/
- void SetExtIter_OffSet(unsigned long val_iter);
+ void SetOuterIter(unsigned long val_iter);
/*!
* \brief Set the current FSI iteration number.
* \param[in] val_iter - Current FSI iteration number.
*/
- void SetOuterIter(unsigned long val_iter);
+ void SetInnerIter(unsigned long val_iter);
/*!
- * \brief Set the current internal iteration number.
- * \param[in] val_iter - Current external iteration number.
+ * \brief Set the current time iteration number.
+ * \param[in] val_iter - Current FSI iteration number.
*/
- void SetIntIter(unsigned long val_iter);
+ void SetTimeIter(unsigned long val_iter);
/*!
- * \brief Get the current external iteration number.
- * \return Current external iteration.
+ * \brief Get the current time iteration number.
+ * \param[in] val_iter - Current time iterationnumber.
*/
- unsigned long GetExtIter(void);
+ unsigned long GetTimeIter();
/*!
* \brief Get the current internal iteration number.
@@ -3169,11 +3134,11 @@ class CConfig {
unsigned long GetOuterIter(void);
/*!
- * \brief Get the current internal iteration number.
- * \return Current internal iteration.
+ * \brief Get the current FSI iteration number.
+ * \return Current FSI iteration.
*/
- unsigned long GetIntIter(void);
-
+ unsigned long GetInnerIter(void);
+
/*!
* \brief Set the current physical time.
* \param[in] val_t - Current physical time.
@@ -3233,13 +3198,7 @@ class CConfig {
* \return TRUE means that a volume solution file will be written.
*/
bool GetWrt_Vol_Sol(void);
-
- /*!
- * \brief Get information about writing a volume solution file.
- * \return TRUE means that a volume solution file will be written.
- */
- bool GetLow_MemoryOutput(void);
-
+
/*!
* \brief Get information about writing a surface solution file.
* \return TRUE means that a surface solution file will be written.
@@ -4784,12 +4743,6 @@ class CConfig {
*/
bool GetFrozen_Limiter_Disc(void);
- /*!
- * \brief Write convergence file for FSI problems
- * \return FALSE means no file is written.
- */
- bool GetWrite_Conv_FSI(void);
-
/*!
* \brief Provides information about if the sharp edges are going to be removed from the sensitivity.
* \return FALSE means that the sharp edges will be removed from the sensitivity.
@@ -5196,7 +5149,7 @@ class CConfig {
* \return The kind of time integration: Steady state, time stepping method (unsteady) or
* dual time stepping method (unsteady).
*/
- unsigned short GetUnsteady_Simulation(void);
+ unsigned short GetTime_Marching(void);
/*!
* \brief Provides the number of chemical reactions in the chemistry model
@@ -5421,7 +5374,7 @@ class CConfig {
* \brief Get the name of the file with the solution of the flow problem.
* \return Name of the file with the solution of the flow problem.
*/
- string GetSolution_FlowFileName(void);
+ string GetSolution_FileName(void);
/*!
* \brief Get the name of the file with the solution of the adjoint flow problem
@@ -5430,19 +5383,7 @@ class CConfig {
* drag objective function.
*/
string GetSolution_AdjFileName(void);
-
- /*!
- * \brief Get the name of the file with the solution of the structural problem.
- * \return Name of the file with the solution of the structural problem.
- */
- string GetSolution_FEMFileName(void);
-
- /*!
- * \brief Get the name of the file with the solution of the adjoint structural problem.
- * \return Name of the file with the solution of the structural problem.
- */
- string GetSolution_AdjFEMFileName(void);
-
+
/*!
* \brief Get the name of the file with the residual of the problem.
* \return Name of the file with the residual of the problem.
@@ -5459,7 +5400,7 @@ class CConfig {
* \brief Get the format of the output solution.
* \return Format of the output solution.
*/
- unsigned short GetOutput_FileFormat(void);
+ unsigned short GetTabular_FileFormat(void);
/*!
* \brief Get the format of the output solution.
@@ -5472,13 +5413,7 @@ class CConfig {
* \return Name of the file with convergence history of the problem.
*/
string GetConv_FileName(void);
-
- /*!
- * \brief Get the name of the file with the convergence history of the problem for FSI applications.
- * \return Name of the file with convergence history of the problem.
- */
- string GetConv_FileName_FSI(void);
-
+
/*!
* \brief Get the name of the file with the forces breakdown of the problem.
* \return Name of the file with forces breakdown of the problem.
@@ -5489,67 +5424,40 @@ class CConfig {
* \brief Get the name of the file with the flow variables.
* \return Name of the file with the primitive variables.
*/
- string GetFlow_FileName(void);
-
- /*!
- * \brief Get the name of the file with the structure variables.
- * \return Name of the file with the structure variables.
- */
- string GetStructure_FileName(void);
-
- /*!
- * \brief Get the name of the file with the structure variables.
- * \return Name of the file with the structure variables.
- */
- string GetSurfStructure_FileName(void);
-
- /*!
- * \brief Get the name of the file with the adjoint structure variables.
- * \return Name of the file with the adjoint structure variables.
- */
- string GetAdjStructure_FileName(void);
-
- /*!
- * \brief Get the name of the file with the adjoint structure variables.
- * \return Name of the file with the adjoint structure variables.
- */
- string GetAdjSurfStructure_FileName(void);
-
- /*!
- * \brief Get the name of the file with the structure variables.
- * \return Name of the file with the structure variables.
- */
- string GetSurfHeat_FileName(void);
-
- /*!
- * \brief Get the name of the file with the wave variables.
- * \return Name of the file with the wave variables.
- */
- string GetHeat_FileName(void);
-
+ string GetVolume_FileName(void);
+
/*!
* \brief Get the name of the restart file for the heat variables.
* \return Name of the restart file for the flow variables.
*/
string GetRestart_HeatFileName(void);
+ /*!
+ * \brief Add any numbers necessary to the filename (iteration number, zone ID ...)
+ * \param[in] config - Definition of the particular problem.
+ * \param[in] filename - the base filename.
+ * \param[in] ext - the extension to be added.
+ * \return The new filename
+ */
+ string GetFilename(string filename, string ext, unsigned long Iter);
+
/*!
* \brief Append the zone index to the restart or the solution files.
* \return Name of the restart file for the flow variables.
*/
- string GetMultizone_FileName(string val_filename, int val_iZone);
+ string GetMultizone_FileName(string val_filename, int val_iZone, string ext);
/*!
* \brief Append the zone index to the restart or the solution files.
* \return Name of the restart file for the flow variables.
*/
- string GetMultizone_HistoryFileName(string val_filename, int val_iZone);
+ string GetMultizone_HistoryFileName(string val_filename, int val_iZone, string ext);
/*!
* \brief Append the instance index to the restart or the solution files.
* \return Name of the restart file for the flow variables.
*/
- string GetMultiInstance_FileName(string val_filename, int val_iInst);
+ string GetMultiInstance_FileName(string val_filename, int val_iInst, string ext);
/*!
* \brief Append the instance index to the restart or the solution files.
@@ -5561,26 +5469,14 @@ class CConfig {
* \brief Get the name of the restart file for the flow variables.
* \return Name of the restart file for the flow variables.
*/
- string GetRestart_FlowFileName(void);
+ string GetRestart_FileName(void);
/*!
* \brief Get the name of the restart file for the adjoint variables (drag objective function).
* \return Name of the restart file for the adjoint variables (drag objective function).
*/
string GetRestart_AdjFileName(void);
-
- /*!
- * \brief Get the name of the restart file for the structural variables.
- * \return Name of the restart file for the structural variables.
- */
- string GetRestart_FEMFileName(void);
-
- /*!
- * \brief Get the name of the restart file for the structural adjoint variables.
- * \return Name of the restart file for the structural adjoint variables.
- */
- string GetRestart_AdjFEMFileName(void);
-
+
/*!
* \brief Get the name of the file with the adjoint variables.
* \return Name of the file with the adjoint variables.
@@ -5603,7 +5499,7 @@ class CConfig {
* \brief Get the name of the file with the surface information for the flow problem.
* \return Name of the file with the surface information for the flow problem.
*/
- string GetSurfFlowCoeff_FileName(void);
+ string GetSurfCoeff_FileName(void);
/*!
* \brief Get the name of the file with the surface information for the adjoint problem.
@@ -5629,7 +5525,7 @@ class CConfig {
* \param[in] val_iter - Unsteady iteration number or time instance.
* \return Name of the file with the iteration number for an unsteady solution file.
*/
- string GetUnsteady_FileName(string val_filename, int val_iter);
+ string GetUnsteady_FileName(string val_filename, int val_iter, string ext);
/*!
* \brief Append the input filename string with the appropriate objective function extension.
@@ -6289,78 +6185,12 @@ class CConfig {
*/
unsigned short GetContainerPosition(unsigned short val_eqsystem);
- /*!
- * \brief Value of the order of magnitude reduction of the residual.
- * \return Value of the order of magnitude reduction of the residual.
- */
- su2double GetOrderMagResidual(void);
-
/*!
* \brief Value of the minimum residual value (log10 scale).
* \return Value of the minimum residual value (log10 scale).
*/
su2double GetMinLogResidual(void);
- /*!
- * \brief Value of the order of magnitude reduction of the residual for FSI applications.
- * \return Value of the order of magnitude reduction of the residual.
- */
- su2double GetOrderMagResidualFSI(void);
-
- /*!
- * \brief Value of the minimum residual value for FSI applications (log10 scale).
- * \return Value of the minimum residual value (log10 scale).
- */
- su2double GetMinLogResidualFSI(void);
-
- /*!
- * \brief Value of the order of magnitude reduction of the flow residual for BGS applications.
- * \return Value of the order of magnitude reduction of the residual.
- */
- su2double GetOrderMagResidual_BGS_F(void);
-
- /*!
- * \brief Value of the minimum flow residual value for BGS applications (log10 scale).
- * \return Value of the minimum residual value (log10 scale).
- */
- su2double GetMinLogResidual_BGS_F(void);
-
- /*!
- * \brief Value of the order of magnitude reduction of the flow residual for BGS applications.
- * \return Value of the order of magnitude reduction of the residual.
- */
- su2double GetOrderMagResidual_BGS_S(void);
-
- /*!
- * \brief Value of the minimum flow residual value for BGS applications (log10 scale).
- * \return Value of the minimum residual value (log10 scale).
- */
- su2double GetMinLogResidual_BGS_S(void);
-
- /*!
- * \brief Value of the displacement tolerance UTOL for FEM structural analysis (log10 scale).
- * \return Value of Res_FEM_UTOL (log10 scale).
- */
- su2double GetResidual_FEM_UTOL(void);
-
- /*!
- * \brief Value of the displacement tolerance UTOL for FEM structural analysis (log10 scale).
- * \return Value of Res_FEM_UTOL (log10 scale).
- */
- su2double GetResidual_FEM_RTOL(void);
-
- /*!
- * \brief Value of the displacement tolerance UTOL for FEM structural analysis (log10 scale).
- * \return Value of Res_FEM_UTOL (log10 scale).
- */
- su2double GetResidual_FEM_ETOL(void);
-
- /*!
- * \brief Value of the maximum objective function for FEM elasticity adjoint (log10 scale).
- * \return Value of Res_FEM_ADJ (log10 scale).
- */
- su2double GetCriteria_FEM_ADJ(void);
-
/*!
* \brief Value of the damping factor for the engine inlet bc.
* \return Value of the damping factor.
@@ -6498,7 +6328,7 @@ class CConfig {
* \param[in] val_solver - Solver of the simulation.
* \param[in] val_system - Runtime system that we are solving.
*/
- void SetGlobalParam(unsigned short val_solver, unsigned short val_system, unsigned long val_extiter);
+ void SetGlobalParam(unsigned short val_solver, unsigned short val_system);
/*!
* \brief Center of rotation for a rotational periodic boundary.
@@ -9210,10 +9040,16 @@ class CConfig {
/*!
* \brief Get the number of time iterations
- * \return Number of time steps run for the multizone problem
+ * \return Number of time steps run
*/
unsigned long GetnTime_Iter(void);
+ /*!
+ * \brief Set the number of time iterations
+ * \param[in] val_iter - Number of time steps run
+ */
+ void SetnTime_Iter(unsigned long val_iter);
+
/*!
* \brief Get the number of pseudo-time iterations
* \return Number of pseudo-time steps run for the single-zone problem
@@ -9262,6 +9098,19 @@ class CConfig {
*/
bool GetSinglezone_Driver(void);
+ /*!
+ * \brief Check if the convergence history of each individual zone is written to screen
+ * \return YES if the zone convergence history of each individual zone must be written to screen
+ */
+ bool GetWrt_ZoneConv(void);
+
+ /*!
+ * \brief Check if the convergence history of each individual zone is written to file
+ * \return YES if the zone convergence history of each individual zone must be written to file
+ */
+ bool GetWrt_ZoneHist(void);
+
+
/*!
* \brief Check if the special output is written
* \return YES if the special output is written.
@@ -9292,6 +9141,91 @@ class CConfig {
*/
su2double GetMeshBoxOffset(unsigned short val_iDim);
+ /*!
+ * \brief Get the number of screen output variables requested (maximum 6)
+ */
+ unsigned short GetnScreenOutput(void);
+
+ /*
+ * \brief Get the screen output field iField
+ */
+ string GetScreenOutput_Field(unsigned short iField);
+
+ /*!
+ * \brief Get the number of history output variables requested
+ */
+ unsigned short GetnHistoryOutput(void);
+
+ /*
+ * \brief Get the history output field iField
+ */
+ string GetHistoryOutput_Field(unsigned short iField);
+
+ /*!
+ * \brief Get the number of history output variables requested
+ */
+ unsigned short GetnVolumeOutput(void);
+
+ /*
+ * \brief Get the history output field iField
+ */
+ string GetVolumeOutput_Field(unsigned short iField);
+
+ /*
+ * \brief Get the convergence fields for monitoring
+ * \param[in] iField - Index of the field
+ * return Field name for monitoring convergence
+ */
+ string GetConv_Field(unsigned short iField);
+
+ /*
+ * \brief Get the number of convergence monitoring fields.
+ * return Number of convergence monitoring fields.
+ */
+ unsigned short GetnConv_Field();
+
+ /*!
+ * \brief Set_StartTime
+ * \param starttime
+ */
+ void Set_StartTime(su2double starttime);
+
+ /*!
+ * \brief Get_StartTime
+ * \return
+ */
+ su2double Get_StartTime();
+
+ /*!
+ * \brief GetHistory_Wrt_Freq_Inner
+ * \return
+ */
+ unsigned long GetHistory_Wrt_Freq(unsigned short iter);
+
+ /*!
+ * \brief GetScreen_Wrt_Freq_Inner
+ * \return
+ */
+ unsigned long GetScreen_Wrt_Freq(unsigned short iter);
+
+ /*!
+ * \brief GetScreen_Wrt_Freq_Inner
+ * \return
+ */
+ unsigned long GetVolume_Wrt_Freq();
+
+ /*!
+ * \brief GetVolumeOutputFiles
+ * \return
+ */
+ unsigned short* GetVolumeOutputFiles();
+
+ /*!
+ * \brief GetnVolumeOutputFiles
+ * \return
+ */
+ unsigned short GetnVolumeOutputFiles();
+
/*!
* \brief Get the desired factorization frequency for PaStiX
* \return Number of calls to 'Build' that trigger re-factorization.
@@ -9310,6 +9244,12 @@ class CConfig {
*/
unsigned short GetPastixFillLvl(void);
+ /*!
+ * \brief Check if an option is present in the config file
+ * \param[in] - Name of the option
+ * \return if option was set in the config file
+ */
+ bool OptionIsSet(string option);
};
#include "config_structure.inl"
diff --git a/Common/include/config_structure.inl b/Common/include/config_structure.inl
index 15779e16af2a..1060f486668a 100644
--- a/Common/include/config_structure.inl
+++ b/Common/include/config_structure.inl
@@ -36,6 +36,7 @@
*/
#pragma once
+#include "config_structure.hpp"
inline su2double CConfig::GetHTP_Axis(unsigned short val_index) { return HTP_Axis[val_index]; }
@@ -297,34 +298,30 @@ inline bool CConfig::GetContinuous_Adjoint(void) { return ContinuousAdjoint; }
inline bool CConfig::GetViscous(void) { return Viscous; }
-inline unsigned long CConfig::GetnExtIter(void) { return nExtIter; }
-
inline unsigned short CConfig::GetnTimeInstances(void) { return nTimeInstances; }
inline su2double CConfig::GetHarmonicBalance_Period(void) { return HarmonicBalance_Period; }
-inline void CConfig::SetExtIter(unsigned long val_iter) { ExtIter = val_iter; }
-
inline void CConfig::SetExtIter_OffSet(unsigned long val_iter) { ExtIter_OffSet = val_iter; }
inline void CConfig::SetOuterIter(unsigned long val_iter) { OuterIter = val_iter; }
-inline void CConfig::SetIntIter(unsigned long val_iter) { IntIter = val_iter; }
+inline void CConfig::SetInnerIter(unsigned long val_iter) { InnerIter = val_iter; }
-inline unsigned long CConfig::GetExtIter(void) { return ExtIter; }
+inline void CConfig::SetTimeIter(unsigned long val_iter) { TimeIter = val_iter; }
inline unsigned long CConfig::GetExtIter_OffSet(void) { return ExtIter_OffSet; }
inline unsigned long CConfig::GetOuterIter(void) { return OuterIter; }
-inline unsigned long CConfig::GetIntIter(void) { return IntIter; }
+inline unsigned long CConfig::GetInnerIter(void) { return InnerIter; }
+
+inline unsigned long CConfig::GetTimeIter(void) { return TimeIter; }
inline unsigned long CConfig::GetUnst_nIntIter(void) { return Unst_nIntIter; }
inline unsigned long CConfig::GetDyn_nIntIter(void) { return Dyn_nIntIter; }
-inline long CConfig::GetUnst_RestartIter(void) { return Unst_RestartIter; }
-
inline long CConfig::GetUnst_AdjointIter(void) { return Unst_AdjointIter; }
inline void CConfig::SetPhysicalTime(su2double val_t) { PhysicalTime = val_t; }
@@ -335,8 +332,6 @@ inline bool CConfig::GetReorientElements(void) { return ReorientElements; }
inline unsigned long CConfig::GetIter_Avg_Objective(void) { return Iter_Avg_Objective ; }
-inline long CConfig::GetDyn_RestartIter(void) { return Dyn_RestartIter; }
-
inline string CConfig::GetPlaneTag(unsigned short index) { return PlaneTag[index]; }
inline su2double CConfig::GetEA_IntLimit(unsigned short index) { return EA_IntLimit[index]; }
@@ -439,8 +434,6 @@ inline void CConfig::SetSemiSpan(su2double val_semispan) { SemiSpan = val_semisp
inline void CConfig::SetDomainVolume(su2double val_volume) { DomainVolume = val_volume; }
-inline void CConfig::SetnExtIter(unsigned long val_niter) { nExtIter = val_niter; }
-
inline su2double CConfig::GetMach(void) { return Mach; }
inline su2double CConfig::GetGamma(void) { return Gamma; }
@@ -847,8 +840,6 @@ inline void CConfig::SetWrt_Con_Freq(unsigned long val_freq) { Wrt_Con_Freq = va
inline unsigned long CConfig::GetWrt_Con_Freq_DualTime(void) { return Wrt_Con_Freq_DualTime; }
-inline bool CConfig::GetWrt_Unsteady(void) { return Wrt_Unsteady; }
-
inline unsigned short CConfig::GetKind_Solver(void) { return Kind_Solver; }
inline void CConfig::SetKind_Solver(unsigned short val_solver) { Kind_Solver = val_solver; }
@@ -1307,7 +1298,7 @@ inline su2double CConfig::GetCoeff_ObjChainRule(unsigned short iVar) { return Ob
inline unsigned short CConfig::GetKind_SensSmooth(void) { return Kind_SensSmooth; }
-inline unsigned short CConfig::GetUnsteady_Simulation(void) { return Unsteady_Simulation; }
+inline unsigned short CConfig::GetTime_Marching(void) { return TimeMarching; }
inline bool CConfig::GetRestart(void) { return Restart; }
@@ -1480,55 +1471,31 @@ inline string CConfig::GetMesh_Out_FileName(void) { return Mesh_Out_FileName; }
inline unsigned short CConfig::GetMesh_FileFormat(void) { return Mesh_FileFormat; }
-inline unsigned short CConfig::GetOutput_FileFormat(void) { return Output_FileFormat; }
+inline unsigned short CConfig::GetTabular_FileFormat(void) { return Tab_FileFormat; }
inline unsigned short CConfig::GetActDisk_Jump(void) { return ActDisk_Jump; }
inline string CConfig::GetConv_FileName(void) { return Conv_FileName; }
-inline string CConfig::GetConv_FileName_FSI(void) { return Conv_FileName_FSI; }
-
inline string CConfig::GetBreakdown_FileName(void) { return Breakdown_FileName; }
-inline string CConfig::GetSolution_FlowFileName(void) { return Solution_FlowFileName; }
+inline string CConfig::GetSolution_FileName(void) { return Solution_FileName; }
inline string CConfig::GetSolution_AdjFileName(void) { return Solution_AdjFileName; }
-inline string CConfig::GetSolution_FEMFileName(void) { return Solution_FEMFileName; }
-
-inline string CConfig::GetSolution_AdjFEMFileName(void) { return Solution_AdjFEMFileName; }
-
-inline string CConfig::GetFlow_FileName(void) { return Flow_FileName; }
-
-inline string CConfig::GetStructure_FileName(void) { return Structure_FileName; }
-
-inline string CConfig::GetSurfStructure_FileName(void) { return SurfStructure_FileName; }
-
-inline string CConfig::GetAdjStructure_FileName(void) { return Structure_FileName; }
+inline string CConfig::GetVolume_FileName(void) { return Volume_FileName; }
-inline string CConfig::GetAdjSurfStructure_FileName(void) { return SurfStructure_FileName; }
-
-inline string CConfig::GetSurfHeat_FileName(void) { return SurfHeat_FileName; }
-
-inline string CConfig::GetHeat_FileName(void) { return Heat_FileName; }
-
-inline string CConfig::GetRestart_FlowFileName(void) { return Restart_FlowFileName; }
-
-inline string CConfig::GetRestart_HeatFileName(void) { return Restart_HeatFileName; }
+inline string CConfig::GetRestart_FileName(void) { return Restart_FileName; }
inline string CConfig::GetRestart_AdjFileName(void) { return Restart_AdjFileName; }
-inline string CConfig::GetRestart_FEMFileName(void) { return Restart_FEMFileName; }
-
-inline string CConfig::GetRestart_AdjFEMFileName(void) { return Restart_AdjFEMFileName; }
-
inline string CConfig::GetAdj_FileName(void) { return Adj_FileName; }
inline string CConfig::GetObjFunc_Grad_FileName(void) { return ObjFunc_Grad_FileName; }
inline string CConfig::GetObjFunc_Value_FileName(void) { return ObjFunc_Value_FileName; }
-inline string CConfig::GetSurfFlowCoeff_FileName(void) { return SurfFlowCoeff_FileName; }
+inline string CConfig::GetSurfCoeff_FileName(void) { return SurfCoeff_FileName; }
inline string CConfig::GetSurfAdjCoeff_FileName(void) { return SurfAdjCoeff_FileName; }
@@ -1574,8 +1541,6 @@ inline su2double CConfig::GetDV_Value(unsigned short val_dv, unsigned short val_
inline void CConfig::SetDV_Value(unsigned short val_dv, unsigned short val_ind, su2double val) { DV_Value[val_dv][val_ind] = val; }
-inline su2double CConfig::GetOrderMagResidual(void) { return OrderMagResidual; }
-
inline su2double CConfig::GetMinLogResidual(void) { return MinLogResidual; }
inline su2double CConfig::GetDamp_Engine_Inflow(void) { return Damp_Engine_Inflow; }
@@ -1627,7 +1592,7 @@ inline bool CConfig::GetGrid_Movement(void) { return (Kind_GridMovement != NO_MO
inline bool CConfig::GetDynamic_Grid(void) {
return (Kind_GridMovement != NO_MOVEMENT)
|| ((nKind_SurfaceMovement > 0) && !GetSurface_Movement(FLUID_STRUCTURE_STATIC))
- || (Deform_Mesh && (Unsteady_Simulation != NO));
+ || (Deform_Mesh && (Time_Domain));
}
inline unsigned short CConfig::GetKind_SurfaceMovement(unsigned short iMarkerMoving){return Kind_SurfaceMovement[iMarkerMoving];}
@@ -1670,8 +1635,6 @@ inline bool CConfig::GetInconsistent_Disc(void){ return Inconsistent_Disc; }
inline bool CConfig::GetSens_Remove_Sharp(void) { return Sens_Remove_Sharp; }
-inline bool CConfig::GetWrite_Conv_FSI(void) { return Write_Conv_FSI; }
-
inline bool CConfig::GetHold_GridFixed(void) { return Hold_GridFixed; }
inline su2double CConfig::GetCyclic_Pitch(void) { return Cyclic_Pitch; }
@@ -1684,8 +1647,6 @@ inline string CConfig::GetDV_Sens_Filename(void) { return DV_Sens_Filename; }
inline string CConfig::GetDV_Unordered_Sens_Filename(void) { return DV_Unordered_Sens_Filename; }
-inline bool CConfig::GetLow_MemoryOutput(void) { return Low_MemoryOutput; }
-
inline bool CConfig::GetWrt_Output(void) { return Wrt_Output; }
inline bool CConfig::GetWrt_Vol_Sol(void) { return Wrt_Vol_Sol; }
@@ -1938,26 +1899,6 @@ inline bool CConfig::GetConservativeInterpolation(void) { return ConservativeInt
inline unsigned short CConfig::GetRelaxation_Method_FSI(void) { return Kind_BGS_RelaxMethod; }
-inline su2double CConfig::GetOrderMagResidualFSI(void) { return OrderMagResidualFSI; }
-
-inline su2double CConfig::GetMinLogResidualFSI(void) { return MinLogResidualFSI; }
-
-inline su2double CConfig::GetOrderMagResidual_BGS_F(void) { return OrderMagResidual_BGS_F; }
-
-inline su2double CConfig::GetMinLogResidual_BGS_F(void) { return MinLogResidual_BGS_F; }
-
-inline su2double CConfig::GetOrderMagResidual_BGS_S(void) { return OrderMagResidual_BGS_S; }
-
-inline su2double CConfig::GetMinLogResidual_BGS_S(void) { return MinLogResidual_BGS_S; }
-
-inline su2double CConfig::GetResidual_FEM_UTOL(void) { return Res_FEM_UTOL; }
-
-inline su2double CConfig::GetResidual_FEM_RTOL(void) { return Res_FEM_RTOL; }
-
-inline su2double CConfig::GetResidual_FEM_ETOL(void) { return Res_FEM_ETOL; }
-
-inline su2double CConfig::GetCriteria_FEM_ADJ(void) { return Res_FEM_ADJ; }
-
inline unsigned short CConfig::GetDynamic_LoadTransfer(void) { return Dynamic_LoadTransfer; }
inline unsigned short CConfig::GetDirectDiff() { return DirectDiff;}
@@ -2055,13 +1996,15 @@ inline string CConfig::GetMarkerTag_ZoneInterface(unsigned short val_iMarker) {
inline bool CConfig::GetTime_Domain(void) { return Time_Domain; }
-inline unsigned long CConfig::GetnInner_Iter(void) { return Inner_Iter; }
+inline unsigned long CConfig::GetnInner_Iter(void) { return nInnerIter; }
+
+inline unsigned long CConfig::GetnOuter_Iter(void) { return nOuterIter; }
-inline unsigned long CConfig::GetnOuter_Iter(void) { return Outer_Iter; }
+inline unsigned long CConfig::GetnTime_Iter(void) { return nTimeIter; }
-inline unsigned long CConfig::GetnTime_Iter(void) { return Time_Iter; }
+inline void CConfig::SetnTime_Iter(unsigned long val_iter) { nTimeIter = val_iter; }
-inline unsigned long CConfig::GetnIter(void) { return Iter; }
+inline unsigned long CConfig::GetnIter(void) { return nIter; }
inline unsigned long CConfig::GetRestart_Iter(void) { return Restart_Iter; }
@@ -2075,10 +2018,26 @@ inline bool CConfig::GetMultizone_Residual(void) { return Multizone_Residual; }
inline bool CConfig::GetSinglezone_Driver(void) { return SinglezoneDriver; }
+inline bool CConfig::GetWrt_ZoneConv(void) { return Wrt_ZoneConv; }
+
+inline bool CConfig::GetWrt_ZoneHist(void) { return Wrt_ZoneHist; }
+
inline bool CConfig::GetSpecial_Output(void) { return SpecialOutput; }
inline bool CConfig::GetWrt_ForcesBreakdown(void) { return Wrt_ForcesBreakdown; }
+inline unsigned short CConfig::GetnScreenOutput(void) { return nScreenOutput; }
+
+inline string CConfig::GetScreenOutput_Field(unsigned short iField) { return ScreenOutput[iField]; }
+
+inline unsigned short CConfig::GetnHistoryOutput(void) { return nHistoryOutput; }
+
+inline string CConfig::GetHistoryOutput_Field(unsigned short iField) { return HistoryOutput[iField]; }
+
+inline unsigned short CConfig::GetnVolumeOutput(void) { return nVolumeOutput; }
+
+inline string CConfig::GetVolumeOutput_Field(unsigned short iField) { return VolumeOutput[iField]; }
+
inline bool CConfig::GetUsing_UQ(void) { return using_uq; }
inline su2double CConfig::GetUQ_Delta_B(void) { return uq_delta_b; }
@@ -2100,3 +2059,23 @@ inline short CConfig::GetMeshBoxSize(unsigned short val_iDim) { return Mesh_Box_
inline su2double CConfig::GetMeshBoxLength(unsigned short val_iDim) { return Mesh_Box_Length[val_iDim]; }
inline su2double CConfig::GetMeshBoxOffset(unsigned short val_iDim) { return Mesh_Box_Offset[val_iDim]; }
+
+inline string CConfig::GetConv_Field(unsigned short iField){ return ConvField[iField]; }
+
+inline unsigned short CConfig::GetnConv_Field(){ return nConvField; }
+
+inline void CConfig::Set_StartTime(su2double starttime){StartTime = starttime;}
+
+inline su2double CConfig::Get_StartTime() {return StartTime;}
+
+inline unsigned long CConfig::GetHistory_Wrt_Freq(unsigned short iter) {return HistoryWrtFreq[iter];}
+
+inline unsigned long CConfig::GetScreen_Wrt_Freq(unsigned short iter) {return ScreenWrtFreq[iter];}
+
+inline unsigned long CConfig::GetVolume_Wrt_Freq() {return VolumeWrtFreq;}
+
+inline unsigned short* CConfig::GetVolumeOutputFiles() {return VolumeOutputFiles;}
+
+inline unsigned short CConfig::GetnVolumeOutputFiles() {return nVolumeOutputFiles;}
+
+inline bool CConfig::OptionIsSet(string option){ return all_options.find(option) == all_options.end();}
diff --git a/Common/include/geometry_structure.hpp b/Common/include/geometry_structure.hpp
index d5045a7f7214..bc8d00bc2077 100644
--- a/Common/include/geometry_structure.hpp
+++ b/Common/include/geometry_structure.hpp
@@ -1691,6 +1691,12 @@ class CGeometry {
*/
unsigned short GetMGLevel(void);
+ /*!
+ * \brief Compute and store the volume of the elements.
+ * \param[in] config - Problem configuration.
+ */
+ void UpdateBoundaries(CConfig *config);
+
/*!
* \brief A virtual member.
* \param config - Config
diff --git a/Common/include/grid_movement_structure.hpp b/Common/include/grid_movement_structure.hpp
index 907a44632adb..fbe90a13d007 100644
--- a/Common/include/grid_movement_structure.hpp
+++ b/Common/include/grid_movement_structure.hpp
@@ -1652,7 +1652,7 @@ class CSurfaceMovement : public CGridMovement {
* \param[in] iMarker_Monitoring - Marker we are monitoring.
* \param[in] displacements - solution of typical section wing model.
*/
- void AeroelasticDeform(CGeometry *geometry, CConfig *config, unsigned long ExtIter, unsigned short iMarker, unsigned short iMarker_Monitoring, vector& displacements);
+ void AeroelasticDeform(CGeometry *geometry, CConfig *config, unsigned long TimeIter, unsigned short iMarker, unsigned short iMarker_Monitoring, vector& displacements);
/*!
* \brief Deforms a 3-D flutter/pitching surface during an unsteady simulation.
diff --git a/Common/include/option_structure.hpp b/Common/include/option_structure.hpp
index e9fdbe537ea4..4edc8f8e88a1 100644
--- a/Common/include/option_structure.hpp
+++ b/Common/include/option_structure.hpp
@@ -1522,13 +1522,13 @@ static const map Adapt_Map = CCreateMap
*/
enum ENUM_INPUT {
SU2 = 1, /*!< \brief SU2 input format. */
- CGNS = 2, /*!< \brief CGNS input format for the computational grid. */
+ CGNS_GRID = 2, /*!< \brief CGNS input format for the computational grid. */
RECTANGLE = 3, /*!< \brief 2D rectangular mesh with N x M points of size Lx x Ly. */
BOX = 4 /*!< \brief 3D box mesh with N x M x L points of size Lx x Ly x Lz. */
};
static const map Input_Map = CCreateMap
("SU2", SU2)
-("CGNS", CGNS)
+("CGNS", CGNS_GRID)
("RECTANGLE", RECTANGLE)
("BOX", BOX);
@@ -1538,22 +1538,46 @@ static const map Input_Map = CCreateMap
enum ENUM_OUTPUT {
TECPLOT = 1, /*!< \brief Tecplot format for the solution output. */
TECPLOT_BINARY = 2, /*!< \brief Tecplot binary format for the solution output. */
- FIELDVIEW = 3, /*!< \brief FieldView format for the solution output. */
- FIELDVIEW_BINARY = 4, /*!< \brief FieldView binary format for the solution output. */
+ SURFACE_TECPLOT = 3, /*!< \brief Tecplot format for the solution output. */
+ SURFACE_TECPLOT_BINARY = 4, /*!< \brief Tecplot binary format for the solution output. */
CSV = 5, /*!< \brief Comma-separated values format for the solution output. */
- CGNS_SOL = 6, /*!< \brief CGNS format for the solution output. */
+ SURFACE_CSV = 6, /*!< \brief Comma-separated values format for the solution output. */
PARAVIEW = 7, /*!< \brief Paraview ASCII format for the solution output. */
- PARAVIEW_BINARY = 8 /*!< \brief Paraview binary format for the solution output. */
+ PARAVIEW_BINARY = 8, /*!< \brief Paraview binary format for the solution output. */
+ SURFACE_PARAVIEW = 9, /*!< \brief Paraview ASCII format for the solution output. */
+ SURFACE_PARAVIEW_BINARY = 10, /*!< \brief Paraview binary format for the solution output. */
+ MESH = 11, /*!< \brief SU2 mesh format. */
+ RESTART_BINARY = 12,/*!< \brief SU2 binary restart format. */
+ RESTART_ASCII = 13, /*!< \brief SU2 ASCII restart format. */
+ CGNS = 14
};
+
static const map Output_Map = CCreateMap
-("TECPLOT", TECPLOT)
-("TECPLOT_BINARY", TECPLOT_BINARY)
-("FIELDVIEW", FIELDVIEW)
-("FIELDVIEW_BINARY", FIELDVIEW_BINARY)
+("TECPLOT_ASCII", TECPLOT)
+("TECPLOT", TECPLOT_BINARY)
+("SURFACE_TECPLOT_ASCII", SURFACE_TECPLOT)
+("SURFACE_TECPLOT", SURFACE_TECPLOT_BINARY)
("CSV", CSV)
-("CGNS", CGNS_SOL)
-("PARAVIEW", PARAVIEW)
-("PARAVIEW_BINARY", PARAVIEW_BINARY);
+("SURFACE_CSV", SURFACE_CSV)
+("PARAVIEW_ASCII", PARAVIEW)
+("PARAVIEW", PARAVIEW_BINARY)
+("SURFACE_PARAVIEW_ASCII", SURFACE_PARAVIEW)
+("SURFACE_PARAVIEW", SURFACE_PARAVIEW_BINARY)
+("RESTART_ASCII", RESTART_ASCII)
+("RESTART", RESTART_BINARY)
+("CGNS", CGNS);
+
+/*!
+ * \brief type of solution output file formats
+ */
+enum ENUM_TAB_OUTPUT {
+ TAB_CSV = 1, /*!< \brief Comma-separated values format for the solution output. */
+ TAB_TECPLOT = 2 /*!< \brief Tecplot format for the solution output. */
+};
+
+static const map TabOutput_Map = CCreateMap
+("CSV", TAB_CSV)
+("TECPLOT", TAB_TECPLOT);
/*!
* \brief type of volume sensitivity file formats (inout to SU2_DOT)
@@ -1845,7 +1869,7 @@ enum ENUM_UNSTEADY {
HARMONIC_BALANCE = 5 /*!< \brief Use a harmonic balance source term. */
};
-static const map Unsteady_Map = CCreateMap
+static const map TimeMarching_Map = CCreateMap
("NO", STEADY)
("TIME_STEPPING", TIME_STEPPING)
("DUAL_TIME_STEPPING-1ST_ORDER", DT_STEPPING_1ST)
@@ -2857,45 +2881,47 @@ class COptionDVParam : public COptionBase {
this->FFDTag = new string[this->nDV];
- unsigned short nParamDV = 0;
- stringstream ss;
- unsigned int i = 0;
+ vector nParamDV(nDV, 0);
+ unsigned short totalnParamDV = 0;
+ stringstream ss;
+ unsigned int i = 0;
+
for (unsigned short iDV = 0; iDV < this->nDV; iDV++) {
switch (this->design_variable[iDV]) {
- case NO_DEFORMATION: nParamDV = 0; break;
- case FFD_SETTING: nParamDV = 0; break;
- case FFD_CONTROL_POINT_2D: nParamDV = 5; break;
- case FFD_CAMBER_2D: nParamDV = 2; break;
- case FFD_THICKNESS_2D: nParamDV = 2; break;
- case FFD_TWIST_2D: nParamDV = 3; break;
- case HICKS_HENNE: nParamDV = 2; break;
- case SURFACE_BUMP: nParamDV = 3; break;
- case CST: nParamDV = 3; break;
- case ANGLE_OF_ATTACK: nParamDV = 1; break;
- case SCALE: nParamDV = 0; break;
- case TRANSLATION: nParamDV = 3; break;
- case ROTATION: nParamDV = 6; break;
- case NACA_4DIGITS: nParamDV = 3; break;
- case PARABOLIC: nParamDV = 2; break;
- case AIRFOIL: nParamDV = 2; break;
- case FFD_CONTROL_POINT: nParamDV = 7; break;
- case FFD_NACELLE: nParamDV = 6; break;
- case FFD_GULL: nParamDV = 2; break;
- case FFD_TWIST: nParamDV = 8; break;
- case FFD_ROTATION: nParamDV = 7; break;
- case FFD_CONTROL_SURFACE: nParamDV = 7; break;
- case FFD_CAMBER: nParamDV = 3; break;
- case FFD_THICKNESS: nParamDV = 3; break;
- case FFD_ANGLE_OF_ATTACK: nParamDV = 2; break;
- case SURFACE_FILE: nParamDV = 0; break;
- case DV_EFIELD: nParamDV = 2; break;
- case DV_YOUNG: nParamDV = 0; break;
- case DV_POISSON: nParamDV = 0; break;
- case DV_RHO: nParamDV = 0; break;
- case DV_RHO_DL: nParamDV = 0; break;
- case SCALE_GRID: nParamDV = 0; break;
- case TRANSLATE_GRID: nParamDV = 3; break;
- case ROTATE_GRID: nParamDV = 6; break;
+ case NO_DEFORMATION: nParamDV[iDV] = 0; break;
+ case FFD_SETTING: nParamDV[iDV] = 0; break;
+ case FFD_CONTROL_POINT_2D: nParamDV[iDV] = 5; break;
+ case FFD_CAMBER_2D: nParamDV[iDV] = 2; break;
+ case FFD_THICKNESS_2D: nParamDV[iDV] = 2; break;
+ case FFD_TWIST_2D: nParamDV[iDV] = 3; break;
+ case HICKS_HENNE: nParamDV[iDV] = 2; break;
+ case SURFACE_BUMP: nParamDV[iDV] = 3; break;
+ case CST: nParamDV[iDV] = 3; break;
+ case ANGLE_OF_ATTACK: nParamDV[iDV] = 1; break;
+ case SCALE: nParamDV[iDV] = 0; break;
+ case TRANSLATION: nParamDV[iDV] = 3; break;
+ case ROTATION: nParamDV[iDV] = 6; break;
+ case NACA_4DIGITS: nParamDV[iDV] = 3; break;
+ case PARABOLIC: nParamDV[iDV] = 2; break;
+ case AIRFOIL: nParamDV[iDV] = 2; break;
+ case FFD_CONTROL_POINT: nParamDV[iDV] = 7; break;
+ case FFD_NACELLE: nParamDV[iDV] = 6; break;
+ case FFD_GULL: nParamDV[iDV] = 2; break;
+ case FFD_TWIST: nParamDV[iDV] = 8; break;
+ case FFD_ROTATION: nParamDV[iDV] = 7; break;
+ case FFD_CONTROL_SURFACE: nParamDV[iDV] = 7; break;
+ case FFD_CAMBER: nParamDV[iDV] = 3; break;
+ case FFD_THICKNESS: nParamDV[iDV] = 3; break;
+ case FFD_ANGLE_OF_ATTACK: nParamDV[iDV] = 2; break;
+ case SURFACE_FILE: nParamDV[iDV] = 0; break;
+ case DV_EFIELD: nParamDV[iDV] = 2; break;
+ case DV_YOUNG: nParamDV[iDV] = 0; break;
+ case DV_POISSON: nParamDV[iDV] = 0; break;
+ case DV_RHO: nParamDV[iDV] = 0; break;
+ case DV_RHO_DL: nParamDV[iDV] = 0; break;
+ case SCALE_GRID: nParamDV[iDV] = 0; break;
+ case TRANSLATE_GRID: nParamDV[iDV] = 3; break;
+ case ROTATE_GRID: nParamDV[iDV] = 6; break;
default : {
string newstring;
newstring.append(this->name);
@@ -2903,8 +2929,15 @@ class COptionDVParam : public COptionBase {
return newstring;
}
}
-
- for (unsigned short iParamDV = 0; iParamDV < nParamDV; iParamDV++) {
+ totalnParamDV += nParamDV[iDV];
+ }
+
+ if (totalnParamDV > option_value.size()){
+ SU2_MPI::Error("Wrong number of arguments for DV_PARAM!", CURRENT_FUNCTION);
+ }
+
+ for (unsigned short iDV = 0; iDV < this->nDV; iDV++) {
+ for (unsigned short iParamDV = 0; iParamDV < nParamDV[iDV]; iParamDV++) {
ss << option_value[i] << " ";
diff --git a/Common/include/toolboxes/printing_toolbox.hpp b/Common/include/toolboxes/printing_toolbox.hpp
index 6f90e0cdcac5..e06faa855261 100644
--- a/Common/include/toolboxes/printing_toolbox.hpp
+++ b/Common/include/toolboxes/printing_toolbox.hpp
@@ -4,6 +4,7 @@
#include
#include
#include
+#include "../datatype_structure.hpp"
namespace PrintingToolbox {
@@ -61,13 +62,19 @@ class CTablePrinter{
* \return Total width of the table.
*/
int GetTableWidth() const;
-
+
/*!
* \brief Set the separator between columns (outer decoration)
* \param[in] separator - The separation character.
*/
void SetSeparator(const std::string & separator);
+ /*!
+ * \brief Set the separator between columns (inner decoration)
+ * \param[in] separator - The separation character.
+ */
+ void SetInnerSeparator(const std::string & inner_separator);
+
/*!
* \brief Set the alignment of the table entries (CENTER only works for the header at the moment).
* \param[in] align_ - The alignment (CENTER, LEFT, RIGHT).
@@ -85,7 +92,7 @@ class CTablePrinter{
* \param[in] print - If TRUE, the top line is printed.
*/
void SetPrintHeaderTopLine(bool print);
-
+
/*!
* \brief Add a column to the table by specifiying the header name and the width.
@@ -103,14 +110,19 @@ class CTablePrinter{
* \brief Print the footer.
*/
void PrintFooter();
-
+
+ /*!
+ * \brief Set the floating point precision.
+ */
+ void SetPrecision(int precision);
+
template CTablePrinter& operator<<(T input){
-
+
int indent = 0;
-
+
/* --- Set the left separator --- */
if (j_ == 0)
- *out_stream_ << "|";
+ *out_stream_ << separator_;
/* --- Determine and set the current alignment in the stream --- */
if(align_ == LEFT)
@@ -120,16 +132,16 @@ class CTablePrinter{
/*--- Print the current column value to the stream --- */
*out_stream_ << std::setw(column_widths_.at(j_) - indent)
- << input;
+ << std::setprecision(precision_) << input;
/*--- Reset the column counter and if it is the last column,
* add also a line break ---*/
if (j_ == GetNumColumns()-1){
- *out_stream_ << std::setw(indent+2) << "|\n";
+ *out_stream_ << std::setw(indent+1+(int)separator_.size()) << separator_ + "\n";
i_ = i_ + 1;
j_ = 0;
} else {
- *out_stream_ << std::setw(indent+1) << separator_;
+ *out_stream_ << std::setw(indent+(int)inner_separator_.size()) << inner_separator_;
j_ = j_ + 1;
}
@@ -147,7 +159,10 @@ class CTablePrinter{
std::vector column_headers_; /*< \brief Vector of column header names. */
std::vector column_widths_; /*< \brief Vector of column widths. */
std::string separator_; /*< \brief Column separator char. */
+ std::string inner_separator_; /*< \brief Inner column separator char. */
+ int precision_; /*< \brief Floating point precision */
+
int i_; /*< \brief Index of the current row. */
int j_; /*< \brief Index of the current column. */
@@ -157,4 +172,79 @@ class CTablePrinter{
print_header_bottom_line_; /*< \brief Printing the header bottom line. */
};
+
+
+inline void PrintScreenFixed(std::ostream &stream, su2double val, unsigned short field_width) {
+ stream.precision(6); stream.setf(std::ios::fixed, std::ios::floatfield); stream.width(field_width);
+ stream << std::right << val;
+ stream.unsetf(std::ios::fixed);
+}
+
+inline void PrintScreenScientific(std::ostream &stream, su2double val, unsigned short field_width) {
+ stream.precision(4); stream.setf(std::ios::scientific, std::ios::floatfield); stream.width(field_width);
+ stream << std::right << val;
+ stream.unsetf(std::ios::scientific);
+}
+
+inline void PrintScreenInteger(std::ostream &stream, unsigned long val, unsigned short field_width){
+ stream.width(field_width);
+ stream << std::right << val;
+}
+
+
+inline std::vector split(const std::string& s, char delimiter)
+{
+ std::vector tokens;
+ std::string token;
+ std::istringstream tokenStream(s);
+ while (std::getline(tokenStream, token, delimiter))
+ {
+ tokens.push_back(token);
+ }
+ return tokens;
+}
+
+inline int stoi(const std::string s){
+ std::istringstream ss(s);
+ int number;
+ ss >> number;
+ return number;
+}
+
+inline su2double stod(const std::string s){
+ std::istringstream ss(s);
+ su2double number;
+ ss >> number;
+ return number;
+}
+
+inline std::string to_string(const su2double number){
+
+ std::stringstream ss;
+
+ ss << number;
+
+ return ss.str();
+
+}
+
+const static char* ws = " \t\n\r\f\v";
+
+// trim from end of string (right)
+inline std::string& rtrim(std::string& s, const char* t = ws){
+ s.erase(s.find_last_not_of(t) + 1);
+ return s;
+}
+
+// trim from beginning of string (left)
+inline std::string& ltrim(std::string& s, const char* t = ws){
+ s.erase(0, s.find_first_not_of(t));
+ return s;
+}
+
+// trim from both ends of string (right then left)
+inline std::string& trim(std::string& s, const char* t = ws){
+ return ltrim(rtrim(s, t), t);
+}
+
}
diff --git a/Common/include/toolboxes/signal_processing_toolbox.hpp b/Common/include/toolboxes/signal_processing_toolbox.hpp
new file mode 100644
index 000000000000..8f2128cb5390
--- /dev/null
+++ b/Common/include/toolboxes/signal_processing_toolbox.hpp
@@ -0,0 +1,41 @@
+#pragma once
+
+#include "../datatype_structure.hpp"
+#include
+
+namespace Signal_Processing {
+
+ su2double Average(std::vector &data);
+
+ class RunningAverage
+ {
+ private:
+ su2double val;
+ unsigned long count;
+
+ public:
+ RunningAverage(){
+ this->Reset();
+ }
+
+ su2double Update(su2double valIn){
+ su2double scaling = 1. / (su2double)(count + 1);
+ val = valIn * scaling + val * (1. - scaling);
+ count++;
+ return val;
+ }
+
+ su2double Get(){
+ return val;
+ }
+
+ unsigned long Count(){
+ return count;
+ }
+
+ void Reset(){
+ val = 0.;
+ count = 0;
+ }
+ };
+};
diff --git a/Common/lib/Makefile.am b/Common/lib/Makefile.am
index d09fbafddda5..df0631571392 100644
--- a/Common/lib/Makefile.am
+++ b/Common/lib/Makefile.am
@@ -147,6 +147,7 @@ lib_sources = \
../src/adt_structure.cpp \
../src/wall_model.cpp \
../src/toolboxes/printing_toolbox.cpp \
+ ../src/toolboxes/signal_processing_toolbox.cpp \
../src/toolboxes/CLinearPartitioner.cpp \
../src/toolboxes/MMS/CVerificationSolution.cpp \
../src/toolboxes/MMS/CIncTGVSolution.cpp \
diff --git a/Common/src/CSU2ASCIIMeshReaderFVM.cpp b/Common/src/CSU2ASCIIMeshReaderFVM.cpp
index 32eaf2a6e429..9cc4a9bd0589 100644
--- a/Common/src/CSU2ASCIIMeshReaderFVM.cpp
+++ b/Common/src/CSU2ASCIIMeshReaderFVM.cpp
@@ -82,7 +82,7 @@ CSU2ASCIIMeshReaderFVM::~CSU2ASCIIMeshReaderFVM(void) { }
void CSU2ASCIIMeshReaderFVM::ReadMetadata() {
- bool harmonic_balance = config->GetUnsteady_Simulation() == HARMONIC_BALANCE;
+ bool harmonic_balance = config->GetTime_Marching() == HARMONIC_BALANCE;
bool multizone_file = config->GetMultizone_Mesh();
/*--- Open grid file ---*/
diff --git a/Common/src/config_structure.cpp b/Common/src/config_structure.cpp
index 9f39c39bee26..97f2d017d172 100644
--- a/Common/src/config_structure.cpp
+++ b/Common/src/config_structure.cpp
@@ -227,7 +227,7 @@ CConfig::CConfig(char case_filename[MAX_STRING_SIZE], CConfig *config) {
/*--- Parsing the config file ---*/
runtime_file = SetRunTime_Parsing(case_filename);
-
+
/*--- Set the default values for all of the options that weren't set ---*/
SetDefault();
@@ -235,9 +235,11 @@ CConfig::CConfig(char case_filename[MAX_STRING_SIZE], CConfig *config) {
/*--- Update original config file ---*/
if (runtime_file) {
- config->SetnExtIter(nExtIter);
+ if (all_options.find("TIME_ITER") == all_options.end())
+ config->SetnTime_Iter(nTimeIter);
+ if (all_options.find("CFL_NUMBER") == all_options.end())
+ config->SetCFL(MESH_0, CFLFineGrid);
}
-
}
SU2_MPI::Comm CConfig::GetMPICommunicator() {
@@ -293,7 +295,7 @@ unsigned short CConfig::GetnZone(string val_mesh_filename, unsigned short val_fo
}
- case CGNS: {
+ case CGNS_GRID: {
#ifdef HAVE_CGNS
@@ -421,7 +423,7 @@ unsigned short CConfig::GetnDim(string val_mesh_filename, unsigned short val_for
break;
}
- case CGNS: {
+ case CGNS_GRID: {
#ifdef HAVE_CGNS
@@ -712,6 +714,7 @@ void CConfig::SetPointersNull(void) {
default_body_force = NULL;
default_sineload_coeff = NULL;
default_nacelle_location = NULL;
+ default_wrt_freq = NULL;
default_cp_polycoeffs = NULL;
default_mu_polycoeffs = NULL;
@@ -758,11 +761,16 @@ void CConfig::SetPointersNull(void) {
top_optim_kernels = NULL;
top_optim_kernel_params = NULL;
top_optim_filter_radius = NULL;
+
+ ScreenOutput = NULL;
+ HistoryOutput = NULL;
+ VolumeOutput = NULL;
+ VolumeOutputFiles = NULL;
/*--- Variable initialization ---*/
- ExtIter = 0;
- IntIter = 0;
+ TimeIter = 0;
+ InnerIter = 0;
nIntCoeffs = 0;
OuterIter = 0;
@@ -779,6 +787,8 @@ void CConfig::SetPointersNull(void) {
Wrt_InletFile = false;
Restart_Bandwidth_Agg = 0.0;
+
+ Mesh_Box_Size = NULL;
}
@@ -786,7 +796,11 @@ void CConfig::SetRunTime_Options(void) {
/* DESCRIPTION: Number of external iterations */
- addUnsignedLongOption("EXT_ITER", nExtIter, 999999);
+ addUnsignedLongOption("TIME_ITER", nTimeIter, 999999);
+
+ /* DESCRIPTION: CFL Number */
+
+ addDoubleOption("CFL_NUMBER", CFLFineGrid, 10);
}
@@ -818,6 +832,7 @@ void CConfig::SetConfig_Options() {
default_body_force = new su2double[3];
default_sineload_coeff = new su2double[3];
default_nacelle_location = new su2double[5];
+ default_wrt_freq = new su2double[3];
/*--- All temperature polynomial fits for the fluid models currently
assume a quartic form (5 coefficients). For example,
@@ -1351,7 +1366,7 @@ void CConfig::SetConfig_Options() {
/*--- Options related to time-marching ---*/
/* DESCRIPTION: Unsteady simulation */
- addEnumOption("UNSTEADY_SIMULATION", Unsteady_Simulation, Unsteady_Map, STEADY);
+ addEnumOption("TIME_MARCHING", TimeMarching, TimeMarching_Map, STEADY);
/* DESCRIPTION: Courant-Friedrichs-Lewy condition of the finest grid */
addDoubleOption("CFL_NUMBER", CFLFineGrid, 1.25);
/* DESCRIPTION: Courant-Friedrichs-Lewy condition of the finest grid in (heat fvm) solid solvers */
@@ -1372,8 +1387,6 @@ 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);
- /* DESCRIPTION: Number of total iterations */
- addUnsignedLongOption("EXT_ITER", nExtIter, 999999);
/* DESCRIPTION: External iteration offset due to restart */
addUnsignedLongOption("EXT_ITER_OFFSET", ExtIter_OffSet, 0);
// these options share nRKStep as their size, which is not a good idea in general
@@ -1383,14 +1396,8 @@ void CConfig::SetConfig_Options() {
addUnsignedShortOption("LEVELS_TIME_ACCURATE_LTS", nLevels_TimeAccurateLTS, 1);
/* DESCRIPTION: Number of time DOFs used in the predictor step of ADER-DG. */
addUnsignedShortOption("TIME_DOFS_ADER_DG", nTimeDOFsADER_DG, 2);
- /* DESCRIPTION: Time Step for dual time stepping simulations (s) */
- addDoubleOption("UNST_TIMESTEP", Delta_UnstTime, 0.0);
- /* DESCRIPTION: Total Physical Time for dual time stepping simulations (s) */
- addDoubleOption("UNST_TIME", Total_UnstTime, 1.0);
/* DESCRIPTION: Unsteady Courant-Friedrichs-Lewy number of the finest grid */
addDoubleOption("UNST_CFL_NUMBER", Unst_CFL, 0.0);
- /* DESCRIPTION: Number of internal iterations (dual time method) */
- addUnsignedLongOption("UNST_INT_ITER", Unst_nIntIter, 100);
/* DESCRIPTION: Integer number of periodic time instances for Harmonic Balance */
addUnsignedShortOption("TIME_INSTANCES", nTimeInstances, 1);
/* DESCRIPTION: Time period for Harmonic Balance wihtout moving meshes */
@@ -1490,43 +1497,16 @@ void CConfig::SetConfig_Options() {
/*!\brief CONV_CRITERIA
* \n DESCRIPTION: Convergence criteria \n OPTIONS: see \link Converge_Crit_Map \endlink \n DEFAULT: RESIDUAL \ingroup Config*/
addEnumOption("CONV_CRITERIA", ConvCriteria, Converge_Crit_Map, RESIDUAL);
- /*!\brief RESIDUAL_REDUCTION \n DESCRIPTION: Residual reduction (order of magnitude with respect to the initial value)\n DEFAULT: 3.0 \ingroup Config*/
- addDoubleOption("RESIDUAL_REDUCTION", OrderMagResidual, 5.0);
- /*!\brief RESIDUAL_MINVAL\n DESCRIPTION: Min value of the residual (log10 of the residual)\n DEFAULT: -14.0 \ingroup Config*/
- addDoubleOption("RESIDUAL_MINVAL", MinLogResidual, -14.0);
- /* DESCRIPTION: Residual reduction (order of magnitude with respect to the initial value) */
- addDoubleOption("RESIDUAL_REDUCTION_FSI", OrderMagResidualFSI, 3.0);
- /* DESCRIPTION: Min value of the residual (log10 of the residual) */
- addDoubleOption("RESIDUAL_MINVAL_FSI", MinLogResidualFSI, -5.0);
- /*!\brief RESIDUAL_REDUCTION \n DESCRIPTION: Residual reduction (order of magnitude with respect to the initial value)\n DEFAULT: 3.0 \ingroup Config*/
- addDoubleOption("RESIDUAL_REDUCTION_BGS_FLOW", OrderMagResidual_BGS_F, 3.0);
- /*!\brief RESIDUAL_MINVAL\n DESCRIPTION: Min value of the residual (log10 of the residual)\n DEFAULT: -8.0 \ingroup Config*/
- addDoubleOption("RESIDUAL_MINVAL_BGS_FLOW", MinLogResidual_BGS_F, -8.0);
- /*!\brief RESIDUAL_REDUCTION \n DESCRIPTION: Residual reduction (order of magnitude with respect to the initial value)\n DEFAULT: 3.0 \ingroup Config*/
- addDoubleOption("RESIDUAL_REDUCTION_BGS_STRUCTURE", OrderMagResidual_BGS_S, 3.0);
- /*!\brief RESIDUAL_MINVAL\n DESCRIPTION: Min value of the residual (log10 of the residual)\n DEFAULT: -8.0 \ingroup Config*/
- addDoubleOption("RESIDUAL_MINVAL_BGS_STRUCTURE", MinLogResidual_BGS_S, -8.0);
- /* DESCRIPTION: FEM: UTOL = norm(Delta_U(k)) / norm(U(k)) */
- addDoubleOption("RESIDUAL_FEM_UTOL", Res_FEM_UTOL, -9.0);
- /* DESCRIPTION: FEM: RTOL = norm(Residual(k)) / norm(Residual(0)) */
- addDoubleOption("RESIDUAL_FEM_RTOL", Res_FEM_RTOL, -9.0);
- /* DESCRIPTION: FEM: ETOL = Delta_U(k) * Residual(k) / Delta_U(0) * Residual(0) */
- addDoubleOption("RESIDUAL_FEM_ETOL", Res_FEM_ETOL, -9.0);
- /* DESCRIPTION: FEM: ETOL = Delta_U(k) * Residual(k) / Delta_U(0) * Residual(0) */
- addEnumOption("RESIDUAL_CRITERIA_FEM", Res_FEM_CRIT, ResFem_Map, RESFEM_RELATIVE);
- /*!\brief RESIDUAL_FUNC_FLOW\n DESCRIPTION: Flow functional for the Residual criteria\n OPTIONS: See \link Residual_Map \endlink \n DEFAULT: RHO_RESIDUAL \ingroup Config*/
- addEnumOption("RESIDUAL_FUNC_FLOW", Residual_Func_Flow, Residual_Map, RHO_RESIDUAL);
- /*!\brief STARTCONV_ITER\n DESCRIPTION: Iteration number to begin convergence monitoring\n DEFAULT: 5 \ingroup Config*/
- addUnsignedLongOption("STARTCONV_ITER", StartConv_Iter, 5);
- /*!\brief CAUCHY_ELEMS\n DESCRIPTION: Number of elements to apply the criteria. \n DEFAULT 100 \ingroup Config*/
- addUnsignedShortOption("CAUCHY_ELEMS", Cauchy_Elems, 100);
- /*!\brief CAUCHY_EPS\n DESCRIPTION: Epsilon to control the series convergence \n DEFAULT: 1e-10 \ingroup Config*/
- addDoubleOption("CAUCHY_EPS", Cauchy_Eps, 1E-10);
- /*!\brief CAUCHY_FUNC_FLOW
- * \n DESCRIPTION: Flow functional for the Cauchy criteria \n OPTIONS: see \link Objective_Map \endlink \n DEFAULT: DRAG_COEFFICIENT \ingroup Config*/
- addEnumOption("CAUCHY_FUNC_FLOW", Cauchy_Func_Flow, Objective_Map, DRAG_COEFFICIENT);
- /*!\brief CAUCHY_FUNC_ADJFLOW\n DESCRIPTION: Adjoint functional for the Cauchy criteria.\n OPTIONS: See \link Sens_Map \endlink. \n DEFAULT: SENS_GEOMETRY \ingroup Config*/
- addEnumOption("CAUCHY_FUNC_ADJFLOW", Cauchy_Func_AdjFlow, Sens_Map, SENS_GEOMETRY);
+ /*!\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*/
+ 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_FIELD\n DESCRIPTION: Output field to monitor \n Default: depends on solver \ingroup Config*/
+ addStringListOption("CONV_FIELD", nConvField, ConvField);
/*!\par CONFIG_CATEGORY: Multi-grid \ingroup Config*/
/*--- Options related to Multi-grid ---*/
@@ -1707,7 +1687,7 @@ void CConfig::SetConfig_Options() {
/*--- Options related to input/output files and formats ---*/
/*!\brief OUTPUT_FORMAT \n DESCRIPTION: I/O format for output plots. \n OPTIONS: see \link Output_Map \endlink \n DEFAULT: TECPLOT \ingroup Config */
- addEnumOption("OUTPUT_FORMAT", Output_FileFormat, Output_Map, TECPLOT);
+ addEnumOption("TABULAR_FORMAT", Tab_FileFormat, TabOutput_Map, TAB_CSV);
/*!\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*/
@@ -1737,49 +1717,19 @@ void CConfig::SetConfig_Options() {
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 CONV_FILENAME \n DESCRIPTION: Output file convergence history (w/o extension) \n DEFAULT: history \ingroup Config*/
- addStringOption("CONV_FILENAME_FSI", Conv_FileName_FSI, string("historyFSI.csv"));
- /* DESCRIPTION: Viscous limiter turbulent equations */
- addBoolOption("WRITE_CONV_FILENAME_FSI", Write_Conv_FSI, false);
/*!\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_FLOW_FILENAME", Solution_FlowFileName, string("solution_flow.dat"));
+ 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*/
addStringOption("SOLUTION_ADJ_FILENAME", Solution_AdjFileName, string("solution_adj.dat"));
- /*!\brief SOLUTION_FLOW_FILENAME \n DESCRIPTION: Restart structure input file (the file output under the filename set by RESTART_FLOW_FILENAME) \n Default: solution_flow.dat \ingroup Config */
- addStringOption("SOLUTION_STRUCTURE_FILENAME", Solution_FEMFileName, string("solution_structure.dat"));
- /*!\brief SOLUTION_FLOW_FILENAME \n DESCRIPTION: Restart structure input file (the file output under the filename set by RESTART_FLOW_FILENAME) \n Default: solution_flow.dat \ingroup Config */
- addStringOption("SOLUTION_ADJ_STRUCTURE_FILENAME", Solution_AdjFEMFileName, string("solution_adjoint_structure.dat"));
/*!\brief RESTART_FLOW_FILENAME \n DESCRIPTION: Output file restart flow \ingroup Config*/
- addStringOption("RESTART_FLOW_FILENAME", Restart_FlowFileName, string("restart_flow.dat"));
+ 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*/
addStringOption("RESTART_ADJ_FILENAME", Restart_AdjFileName, string("restart_adj.dat"));
- /*!\brief RESTART_STRUCTURE_FILENAME \n DESCRIPTION: Output file restart structure \ingroup Config*/
- addStringOption("RESTART_STRUCTURE_FILENAME", Restart_FEMFileName, string("restart_structure.dat"));
- /*!\brief RESTART_ADJ_STRUCTURE_FILENAME \n DESCRIPTION: Output file restart structure \ingroup Config*/
- addStringOption("RESTART_ADJ_STRUCTURE_FILENAME", Restart_AdjFEMFileName, string("restart_adjoint_structure.dat"));
/*!\brief VOLUME_FLOW_FILENAME \n DESCRIPTION: Output file flow (w/o extension) variables \ingroup Config */
- addStringOption("VOLUME_FLOW_FILENAME", Flow_FileName, string("flow"));
- /*!\brief VOLUME_STRUCTURE_FILENAME
- * \n DESCRIPTION: Output file structure (w/o extension) variables \ingroup Config*/
- addStringOption("VOLUME_STRUCTURE_FILENAME", Structure_FileName, string("structure"));
- /*!\brief VOLUME_ADJ_STRUCTURE_FILENAME
- * \n DESCRIPTION: Output file structure (w/o extension) variables \ingroup Config*/
- addStringOption("VOLUME_ADJ_STRUCTURE_FILENAME", AdjStructure_FileName, string("adj_structure"));
- /*!\brief SURFACE_STRUCTURE_FILENAME
- * \n DESCRIPTION: Output file structure (w/o extension) variables \ingroup Config*/
- addStringOption("SURFACE_STRUCTURE_FILENAME", SurfStructure_FileName, string("surface_structure"));
- /*!\brief SURFACE_STRUCTURE_FILENAME
- * \n DESCRIPTION: Output file structure (w/o extension) variables \ingroup Config*/
- addStringOption("SURFACE_ADJ_STRUCTURE_FILENAME", AdjSurfStructure_FileName, string("adj_surface_structure"));
- /*!\brief SURFACE_HEAT_FILENAME
- * \n DESCRIPTION: Output file structure (w/o extension) variables \ingroup Config */
- addStringOption("SURFACE_HEAT_FILENAME", SurfHeat_FileName, string("surface_heat"));
- /*!\brief VOLUME_HEAT_FILENAME
- * \n DESCRIPTION: Output file wave (w/o extension) variables \ingroup Config*/
- addStringOption("VOLUME_HEAT_FILENAME", Heat_FileName, string("heat"));
+ addStringOption("VOLUME_FILENAME", Volume_FileName, string("vol_solution"));
/*!\brief VOLUME_ADJ_FILENAME
* \n DESCRIPTION: Output file adjoint (w/o extension) variables \ingroup Config*/
- addStringOption("VOLUME_ADJ_FILENAME", Adj_FileName, string("adjoint"));
+ addStringOption("VOLUME_ADJ_FILENAME", Adj_FileName, string("adj_vol_solution"));
/*!\brief GRAD_OBJFUNC_FILENAME
* \n DESCRIPTION: Output objective function gradient \ingroup Config*/
addStringOption("GRAD_OBJFUNC_FILENAME", ObjFunc_Grad_FileName, string("of_grad.dat"));
@@ -1788,7 +1738,7 @@ void CConfig::SetConfig_Options() {
addStringOption("VALUE_OBJFUNC_FILENAME", ObjFunc_Value_FileName, string("of_func.dat"));
/*!\brief SURFACE_FLOW_FILENAME
* \n DESCRIPTION: Output file surface flow coefficient (w/o extension) \ingroup Config*/
- addStringOption("SURFACE_FLOW_FILENAME", SurfFlowCoeff_FileName, string("surface_flow"));
+ addStringOption("SURFACE_FILENAME", SurfCoeff_FileName, string("surface"));
/*!\brief SURFACE_ADJ_FILENAME
* \n DESCRIPTION: Output file surface adjoint coefficient (w/o extension) \ingroup Config*/
addStringOption("SURFACE_ADJ_FILENAME", SurfAdjCoeff_FileName, string("surface_adjoint"));
@@ -1810,9 +1760,6 @@ void CConfig::SetConfig_Options() {
/*!\brief WRT_CON_FREQ_DUALTIME
* \n DESCRIPTION: Writing convergence history frequency for the dual time \ingroup Config*/
addUnsignedLongOption("WRT_CON_FREQ_DUALTIME", Wrt_Con_Freq_DualTime, 10);
- /*!\brief LOW_MEMORY_OUTPUT
- * \n DESCRIPTION: Output less information for lower memory use. \ingroup Config*/
- addBoolOption("LOW_MEMORY_OUTPUT", Low_MemoryOutput, false);
/*!\brief WRT_OUTPUT
* \n DESCRIPTION: Write output files (disable all output by setting to NO) \ingroup Config*/
addBoolOption("WRT_OUTPUT", Wrt_Output, true);
@@ -2118,9 +2065,6 @@ void CConfig::SetConfig_Options() {
/* DESCRIPTION: Direction of the Electic Fields */
addDoubleListOption("ELECTRIC_FIELD_DIR", nDim_Electric_Field, Electric_Field_Dir);
- /* DESCRIPTION: Convergence criteria for FEM adjoint */
- addDoubleOption("CRITERIA_FEM_ADJ", Res_FEM_ADJ, -5.0);
-
/*!\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);
@@ -2256,13 +2200,13 @@ void CConfig::SetConfig_Options() {
/* DESCRIPTION: Determines if the multizone problem is solved for time-domain. */
addBoolOption("TIME_DOMAIN", Time_Domain, false);
/* DESCRIPTION: Number of outer iterations in the multizone problem. */
- addUnsignedLongOption("OUTER_ITER", Outer_Iter, 1);
+ addUnsignedLongOption("OUTER_ITER", nOuterIter, 1);
/* DESCRIPTION: Number of inner iterations in each multizone block. */
- addUnsignedLongOption("INNER_ITER", Inner_Iter, 1);
+ addUnsignedLongOption("INNER_ITER", nInnerIter, 1);
/* DESCRIPTION: Number of time steps solved in the multizone problem. */
- addUnsignedLongOption("TIME_ITER", Time_Iter, 1);
+ addUnsignedLongOption("TIME_ITER", nTimeIter, 1);
/* DESCRIPTION: Number of iterations in each single-zone block. */
- addUnsignedLongOption("ITER", Iter, 1000);
+ addUnsignedLongOption("ITER", nIter, 1000);
/* DESCRIPTION: Restart iteration in the multizone problem. */
addUnsignedLongOption("RESTART_ITER", Restart_Iter, 1);
/* DESCRIPTION: Minimum error threshold for the linear solver for the implicit formulation */
@@ -2270,12 +2214,21 @@ void CConfig::SetConfig_Options() {
/* DESCRIPTION: Total Physical Time for time-domain problems (s) */
addDoubleOption("MAX_TIME", Max_Time, 1.0);
/* DESCRIPTION: Determines if the single-zone driver is used. (TEMPORARY) */
- addBoolOption("SINGLEZONE_DRIVER", SinglezoneDriver, false);
+ addBoolOption("SINGLEZONE_DRIVER", SinglezoneDriver, true);
/* DESCRIPTION: Determines if the special output is written out */
addBoolOption("SPECIAL_OUTPUT", SpecialOutput, false);
+
+ /* DESCRIPTION: Determines if the convergence history of each individual zone is written to screen */
+ addBoolOption("WRT_ZONE_CONV", Wrt_ZoneConv, false);
+ /* DESCRIPTION: Determines if the convergence history of each individual zone is written to file */
+ addBoolOption("WRT_ZONE_HIST", Wrt_ZoneHist, true);
+
+
/* DESCRIPTION: Determines if the special output is written out */
addBoolOption("WRT_FORCES_BREAKDOWN", Wrt_ForcesBreakdown, false);
-
+
+
+
/* DESCRIPTION: Use conservative approach for interpolating between meshes.
* Options: NO, YES \ingroup Config */
addBoolOption("CONSERVATIVE_INTERPOLATION", ConservativeInterpolation, true);
@@ -2514,6 +2467,34 @@ void CConfig::SetConfig_Options() {
/* DESCRIPTION: Multipoint mesh filenames, if using different meshes for each point */
addPythonOption("MULTIPOINT_MESH_FILENAME");
+
+ /*--- options that are used for the output ---*/
+ /*!\par CONFIG_CATEGORY:Output Options\ingroup Config*/
+
+ /* DESCRIPTION: Type of screen output */
+ addStringListOption("SCREEN_OUTPUT", nScreenOutput, ScreenOutput);
+ /* DESCRIPTION: Type of output printed to the history file */
+ addStringListOption("HISTORY_OUTPUT", nHistoryOutput, HistoryOutput);
+ /* DESCRIPTION: Type of output printed to the volume solution file */
+ addStringListOption("VOLUME_OUTPUT", nVolumeOutput, VolumeOutput);
+
+ /* DESCRIPTION: History writing frequency (INNER_ITER) */
+ addUnsignedLongOption("HISTORY_WRT_FREQ_INNER", HistoryWrtFreq[2], 1);
+ /* DESCRIPTION: History writing frequency (OUTER_ITER) */
+ addUnsignedLongOption("HISTORY_WRT_FREQ_OUTER", HistoryWrtFreq[1], 1);
+ /* DESCRIPTION: History writing frequency (TIME_ITER) */
+ addUnsignedLongOption("HISTORY_WRT_FREQ_TIME", HistoryWrtFreq[0], 1);
+
+ /* DESCRIPTION: Screen writing frequency (INNER_ITER) */
+ addUnsignedLongOption("SCREEN_WRT_FREQ_INNER", ScreenWrtFreq[2], 1);
+ /* DESCRIPTION: Screen writing frequency (OUTER_ITER) */
+ addUnsignedLongOption("SCREEN_WRT_FREQ_OUTER", ScreenWrtFreq[1], 1);
+ /* DESCRIPTION: Screen writing frequency (TIME_ITER) */
+ addUnsignedLongOption("SCREEN_WRT_FREQ_TIME", ScreenWrtFreq[0], 1);
+ /* DESCRIPTION: Volume solution writing frequency */
+ addUnsignedLongOption("OUTPUT_WRT_FREQ", VolumeWrtFreq, 250);
+ /* DESCRIPTION: Volume solution files */
+ addEnumListOption("OUTPUT_FILES", nVolumeOutputFiles, VolumeOutputFiles, Output_Map);
/* DESCRIPTION: Using Uncertainty Quantification with SST Turbulence Model */
addBoolOption("USING_UQ", using_uq, false);
@@ -2584,21 +2565,20 @@ void CConfig::SetConfig_Parsing(char case_filename[MAX_STRING_SIZE]) {
newString.append(": invalid option name");
newString.append(". Check current SU2 options in config_template.cfg.");
newString.append("\n");
- if (!option_name.compare("AD_COEFF_FLOW")) newString.append("AD_COEFF_FLOW= (1st, 2nd, 4th) is now JST_SENSOR_COEFF= (2nd, 4th).\n");
- if (!option_name.compare("AD_COEFF_ADJFLOW")) newString.append("AD_COEFF_ADJFLOW= (1st, 2nd, 4th) is now ADJ_JST_SENSOR_COEFF= (2nd, 4th).\n");
- if (!option_name.compare("SPATIAL_ORDER_FLOW")) newString.append("SPATIAL_ORDER_FLOW is now the boolean MUSCL_FLOW and the appropriate SLOPE_LIMITER_FLOW.\n");
- if (!option_name.compare("SPATIAL_ORDER_ADJFLOW")) newString.append("SPATIAL_ORDER_ADJFLOW is now the boolean MUSCL_ADJFLOW and the appropriate SLOPE_LIMITER_ADJFLOW.\n");
- if (!option_name.compare("SPATIAL_ORDER_TURB")) newString.append("SPATIAL_ORDER_TURB is now the boolean MUSCL_TURB and the appropriate SLOPE_LIMITER_TURB.\n");
- if (!option_name.compare("SPATIAL_ORDER_ADJTURB")) newString.append("SPATIAL_ORDER_ADJTURB is now the boolean MUSCL_ADJTURB and the appropriate SLOPE_LIMITER_ADJTURB.\n");
- if (!option_name.compare("LIMITER_COEFF")) newString.append("LIMITER_COEFF is now VENKAT_LIMITER_COEFF.\n");
- if (!option_name.compare("SHARP_EDGES_COEFF")) newString.append("SHARP_EDGES_COEFF is now ADJ_SHARP_LIMITER_COEFF.\n");
- if (!option_name.compare("DEFORM_TOL_FACTOR")) newString.append("DEFORM_TOL_FACTOR is no longer used.\n Set DEFORM_LINEAR_SOLVER_ERROR to define the minimum residual for grid deformation.\n");
- if (!option_name.compare("MOTION_FILENAME")) newString.append("MOTION_FILENAME is now DV_FILENAME.\n");
- if (!option_name.compare("BETA_DELTA")) newString.append("BETA_DELTA is now UQ_DELTA_B.\n");
- if (!option_name.compare("COMPONENTALITY")) newString.append("COMPONENTALITY is now UQ_COMPONENT.\n");
- if (!option_name.compare("PERMUTE")) newString.append("PERMUTE is now UQ_PERMUTE.\n");
- if (!option_name.compare("URLX")) newString.append("URLX is now UQ_URLX.\n");
-
+ if (!option_name.compare("EXT_ITER")) newString.append("Option EXT_ITER is deprecated as of v7.0. Please use TIME_ITER, OUTER_ITER or ITER \n"
+ "to specify the number of time iterations, outer multizone iterations or iterations, respectively.");
+ if (!option_name.compare("UNST_TIMESTEP")) newString.append("UNST_TIMESTEP is now TIME_STEP.\n");
+ if (!option_name.compare("UNST_TIME")) newString.append("UNST_TIME is now MAX_TIME.\n");
+ if (!option_name.compare("UNST_INT_ITER")) newString.append("UNST_INT_ITER is now INNER_ITER.\n");
+ if (!option_name.compare("RESIDUAL_MINVAL")) newString.append("RESIDUAL_MINVAL is now CONV_RESIDUAL_MINVAL.\n");
+ if (!option_name.compare("STARTCONV_ITER")) newString.append("STARTCONV_ITER is now CONV_STARTITER.\n");
+ if (!option_name.compare("CAUCHY_ELEMS")) newString.append("CAUCHY_ELEMS is now CONV_CAUCHY_ELEMS.\n");
+ if (!option_name.compare("CAUCHY_EPS")) newString.append("CAUCHY_EPS is now CONV_CAUCHY_EPS.\n");
+ if (!option_name.compare("OUTPUT_FORMAT")) newString.append("OUTPUT_FORMAT is now TABULAR_FORMAT.\n");
+ if (!option_name.compare("PHYSICAL_PROBLEM")) newString.append("PHYSICAL_PROBLEM is now SOLVER.\n");
+ if (!option_name.compare("REGIME_TYPE")) newString.append("REGIME_TYPE has been removed.\n "
+ "If you want use the incompressible solver, \n"
+ "use INC_EULER, INC_NAVIER_STOKES or INC_RANS as value of the SOLVER option.");
errorString.append(newString);
err_count++;
continue;
@@ -2666,7 +2646,7 @@ void CConfig::SetDefault(){
for (map::iterator iter = all_options.begin(); iter != all_options.end(); ++iter) {
if (option_map[iter->first]->GetValue().size() == 0)
- option_map[iter->first]->SetDefault();
+ option_map[iter->first]->SetDefault();
}
}
@@ -2900,6 +2880,28 @@ void CConfig::SetPostprocessing(unsigned short val_software, unsigned short val_
if (nZone > 1){
Multizone_Problem = YES;
}
+
+ /*--- Set the default output files ---*/
+ if (nVolumeOutputFiles == 0){
+ nVolumeOutputFiles = 3;
+ VolumeOutputFiles = new unsigned short[nVolumeOutputFiles];
+ VolumeOutputFiles[0] = RESTART_BINARY;
+ VolumeOutputFiles[1] = PARAVIEW_BINARY;
+ VolumeOutputFiles[2] = SURFACE_PARAVIEW_BINARY;
+ }
+
+ if (Kind_Solver == NAVIER_STOKES && Kind_Turb_Model != NONE){
+ SU2_MPI::Error("KIND_TURB_MODEL must be NONE if SOLVER= NAVIER_STOKES", CURRENT_FUNCTION);
+ }
+ if (Kind_Solver == INC_NAVIER_STOKES && Kind_Turb_Model != NONE){
+ SU2_MPI::Error("KIND_TURB_MODEL must be NONE if SOLVER= INC_NAVIER_STOKES", CURRENT_FUNCTION);
+ }
+ if (Kind_Solver == RANS && Kind_Turb_Model == NONE){
+ SU2_MPI::Error("A turbulence model must be specified with KIND_TURB_MODEL if SOLVER= RANS", CURRENT_FUNCTION);
+ }
+ if (Kind_Solver == INC_RANS && Kind_Turb_Model == NONE){
+ SU2_MPI::Error("A turbulence model must be specified with KIND_TURB_MODEL if SOLVER= INC_RANS", CURRENT_FUNCTION);
+ }
#ifndef HAVE_TECIO
if (Output_FileFormat == TECPLOT_BINARY) {
@@ -3087,9 +3089,31 @@ void CConfig::SetPostprocessing(unsigned short val_software, unsigned short val_
}
}
- /*--- Low memory only for ASCII Tecplot ---*/
-
- if (Output_FileFormat != TECPLOT) Low_MemoryOutput = NO;
+ /*--- Check for unsteady problem ---*/
+
+ if ((TimeMarching == TIME_STEPPING ||
+ TimeMarching == DT_STEPPING_1ST ||
+ TimeMarching == DT_STEPPING_2ND) && !Time_Domain){
+ SU2_MPI::Error("TIME_DOMAIN must be set to YES if UNSTEADY_SIMULATION is "
+ "TIME_STEPPING, DUAL_TIME_STEPPING-1ST_ORDER or DUAL_TIME_STEPPING-2ND_ORDER", CURRENT_FUNCTION);
+ }
+
+ if (Time_Domain){
+ if (TimeMarching == TIME_STEPPING){
+ InnerIter = 1;
+ }
+ if (!OptionIsSet("OUTPUT_WRT_FREQ"))
+ VolumeWrtFreq = 1;
+ if (Restart == NO){
+ Restart_Iter = 0;
+ }
+ if (!OptionIsSet("HISTORY_WRT_FREQ_INNER")){
+ HistoryWrtFreq[2] = 0;
+ }
+ if (!OptionIsSet("HISTORY_WRT_FREQ_OUTER")){
+ HistoryWrtFreq[1] = 0;
+ }
+ }
/*--- The that Discard_InFiles is false, owerwise the gradient could be wrong ---*/
@@ -3099,7 +3123,7 @@ void CConfig::SetPostprocessing(unsigned short val_software, unsigned short val_
/*--- Deactivate the multigrid in the adjoint problem ---*/
if ((ContinuousAdjoint && !MG_AdjointFlow) ||
- (Unsteady_Simulation == TIME_STEPPING)) { nMGLevels = 0; }
+ (TimeMarching == TIME_STEPPING)) { nMGLevels = 0; }
/*--- If Fluid Structure Interaction, set the solver for each zone.
*--- ZONE_0 is the zone of the fluid.
@@ -3157,31 +3181,23 @@ void CConfig::SetPostprocessing(unsigned short val_software, unsigned short val_
if (Kind_Solver == FEM_ELASTICITY) {
nMGLevels = 0;
- if (Dynamic_Analysis == STATIC) nExtIter = 1;
}
/*--- Initialize the ofstream ConvHistFile. ---*/
- ofstream ConvHistFile;
-
- /*--- Decide whether we should be writing unsteady solution files. ---*/
-
- if (Unsteady_Simulation == STEADY ||
- Unsteady_Simulation == HARMONIC_BALANCE)
- { Wrt_Unsteady = false; }
- else { Wrt_Unsteady = true; }
+// ofstream ConvHistFile;
- if (Kind_Solver == FEM_ELASTICITY) {
+// if (Kind_Solver == FEM_ELASTICITY) {
- if (Dynamic_Analysis == STATIC) { Wrt_Dynamic = false; }
- else { Wrt_Dynamic = true; }
+// if (Dynamic_Analysis == STATIC) { Wrt_Dynamic = false; }
+// else { Wrt_Dynamic = true; }
- } else {
- Wrt_Dynamic = false;
- }
+// } else {
+// Wrt_Dynamic = false;
+// }
/*--- Check for unsupported features. ---*/
- if ((Kind_Solver != EULER && Kind_Solver != NAVIER_STOKES && Kind_Solver != RANS) && (Unsteady_Simulation == HARMONIC_BALANCE)){
+ if ((Kind_Solver != EULER && Kind_Solver != NAVIER_STOKES && Kind_Solver != RANS) && (TimeMarching == HARMONIC_BALANCE)){
SU2_MPI::Error("Harmonic Balance not yet implemented for the incompressible solver.", CURRENT_FUNCTION);
}
@@ -3269,8 +3285,7 @@ void CConfig::SetPostprocessing(unsigned short val_software, unsigned short val_
}
}
-
- /*--- Check for Boundary condition option agreement ---*/
+ /*--- Check for Boundary condition option agreement ---*/
if (Kind_InitOption == REYNOLDS){
if ((Kind_Solver == NAVIER_STOKES || Kind_Solver == RANS) && Reynolds <=0){
SU2_MPI::Error("Reynolds number required for NAVIER_STOKES and RANS !!", CURRENT_FUNCTION);
@@ -3285,13 +3300,61 @@ void CConfig::SetPostprocessing(unsigned short val_software, unsigned short val_
SU2_MPI::Error("Number of KIND_SURFACE_MOVEMENT must match number of MARKER_MOVING", CURRENT_FUNCTION);
}
+ if (Time_Domain && Time_Step <= 0.0 && Unst_CFL == 0.0){
+ SU2_MPI::Error("Invalid value for TIME_STEP.", CURRENT_FUNCTION);
+ }
+
+ if (TimeMarching == TIME_STEPPING){
+ nIter = 1;
+ nInnerIter = 1;
+ }
+
+ if (!Time_Domain){
+ nTimeIter = 1;
+ Time_Step = 0;
+
+ ScreenWrtFreq[0] = 1;
+ HistoryWrtFreq[0] = 1;
+
+ if (TimeMarching != HARMONIC_BALANCE)
+ TimeMarching = STEADY;
+ }
+
+ if (Time_Domain){
+ Delta_UnstTime = Time_Step;
+ Delta_DynTime = Time_Step;
+ /*--- Set the default write frequency to 1 if unsteady ---*/
+ if (!OptionIsSet("OUTPUT_WRT_FREQ")){
+ VolumeWrtFreq = 1;
+ }
+ }
+
+ if (!Multizone_Problem){
+ ScreenWrtFreq[1] = 0;
+ HistoryWrtFreq[1] = 0;
+ 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")){
+ 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 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 ((Kind_SU2 == SU2_CFD || Kind_SU2 == SU2_SOL) &&
- (Unsteady_Simulation == STEADY && !Time_Domain)){
+ (TimeMarching == STEADY && !Time_Domain)){
if((Kind_GridMovement != ROTATING_FRAME) &&
(Kind_GridMovement != STEADY_TRANSLATION) &&
@@ -3305,7 +3368,6 @@ void CConfig::SetPostprocessing(unsigned short val_software, unsigned short val_
}
}
}
-
/*--- The Line Search should be applied only in the deformation stage. ---*/
if (Kind_SU2 != SU2_DEF) {
@@ -3325,20 +3387,6 @@ void CConfig::SetPostprocessing(unsigned short val_software, unsigned short val_
else
Rotating_Frame = false;
- /*--- THIS IS A TEMPORARY WORKAROUND to run the new multizone driver without adapting the config file.
- * Will be removed soon. ---*/
- if (Multizone_Problem){
- if (Unsteady_Simulation != STEADY || Time_Domain == YES){
- if (Delta_UnstTime != 0){
- Time_Domain = YES;
- Time_Iter = nExtIter;
- Outer_Iter = Unst_nIntIter;
- Inner_Iter = 1;
- Time_Step = Delta_UnstTime;
- }
- }
- }
-
/*--- In case the grid movement parameters have not been declared in the
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. ---*/
@@ -3447,8 +3495,8 @@ void CConfig::SetPostprocessing(unsigned short val_software, unsigned short val_
MoveMotion_Origin = new unsigned short[nMoveMotion_Origin];
for (iMarker = 0; iMarker < nMarker_Moving; iMarker++){
MoveMotion_Origin[iMarker] = NO;
+ }
}
- }
if (nMoveMotion_Origin != nMarker_Moving){
SU2_MPI::Error("Number of MOVE_MOTION_ORIGIN must match number of MARKER_MOVING.", CURRENT_FUNCTION);
}
@@ -3456,7 +3504,7 @@ void CConfig::SetPostprocessing(unsigned short val_software, unsigned short val_
/*-- Setting Harmonic Balance period from the config file */
- if (Unsteady_Simulation == HARMONIC_BALANCE) {
+ if (TimeMarching == HARMONIC_BALANCE) {
HarmonicBalance_Period = GetHarmonicBalance_Period();
if (HarmonicBalance_Period < 0) {
SU2_MPI::Error("Not a valid value for time period!!", CURRENT_FUNCTION);
@@ -3470,7 +3518,7 @@ void CConfig::SetPostprocessing(unsigned short val_software, unsigned short val_
if (nOmega_HB != nTimeInstances) {
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 ---*/
@@ -3478,40 +3526,40 @@ void CConfig::SetPostprocessing(unsigned short val_software, unsigned short val_
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 {
+ }else{
nMarker_TurboPerformance = nMarker_Turbomachinery;
}
} else {
nMarker_TurboPerformance = 0;
nSpanWiseSections =1;
}
-
+
/*--- Set number of TurboPerformance markers ---*/
if(nMarker_Turbomachinery != 0){
nSpan_iZones = new unsigned short[nZone];
}
-
+
/*--- Set number of TurboPerformance markers ---*/
if(GetGrid_Movement() && RampRotatingFrame && !DiscreteAdjoint){
FinalRotation_Rate_Z = Rotation_Rate[2];
if(abs(FinalRotation_Rate_Z) > 0.0){
Rotation_Rate[2] = RampRotatingFrame_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 ){
FinalOutletPressure = Giles_Var1[iMarker];
Giles_Var1[iMarker] = RampOutletPressure_Coeff[0];
+ }
}
- }
for (iMarker = 0; iMarker < nMarker_Riemann; iMarker++){
if (Kind_Data_Riemann[iMarker] == STATIC_PRESSURE || Kind_Data_Riemann[iMarker] == RADIAL_EQUILIBRIUM){
FinalOutletPressure = Riemann_Var1[iMarker];
@@ -3852,9 +3900,9 @@ void CConfig::SetPostprocessing(unsigned short val_software, unsigned short val_
/*--- Evaluate when the Cl should be evaluated ---*/
- Iter_Fixed_CL = SU2_TYPE::Int(nExtIter / (su2double(Update_Alpha)+1));
- Iter_Fixed_CM = SU2_TYPE::Int(nExtIter / (su2double(Update_iH)+1));
- Iter_Fixed_NetThrust = SU2_TYPE::Int(nExtIter / (su2double(Update_BCThrust)+1));
+ Iter_Fixed_CL = SU2_TYPE::Int(nInnerIter / (su2double(Update_Alpha)+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 ---*/
@@ -3876,9 +3924,9 @@ void CConfig::SetPostprocessing(unsigned short val_software, unsigned short val_
Kappa_Flow[1] = Kappa_AdjFlow[1];
}
- if (Iter_Fixed_CL == 0) { Iter_Fixed_CL = nExtIter+1; Update_Alpha = 0; }
- if (Iter_Fixed_CM == 0) { Iter_Fixed_CM = nExtIter+1; Update_iH = 0; }
- if (Iter_Fixed_NetThrust == 0) { Iter_Fixed_NetThrust = nExtIter+1; Update_BCThrust = 0; }
+ if (Iter_Fixed_CL == 0) { Iter_Fixed_CL = nInnerIter+1; Update_Alpha = 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];
@@ -3922,7 +3970,7 @@ void CConfig::SetPostprocessing(unsigned short val_software, unsigned short val_
if (Kind_TimeIntScheme_FEM_Flow == ADER_DG) {
- Unsteady_Simulation = TIME_STEPPING; // Only time stepping for ADER.
+ TimeMarching = 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. */
@@ -4151,7 +4199,7 @@ void CConfig::SetPostprocessing(unsigned short val_software, unsigned short val_
}
/*--- Set up the time stepping / unsteady CFL options. ---*/
- if ((Unsteady_Simulation == TIME_STEPPING) && (Unst_CFL != 0.0)) {
+ if ((TimeMarching == TIME_STEPPING) && (Unst_CFL != 0.0)) {
for (iCFL = 0; iCFL < nCFL; iCFL++)
CFL[iCFL] = Unst_CFL;
}
@@ -4163,8 +4211,7 @@ void CConfig::SetPostprocessing(unsigned short val_software, unsigned short val_
if (!ContinuousAdjoint & !DiscreteAdjoint) {
if ((Fixed_CL_Mode) || (Fixed_CM_Mode)) {
ConvCriteria = RESIDUAL;
- nExtIter += Iter_dCL_dAlpha;
- OrderMagResidual = 24;
+ nInnerIter += Iter_dCL_dAlpha;
MinLogResidual = -24;
}
}
@@ -4392,8 +4439,8 @@ void CConfig::SetPostprocessing(unsigned short val_software, unsigned short val_
if (Comm_Level == COMM_NONE)
SU2_MPI::Error("COMM_LEVEL = NONE not yet implemented.", CURRENT_FUNCTION);
- Wrt_Sol_Freq = nExtIter+1;
- Wrt_Sol_Freq_DualTime = nExtIter+1;
+ Wrt_Sol_Freq = nTimeIter+1;
+ Wrt_Sol_Freq_DualTime = nTimeIter+1;
/*--- Write only the restart. ---*/
@@ -4437,7 +4484,7 @@ void CConfig::SetPostprocessing(unsigned short val_software, unsigned short val_
SU2_MPI::Error(string("MESH_BOX_SIZE specified without 3 values.\n"),
CURRENT_FUNCTION);
}
-
+
if (DiscreteAdjoint) {
#if !defined CODI_REVERSE_TYPE
if (Kind_SU2 == SU2_CFD) {
@@ -4450,7 +4497,7 @@ void CConfig::SetPostprocessing(unsigned short val_software, unsigned short val_
/*--- Disable writing of limiters if enabled ---*/
Wrt_Limiters = false;
- if (Unsteady_Simulation) {
+ if (TimeMarching) {
Restart_Flow = false;
@@ -4460,12 +4507,7 @@ void CConfig::SetPostprocessing(unsigned short val_software, unsigned short val_
string("GRID_MOVEMENT = RIGID_MOTION."), CURRENT_FUNCTION);
}
- /*--- Quickfix to not trigger the error message below if SINGLEZONE_DRIVER is used.
- Once the old driver (i.e. EXT_ITER with it) is removed, the Error conditional
- can be changed. ---*/
- if (SinglezoneDriver) nExtIter = Time_Iter;
-
- if (Unst_AdjointIter- long(nExtIter) < 0){
+ if (Unst_AdjointIter- long(nTimeIter) < 0){
SU2_MPI::Error(string("Invalid iteration number requested for unsteady adjoint.\n" ) +
string("Make sure EXT_ITER is larger or equal than UNST_ADJOINT_ITER."),
CURRENT_FUNCTION);
@@ -4474,7 +4516,7 @@ void CConfig::SetPostprocessing(unsigned short val_software, unsigned short val_
/*--- If the averaging interval is not set, we average over all time-steps ---*/
if (Iter_Avg_Objective == 0.0) {
- Iter_Avg_Objective = nExtIter;
+ Iter_Avg_Objective = nTimeIter;
}
}
@@ -4517,9 +4559,7 @@ void CConfig::SetPostprocessing(unsigned short val_software, unsigned short val_
RampOutletPressure = false;
RampRotatingFrame = false;
-
}
-
}
void CConfig::SetMarkers(unsigned short val_software) {
@@ -5157,12 +5197,11 @@ void CConfig::SetOutput(unsigned short val_software, unsigned short val_izone) {
bool fea = ((Kind_Solver == FEM_ELASTICITY) || (Kind_Solver == DISC_ADJ_FEM));
-
cout << endl <<"----------------- Physical Case Definition ( Zone " << iZone << " ) -------------------" << endl;
if (val_software == SU2_CFD) {
if (FSI_Problem) {
cout << "Fluid-Structure Interaction." << endl;
- }
+ }
if (DiscreteAdjoint) {
cout <<"Discrete Adjoint equations using Algorithmic Differentiation " << endl;
@@ -5279,12 +5318,8 @@ void CConfig::SetOutput(unsigned short val_software, unsigned short val_izone) {
if (Restart) {
if (Read_Binary_Restart) cout << "Reading and writing binary SU2 native restart files." << endl;
else cout << "Reading and writing ASCII SU2 native restart files." << endl;
- if (!ContinuousAdjoint && Kind_Solver != FEM_ELASTICITY) cout << "Read flow solution from: " << Solution_FlowFileName << "." << endl;
+ if (!ContinuousAdjoint && Kind_Solver != FEM_ELASTICITY) cout << "Read flow solution from: " << Solution_FileName << "." << endl;
if (ContinuousAdjoint) cout << "Read adjoint solution from: " << Solution_AdjFileName << "." << endl;
- if (Kind_Solver == FEM_ELASTICITY) cout << "Read structural solution from: " << Solution_FEMFileName << "." << endl;
- if (Kind_Solver == DISC_ADJ_FEM){
- cout << "Read structural adjoint solution from: " << Solution_AdjFEMFileName << "." << endl;
- }
}
else {
if (fea) cout << "No restart solution, initialize from undeformed configuration." << endl;
@@ -5292,8 +5327,8 @@ void CConfig::SetOutput(unsigned short val_software, unsigned short val_izone) {
}
if (ContinuousAdjoint)
- cout << "Read flow solution from: " << Solution_FlowFileName << "." << endl;
-
+ cout << "Read flow solution from: " << Solution_FileName << "." << endl;
+
if (!fea){
if (Kind_Regime == COMPRESSIBLE) {
if (Ref_NonDim == DIMENSIONAL) { cout << "Dimensional simulation." << endl; }
@@ -5320,32 +5355,32 @@ void CConfig::SetOutput(unsigned short val_software, unsigned short val_izone) {
if (SystemMeasurements == US) cout << " ft." << endl; else cout << " m." << endl;
if (nMarker_Monitoring != 0){
- if ((nRefOriginMoment_X > 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] <<", "< 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] <<", "< & option_value) {
- const string delimiters(" ()[]{}:,\t\n\v\f\r");
+ 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("%");
@@ -7128,7 +7068,6 @@ CConfig::~CConfig(void) {
if (MarkerPlunging_Omega != NULL) delete [] MarkerPlunging_Omega;
/*--- plunging amplitude: ---*/
-
if (MarkerPlunging_Ampl != NULL) delete [] MarkerPlunging_Ampl;
/*--- reference origin for moments ---*/
@@ -7489,6 +7428,7 @@ CConfig::~CConfig(void) {
if (default_body_force != NULL) delete [] default_body_force;
if (default_sineload_coeff!= NULL) delete [] default_sineload_coeff;
if (default_nacelle_location != NULL) delete [] default_nacelle_location;
+ if (default_wrt_freq != NULL) delete [] default_wrt_freq;
if (default_cp_polycoeffs != NULL) delete [] default_cp_polycoeffs;
if (default_mu_polycoeffs != NULL) delete [] default_mu_polycoeffs;
@@ -7525,13 +7465,44 @@ CConfig::~CConfig(void) {
if (top_optim_kernels != NULL) delete [] top_optim_kernels;
if (top_optim_kernel_params != NULL) delete [] top_optim_kernel_params;
if (top_optim_filter_radius != NULL) delete [] top_optim_filter_radius;
+
+ if (ScreenOutput != NULL) delete [] ScreenOutput;
+ if (HistoryOutput != NULL) delete [] HistoryOutput;
+ if (VolumeOutput != NULL) delete [] VolumeOutput;
+ if (Mesh_Box_Size != NULL) delete [] Mesh_Box_Size;
+ if (VolumeOutputFiles != NULL) delete [] VolumeOutputFiles;
- if (Kind_SurfaceMovement != NULL) delete [] Kind_SurfaceMovement;
}
-string CConfig::GetUnsteady_FileName(string val_filename, int val_iter) {
+string CConfig::GetFilename(string filename, string ext, unsigned long Iter){
+
+ /*--- Remove any extension --- */
+
+ unsigned short lastindex = filename.find_last_of(".");
+ filename = filename.substr(0, lastindex);
+
+ /*--- Add the extension --- */
+
+ filename = filename + string(ext);
+
+ /*--- Append the zone number if multizone problems ---*/
+ if (GetnZone() > 1)
+ filename = GetMultizone_FileName(filename, GetiZone(), ext);
+
+ /*--- Append the zone number if multiple instance problems ---*/
+ if (GetnTimeInstances() > 1)
+ filename = GetMultiInstance_FileName(filename, GetiInst(), ext);
- string UnstExt, UnstFilename = val_filename;
+ if (GetTime_Domain()){
+ filename = GetUnsteady_FileName(filename, (int)Iter, ext);
+ }
+
+ return filename;
+}
+
+string CConfig::GetUnsteady_FileName(string val_filename, int val_iter, string ext) {
+
+ string UnstExt="", UnstFilename = val_filename;
char buffer[50];
/*--- Check that a positive value iteration is requested (for now). ---*/
@@ -7539,62 +7510,68 @@ string CConfig::GetUnsteady_FileName(string val_filename, int val_iter) {
if (val_iter < 0) {
SU2_MPI::Error("Requesting a negative iteration number for the restart file!!", CURRENT_FUNCTION);
}
-
+
+ unsigned short lastindex = UnstFilename.find_last_of(".");
+ UnstFilename = UnstFilename.substr(0, lastindex);
+
/*--- Append iteration number for unsteady cases ---*/
- if ((Wrt_Unsteady) || (Wrt_Dynamic)) {
- unsigned short lastindex = UnstFilename.find_last_of(".");
- UnstFilename = UnstFilename.substr(0, lastindex);
- if ((val_iter >= 0) && (val_iter < 10)) SPRINTF (buffer, "_0000%d.dat", val_iter);
- if ((val_iter >= 10) && (val_iter < 100)) SPRINTF (buffer, "_000%d.dat", val_iter);
- if ((val_iter >= 100) && (val_iter < 1000)) SPRINTF (buffer, "_00%d.dat", val_iter);
- if ((val_iter >= 1000) && (val_iter < 10000)) SPRINTF (buffer, "_0%d.dat", val_iter);
- if (val_iter >= 10000) SPRINTF (buffer, "_%d.dat", val_iter);
- string UnstExt = string(buffer);
- UnstFilename.append(UnstExt);
+ 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);
+ UnstExt = string(buffer);
}
+ UnstExt += ext;
+ UnstFilename.append(UnstExt);
return UnstFilename;
}
-string CConfig::GetMultizone_FileName(string val_filename, int val_iZone) {
+string CConfig::GetMultizone_FileName(string val_filename, int val_iZone, string ext) {
string multizone_filename = val_filename;
char buffer[50];
+ unsigned short lastindex = multizone_filename.find_last_of(".");
+ multizone_filename = multizone_filename.substr(0, lastindex);
+
if (GetnZone() > 1 ) {
- unsigned short lastindex = multizone_filename.find_last_of(".");
- multizone_filename = multizone_filename.substr(0, lastindex);
- SPRINTF (buffer, "_%d.dat", SU2_TYPE::Int(val_iZone));
+ 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) {
+string CConfig::GetMultizone_HistoryFileName(string val_filename, int val_iZone, string ext) {
string multizone_filename = val_filename;
char buffer[50];
-
+ unsigned short lastindex = multizone_filename.find_last_of(".");
+ multizone_filename = multizone_filename.substr(0, lastindex);
if (GetnZone() > 1 ) {
- unsigned short lastindex = multizone_filename.find_last_of(".");
- multizone_filename = multizone_filename.substr(0, lastindex);
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) {
+string CConfig::GetMultiInstance_FileName(string val_filename, int val_iInst, string ext) {
string multizone_filename = val_filename;
char buffer[50];
unsigned short lastindex = multizone_filename.find_last_of(".");
multizone_filename = multizone_filename.substr(0, lastindex);
- SPRINTF (buffer, "_%d.dat", SU2_TYPE::Int(val_iInst));
+ SPRINTF (buffer, "_%d", SU2_TYPE::Int(val_iInst));
multizone_filename.append(string(buffer));
-
+ multizone_filename += ext;
return multizone_filename;
}
@@ -7717,13 +7694,12 @@ void CConfig::SetKind_ConvNumScheme(unsigned short val_kind_convnumscheme,
}
void CConfig::SetGlobalParam(unsigned short val_solver,
- unsigned short val_system,
- unsigned long val_extiter) {
+ unsigned short val_system) {
/*--- Set the simulation global time ---*/
- Current_UnstTime = static_cast(val_extiter)*Delta_UnstTime;
- Current_UnstTimeND = static_cast(val_extiter)*Delta_UnstTimeND;
+ Current_UnstTime = static_cast(TimeIter)*Delta_UnstTime;
+ Current_UnstTimeND = static_cast(TimeIter)*Delta_UnstTimeND;
/*--- Set the solver methods ---*/
@@ -7859,7 +7835,7 @@ void CConfig::SetGlobalParam(unsigned short val_solver,
case FEM_ELASTICITY:
- Current_DynTime = static_cast(val_extiter)*Delta_DynTime;
+ Current_DynTime = static_cast(TimeIter)*Delta_DynTime;
if (val_system == RUNTIME_FEA_SYS) {
SetKind_ConvNumScheme(NONE, NONE, NONE, NONE, NONE, NONE);
@@ -9401,49 +9377,29 @@ void CConfig::SetFreeStreamTurboNormal(su2double* turboNormal){
}
void CConfig::SetMultizone(CConfig *driver_config, CConfig **config_container){
-
- unsigned short iMarker_CfgFile, iMarker_ZoneInterface;
-
- /*--- If the command MARKER_ZONE_INTERFACE is not in the config file, nMarker_ZoneInterface will be 0 ---*/
- if (nMarker_ZoneInterface == 0){
-
- /*--- Copy the marker interface from the driver configuration file ---*/
-
- nMarker_ZoneInterface = driver_config->GetnMarker_ZoneInterface();
- Marker_ZoneInterface = new string[nMarker_ZoneInterface];
-
- /*--- Set the Markers at the interface from the main config file ---*/
- for (iMarker_ZoneInterface = 0; iMarker_ZoneInterface < nMarker_ZoneInterface; iMarker_ZoneInterface++){
- Marker_ZoneInterface[iMarker_ZoneInterface] = driver_config->GetMarkerTag_ZoneInterface(iMarker_ZoneInterface);
+
+ 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);
}
-
- /*--- Identification of Multizone markers ---*/
- if (rank == MASTER_NODE) cout << endl << "-------------------- Interface Boundary Information ---------------------" << endl;
- if (rank == MASTER_NODE) cout << "The interface markers are: ";
-
- unsigned short indexOutput = 0;
- for (iMarker_CfgFile = 0; iMarker_CfgFile < nMarker_CfgFile; iMarker_CfgFile++) {
- unsigned short indexMarker = 0;
- Marker_CfgFile_ZoneInterface[iMarker_CfgFile] = NO;
- for (iMarker_ZoneInterface = 0; iMarker_ZoneInterface < nMarker_ZoneInterface; iMarker_ZoneInterface++){
- if (Marker_CfgFile_TagBound[iMarker_CfgFile] == Marker_ZoneInterface[iMarker_ZoneInterface]){
- indexMarker = (int)(iMarker_ZoneInterface/2+1);
- indexOutput++;
- if (rank == MASTER_NODE) cout << Marker_CfgFile_TagBound[iMarker_CfgFile];
- }
- }
- Marker_CfgFile_ZoneInterface[iMarker_CfgFile] = indexMarker;
- if (rank == MASTER_NODE){
- if (indexMarker > 0 && (indexOutput < (nMarker_ZoneInterface/2))) cout << ", ";
- else if (indexMarker > 0 && (indexOutput == (nMarker_ZoneInterface/2))) cout << ".";
- }
+ 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()){
+ SU2_MPI::Error("Option OUTER_ITER must be the same in all zones.", CURRENT_FUNCTION);
+ }
+ 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]->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()){
+ SU2_MPI::Error("Option MULTIZONE_MESH must be the same in all zones.", CURRENT_FUNCTION);
}
- if (rank == MASTER_NODE) cout << endl;
}
- /*--- Set the Multizone Boolean to true ---*/
- Multizone_Problem = true;
-
/*--- Set the Restart iter for time dependent problems ---*/
if (driver_config->GetRestart()){
Unst_RestartIter = driver_config->GetRestart_Iter();
diff --git a/Common/src/dual_grid_structure.cpp b/Common/src/dual_grid_structure.cpp
index 2054f7c9771e..233c8c06dc7e 100644
--- a/Common/src/dual_grid_structure.cpp
+++ b/Common/src/dual_grid_structure.cpp
@@ -59,7 +59,7 @@ CPoint::CPoint(unsigned short val_nDim, unsigned long val_globalindex, CConfig *
/*--- Volume (0 -> Vol_nP1, 1-> Vol_n, 2 -> Vol_nM1 ) and coordinates of the control volume ---*/
- if (config->GetUnsteady_Simulation() == NO) {
+ if (config->GetTime_Marching() == NO) {
Volume = new su2double[1];
Volume[0] = 0.0;
}
@@ -133,7 +133,7 @@ CPoint::CPoint(unsigned short val_nDim, unsigned long val_globalindex, CConfig *
/*--- Structures for storing old node coordinates for computing grid
velocities via finite differencing with dynamically deforming meshes. ---*/
/*--- In the case of deformable mesh solver, these coordinates are stored as solutions to the mesh problem ---*/
- if ( config->GetGrid_Movement() && (config->GetUnsteady_Simulation() != NO)) {
+ if ( config->GetGrid_Movement() && (config->GetTime_Marching() != NO)) {
Coord_p1 = new su2double[nDim];
Coord_n = new su2double[nDim];
Coord_n1 = new su2double[nDim];
@@ -147,6 +147,9 @@ CPoint::CPoint(unsigned short val_nDim, unsigned long val_globalindex, CConfig *
/*--- Intialize the value of the periodic volume. ---*/
Periodic_Volume = 0.0;
+ /*--- Init walldistance ---*/
+
+ Wall_Distance = 0.0;
}
CPoint::CPoint(su2double val_coord_0, su2double val_coord_1, unsigned long val_globalindex, CConfig *config) : CDualGrid(2) {
@@ -165,7 +168,7 @@ CPoint::CPoint(su2double val_coord_0, su2double val_coord_1, unsigned long val_g
/*--- Volume (0 -> Vol_nP1, 1-> Vol_n, 2 -> Vol_nM1 ) and coordinates of the control volume ---*/
- if (config->GetUnsteady_Simulation() == NO) {
+ if (config->GetTime_Marching() == NO) {
Volume = new su2double[1];
Volume[0] = 0.0;
}
@@ -238,7 +241,7 @@ CPoint::CPoint(su2double val_coord_0, su2double val_coord_1, unsigned long val_g
/*--- Structures for storing old node coordinates for computing grid
velocities via finite differencing with dynamically deforming meshes. ---*/
/*--- In the case of deformable mesh solver, these coordinates are stored as solutions to the mesh problem ---*/
- if ( config->GetGrid_Movement() && (config->GetUnsteady_Simulation() != NO)) {
+ if ( config->GetGrid_Movement() && (config->GetTime_Marching() != NO)) {
Coord_p1 = new su2double[nDim];
Coord_n = new su2double[nDim];
Coord_n1 = new su2double[nDim];
@@ -274,7 +277,7 @@ CPoint::CPoint(su2double val_coord_0, su2double val_coord_1, su2double val_coord
GridVel = NULL; GridVel_Grad = NULL;
/*--- Volume (0 -> Vol_nP1, 1-> Vol_n, 2 -> Vol_nM1 ) and coordinates of the control volume ---*/
- if ( config->GetUnsteady_Simulation() == NO ) {
+ if ( config->GetTime_Marching() == NO ) {
Volume = new su2double[1];
Volume[0] = 0.0;
}
@@ -349,7 +352,7 @@ CPoint::CPoint(su2double val_coord_0, su2double val_coord_1, su2double val_coord
/*--- Structures for storing old node coordinates for computing grid
velocities via finite differencing with dynamically deforming meshes. ---*/
/*--- In the case of deformable mesh solver, these coordinates are stored as solutions to the mesh problem ---*/
- if ( config->GetGrid_Movement() && (config->GetUnsteady_Simulation() != NO)) {
+ if ( config->GetGrid_Movement() && (config->GetTime_Marching() != NO)) {
Coord_p1 = new su2double[nDim];
Coord_n = new su2double[nDim];
Coord_n1 = new su2double[nDim];
diff --git a/Common/src/fem_geometry_structure.cpp b/Common/src/fem_geometry_structure.cpp
index 3f5e1c50b2a7..cf5407e35bd1 100644
--- a/Common/src/fem_geometry_structure.cpp
+++ b/Common/src/fem_geometry_structure.cpp
@@ -5435,14 +5435,14 @@ void CMeshFEM_DG::MetricTermsVolumeElements(CConfig *config) {
bool FullMassMatrix = false, FullInverseMassMatrix = false;
bool LumpedMassMatrix = false, DerMetricTerms = false;
- if(config->GetUnsteady_Simulation() == STEADY ||
- config->GetUnsteady_Simulation() == ROTATIONAL_FRAME) {
+ if(config->GetTime_Marching() == STEADY ||
+ config->GetTime_Marching() == ROTATIONAL_FRAME) {
if( UseLumpedMassMatrix) LumpedMassMatrix = true;
else FullInverseMassMatrix = true;
}
- else if(config->GetUnsteady_Simulation() == DT_STEPPING_1ST ||
- config->GetUnsteady_Simulation() == DT_STEPPING_2ND ||
- config->GetUnsteady_Simulation() == HARMONIC_BALANCE) {
+ else if(config->GetTime_Marching() == DT_STEPPING_1ST ||
+ config->GetTime_Marching() == DT_STEPPING_2ND ||
+ config->GetTime_Marching() == HARMONIC_BALANCE) {
if( UseLumpedMassMatrix ) FullMassMatrix = LumpedMassMatrix = true;
else FullInverseMassMatrix = true;
}
diff --git a/Common/src/geometry_structure.cpp b/Common/src/geometry_structure.cpp
index 888974480a74..0ffdbce65b4e 100644
--- a/Common/src/geometry_structure.cpp
+++ b/Common/src/geometry_structure.cpp
@@ -784,7 +784,7 @@ void CGeometry::InitiateComms(CGeometry *geometry,
MPI_TYPE = COMM_TYPE_DOUBLE;
break;
case COORDINATES_OLD:
- if (config->GetUnsteady_Simulation() == DT_STEPPING_2ND)
+ if (config->GetTime_Marching() == DT_STEPPING_2ND)
COUNT_PER_POINT = nDim*2;
else
COUNT_PER_POINT = nDim;
@@ -865,7 +865,7 @@ void CGeometry::InitiateComms(CGeometry *geometry,
for (iDim = 0; iDim < nDim; iDim++) {
bufDSend[buf_offset+iDim] = vector[iDim];
}
- if (config->GetUnsteady_Simulation() == DT_STEPPING_2ND) {
+ if (config->GetTime_Marching() == DT_STEPPING_2ND) {
vector = node[iPoint]->GetCoord_n1();
for (iDim = 0; iDim < nDim; iDim++) {
bufDSend[buf_offset+nDim+iDim] = vector[iDim];
@@ -964,7 +964,7 @@ void CGeometry::CompleteComms(CGeometry *geometry,
break;
case COORDINATES_OLD:
node[iPoint]->SetCoord_n(&bufDRecv[buf_offset]);
- if (config->GetUnsteady_Simulation() == DT_STEPPING_2ND)
+ if (config->GetTime_Marching() == DT_STEPPING_2ND)
node[iPoint]->SetCoord_n1(&bufDRecv[buf_offset+nDim]);
break;
case MAX_LENGTH:
@@ -3706,6 +3706,42 @@ void CGeometry::SetElemVolume(CConfig *config)
}
}
+void CGeometry::UpdateBoundaries(CConfig *config){
+
+ unsigned short iMarker;
+ unsigned long iElem_Surface, iNode_Surface, Point_Surface;
+
+ for (iMarker = 0; iMarker GetnMarker_All(); iMarker++){
+ for (iElem_Surface = 0; iElem_Surface < nElem_Bound[iMarker]; iElem_Surface++) {
+ for (iNode_Surface = 0; iNode_Surface < bound[iMarker][iElem_Surface]->GetnNodes(); iNode_Surface++) {
+
+ Point_Surface = bound[iMarker][iElem_Surface]->GetNode(iNode_Surface);
+
+ node[Point_Surface]->SetPhysicalBoundary(false);
+ node[Point_Surface]->SetSolidBoundary(false);
+
+ if (config->GetMarker_All_KindBC(iMarker) != SEND_RECEIVE &&
+ config->GetMarker_All_KindBC(iMarker) != INTERFACE_BOUNDARY &&
+ config->GetMarker_All_KindBC(iMarker) != NEARFIELD_BOUNDARY &&
+ config->GetMarker_All_KindBC(iMarker) != PERIODIC_BOUNDARY)
+ node[Point_Surface]->SetPhysicalBoundary(true);
+
+ if (config->GetSolid_Wall(iMarker))
+ node[Point_Surface]->SetSolidBoundary(true);
+ }
+ }
+ }
+
+ /*--- Update the normal neighbors ---*/
+
+ FindNormal_Neighbor(config);
+
+ /*--- Compute wall distance ---- */
+
+ ComputeWall_Distance(config);
+
+}
+
CPhysicalGeometry::CPhysicalGeometry() : CGeometry() {
size = SU2_MPI::GetSize();
@@ -3834,7 +3870,7 @@ CPhysicalGeometry::CPhysicalGeometry(CConfig *config, unsigned short val_iZone,
Read_SU2_Format_Parallel_FEM(config, val_mesh_filename, val_iZone, val_nZone);
break;
- case CGNS:
+ case CGNS_GRID:
Read_CGNS_Format_Parallel_FEM(config, val_mesh_filename, val_iZone, val_nZone);
break;
@@ -3846,7 +3882,7 @@ CPhysicalGeometry::CPhysicalGeometry(CConfig *config, unsigned short val_iZone,
else {
switch (val_format) {
- case SU2: case CGNS: case RECTANGLE: case BOX:
+ case SU2: case CGNS_GRID: case RECTANGLE: case BOX:
Read_Mesh_FVM(config, val_mesh_filename, val_iZone, val_nZone);
break;
default:
@@ -3886,7 +3922,7 @@ CPhysicalGeometry::CPhysicalGeometry(CConfig *config, unsigned short val_iZone,
string str = "boundary.dat";
- str = config->GetMultizone_FileName(str, val_iZone);
+ str = config->GetMultizone_FileName(str, val_iZone, ".dat");
/*--- Open .su2 grid file ---*/
@@ -5963,7 +5999,7 @@ void CPhysicalGeometry::DistributeMarkerTags(CConfig *config, CGeometry *geometr
SU2_MPI::Bcast(&nMarker_Global, 1, MPI_UNSIGNED_LONG,
MASTER_NODE, MPI_COMM_WORLD);
- char *mpi_str_buf = new char[nMarker_Global*MAX_STRING_SIZE];
+ char *mpi_str_buf = new char[nMarker_Global*MAX_STRING_SIZE]();
if (rank == MASTER_NODE) {
for (iMarker = 0; iMarker < nMarker_Global; iMarker++) {
SPRINTF(&mpi_str_buf[iMarker*MAX_STRING_SIZE], "%s",
@@ -7616,7 +7652,7 @@ void CPhysicalGeometry::Read_Mesh_FVM(CConfig *config,
case SU2:
MeshFVM = new CSU2ASCIIMeshReaderFVM(config, val_iZone, val_nZone);
break;
- case CGNS:
+ case CGNS_GRID:
MeshFVM = new CCGNSMeshReaderFVM(config, val_iZone, val_nZone);
break;
case RECTANGLE:
@@ -7997,7 +8033,7 @@ void CPhysicalGeometry::LoadUnpartitionedSurfaceElements(CConfig *config,
/*--- Update config file lists in order to store the boundary
information for this marker in the correct place. ---*/
-
+
Tag_to_Marker[config->GetMarker_CfgFile_TagBound(Marker_Tag)] = Marker_Tag;
config->SetMarker_All_TagBound(iMarker, Marker_Tag);
config->SetMarker_All_KindBC(iMarker, config->GetMarker_CfgFile_KindBC(Marker_Tag));
@@ -8009,13 +8045,15 @@ void CPhysicalGeometry::LoadUnpartitionedSurfaceElements(CConfig *config,
config->SetMarker_All_ZoneInterface(iMarker, config->GetMarker_CfgFile_ZoneInterface(Marker_Tag));
config->SetMarker_All_DV(iMarker, config->GetMarker_CfgFile_DV(Marker_Tag));
config->SetMarker_All_Moving(iMarker, config->GetMarker_CfgFile_Moving(Marker_Tag));
+ config->SetMarker_All_Deform_Mesh(iMarker, config->GetMarker_CfgFile_Deform_Mesh(Marker_Tag));
+ config->SetMarker_All_Fluid_Load(iMarker, config->GetMarker_CfgFile_Fluid_Load(Marker_Tag));
config->SetMarker_All_PyCustom(iMarker, config->GetMarker_CfgFile_PyCustom(Marker_Tag));
config->SetMarker_All_PerBound(iMarker, config->GetMarker_CfgFile_PerBound(Marker_Tag));
config->SetMarker_All_SendRecv(iMarker, NONE);
config->SetMarker_All_Turbomachinery(iMarker, config->GetMarker_CfgFile_Turbomachinery(Marker_Tag));
config->SetMarker_All_TurbomachineryFlag(iMarker, config->GetMarker_CfgFile_TurbomachineryFlag(Marker_Tag));
config->SetMarker_All_MixingPlaneInterface(iMarker, config->GetMarker_CfgFile_MixingPlaneInterface(Marker_Tag));
-
+
}
}
@@ -13306,9 +13344,9 @@ void CPhysicalGeometry::SetGridVelocity(CConfig *config, unsigned long iter) {
/*--- Compute mesh velocity with 1st or 2nd-order approximation ---*/
for (iDim = 0; iDim < nDim; iDim++) {
- if (config->GetUnsteady_Simulation() == DT_STEPPING_1ST)
+ if (config->GetTime_Marching() == DT_STEPPING_1ST)
GridVel = ( Coord_nP1[iDim] - Coord_n[iDim] ) / TimeStep;
- if (config->GetUnsteady_Simulation() == DT_STEPPING_2ND)
+ if (config->GetTime_Marching() == DT_STEPPING_2ND)
GridVel = ( 3.0*Coord_nP1[iDim] - 4.0*Coord_n[iDim]
+ 1.0*Coord_nM1[iDim] ) / (2.0*TimeStep);
@@ -13502,28 +13540,28 @@ void CPhysicalGeometry::SetBoundSensitivity(CConfig *config) {
/*--- Time-average any unsteady surface sensitivities ---*/
- unsigned long iExtIter, nExtIter;
+ unsigned long iTimeIter, nTimeIter;
su2double delta_T, total_T;
- if (config->GetUnsteady_Simulation() && config->GetWrt_Unsteady()) {
- nExtIter = config->GetUnst_AdjointIter();
- delta_T = config->GetDelta_UnstTime();
- total_T = (su2double)nExtIter*delta_T;
- } else if (config->GetUnsteady_Simulation() == HARMONIC_BALANCE) {
+ if (config->GetTime_Marching() && config->GetTime_Domain()) {
+ nTimeIter = config->GetUnst_AdjointIter();
+ delta_T = config->GetTime_Step();
+ total_T = (su2double)nTimeIter*delta_T;
+ } else if (config->GetTime_Marching() == HARMONIC_BALANCE) {
/*--- Compute period of oscillation & compute time interval using nTimeInstances ---*/
su2double period = config->GetHarmonicBalance_Period();
- nExtIter = config->GetnTimeInstances();
- delta_T = period/(su2double)nExtIter;
+ nTimeIter = config->GetnTimeInstances();
+ delta_T = period/(su2double)nTimeIter;
total_T = period;
} else {
- nExtIter = 1;
+ nTimeIter = 1;
delta_T = 1.0;
total_T = 1.0;
}
- for (iExtIter = 0; iExtIter < nExtIter; iExtIter++) {
+ for (iTimeIter = 0; iTimeIter < nTimeIter; iTimeIter++) {
/*--- Prepare to read surface sensitivity files (CSV) ---*/
@@ -13535,16 +13573,16 @@ void CPhysicalGeometry::SetBoundSensitivity(CConfig *config) {
strcpy (cstr, surfadj_filename.c_str());
/*--- Write file name with extension if unsteady or steady ---*/
- if (config->GetUnsteady_Simulation() == HARMONIC_BALANCE)
- SPRINTF (buffer, "_%d.csv", SU2_TYPE::Int(iExtIter));
+ if (config->GetTime_Marching() == HARMONIC_BALANCE)
+ SPRINTF (buffer, "_%d.csv", SU2_TYPE::Int(iTimeIter));
- if ((config->GetUnsteady_Simulation() && config->GetWrt_Unsteady()) ||
- (config->GetUnsteady_Simulation() == HARMONIC_BALANCE)) {
- if ((SU2_TYPE::Int(iExtIter) >= 0) && (SU2_TYPE::Int(iExtIter) < 10)) SPRINTF (buffer, "_0000%d.csv", SU2_TYPE::Int(iExtIter));
- if ((SU2_TYPE::Int(iExtIter) >= 10) && (SU2_TYPE::Int(iExtIter) < 100)) SPRINTF (buffer, "_000%d.csv", SU2_TYPE::Int(iExtIter));
- if ((SU2_TYPE::Int(iExtIter) >= 100) && (SU2_TYPE::Int(iExtIter) < 1000)) SPRINTF (buffer, "_00%d.csv", SU2_TYPE::Int(iExtIter));
- if ((SU2_TYPE::Int(iExtIter) >= 1000) && (SU2_TYPE::Int(iExtIter) < 10000)) SPRINTF (buffer, "_0%d.csv", SU2_TYPE::Int(iExtIter));
- if (SU2_TYPE::Int(iExtIter) >= 10000) SPRINTF (buffer, "_%d.csv", SU2_TYPE::Int(iExtIter));
+ if ((config->GetTime_Marching() && config->GetTime_Domain()) ||
+ (config->GetTime_Marching() == HARMONIC_BALANCE)) {
+ if ((SU2_TYPE::Int(iTimeIter) >= 0) && (SU2_TYPE::Int(iTimeIter) < 10)) SPRINTF (buffer, "_0000%d.csv", SU2_TYPE::Int(iTimeIter));
+ if ((SU2_TYPE::Int(iTimeIter) >= 10) && (SU2_TYPE::Int(iTimeIter) < 100)) SPRINTF (buffer, "_000%d.csv", SU2_TYPE::Int(iTimeIter));
+ if ((SU2_TYPE::Int(iTimeIter) >= 100) && (SU2_TYPE::Int(iTimeIter) < 1000)) SPRINTF (buffer, "_00%d.csv", SU2_TYPE::Int(iTimeIter));
+ if ((SU2_TYPE::Int(iTimeIter) >= 1000) && (SU2_TYPE::Int(iTimeIter) < 10000)) SPRINTF (buffer, "_0%d.csv", SU2_TYPE::Int(iTimeIter));
+ if (SU2_TYPE::Int(iTimeIter) >= 10000) SPRINTF (buffer, "_%d.csv", SU2_TYPE::Int(iTimeIter));
}
else
SPRINTF (buffer, ".csv");
@@ -13556,17 +13594,27 @@ void CPhysicalGeometry::SetBoundSensitivity(CConfig *config) {
string::size_type position;
Surface_file.open(cstr, ios::in);
-
- /*--- Read extra inofmration ---*/
+
+ /*--- File header ---*/
getline(Surface_file, text_line);
- text_line.erase (0,9);
- su2double AoASens = atof(text_line.c_str());
- config->SetAoA_Sens(AoASens);
- /*--- File header ---*/
+ vector split_line;
- getline(Surface_file, text_line);
+ char delimiter = ',';
+ split_line = PrintingToolbox::split(text_line, delimiter);
+
+ for (unsigned short iField = 0; iField < split_line.size(); iField++){
+ PrintingToolbox::trim(split_line[iField]);
+ }
+
+ std::vector::iterator it = std::find(split_line.begin(), split_line.end(), "\"Surface_Sensitivity\"");
+
+ if (it == split_line.end()){
+ SU2_MPI::Error("Surface sensitivity not found in file.", CURRENT_FUNCTION);
+ }
+
+ unsigned short sens_index = std::distance(split_line.begin(), it);
while (getline(Surface_file, text_line)) {
for (icommas = 0; icommas < 50; icommas++) {
@@ -13574,7 +13622,10 @@ void CPhysicalGeometry::SetBoundSensitivity(CConfig *config) {
if (position!=string::npos) text_line.erase (position,1);
}
stringstream point_line(text_line);
- point_line >> iPoint >> Sensitivity;
+ point_line >> iPoint;
+
+ for (int i = 1; i <= sens_index; i++)
+ point_line >> Sensitivity;
if (PointInDomain[iPoint]) {
@@ -13603,52 +13654,24 @@ void CPhysicalGeometry::SetSensitivity(CConfig *config) {
ifstream restart_file;
string filename = config->GetSolution_AdjFileName();
- bool sst = (config->GetKind_Turb_Model() == SST) || (config->GetKind_Turb_Model() == SST_SUST);
- bool sa = (config->GetKind_Turb_Model() == SA) || (config->GetKind_Turb_Model() == SA_NEG) ||
- (config->GetKind_Turb_Model() == SA_E) || (config->GetKind_Turb_Model() == SA_COMP) ||
- (config->GetKind_Turb_Model() == SA_E_COMP);
- bool frozen_visc = config->GetFrozen_Visc_Disc();
- unsigned short Kind_Solver = config->GetKind_Solver();
- bool flow = ((Kind_Solver == DISC_ADJ_EULER) ||
- (Kind_Solver == DISC_ADJ_RANS) ||
- (Kind_Solver == DISC_ADJ_NAVIER_STOKES) ||
- (Kind_Solver == DISC_ADJ_INC_EULER) ||
- (Kind_Solver == DISC_ADJ_INC_RANS) ||
- (Kind_Solver == DISC_ADJ_INC_NAVIER_STOKES) ||
- (Kind_Solver == ADJ_EULER) ||
- (Kind_Solver == ADJ_NAVIER_STOKES) ||
- (Kind_Solver == ADJ_RANS));
- su2double Sens, dull_val, AoASens;
- unsigned short nExtIter, iDim;
+
+ su2double AoASens;
+ unsigned short nTimeIter, iDim;
unsigned long iPoint, index;
string::size_type position;
int counter = 0;
Sensitivity = new su2double[nPoint*nDim];
- if (config->GetUnsteady_Simulation()) {
- nExtIter = config->GetnExtIter();
+ if (config->GetTime_Domain()) {
+ nTimeIter = config->GetnTime_Iter();
}else {
- nExtIter = 1;
+ nTimeIter = 1;
}
if (rank == MASTER_NODE)
- cout << "Reading in sensitivity at iteration " << nExtIter-1 << "."<< endl;
+ cout << "Reading in sensitivity at iteration " << nTimeIter-1 << "."<< endl;
- unsigned short skipVar = nDim, skipMult = 1;
-
- if (flow) {
- skipVar += skipMult*(nDim+2);
- if (sst && !frozen_visc) { skipVar += skipMult*2;}
- if (sa && !frozen_visc) { skipVar += skipMult*1;}
- }
- else if (Kind_Solver == DISC_ADJ_HEAT) {
- skipVar += 1;
- }
- else {
- cout << "WARNING: Reading in sensitivities not defined for specified solver!" << endl;
- }
-
/*--- Read all lines in the restart file ---*/
long iPoint_Local; unsigned long iPoint_Global = 0; string text_line;
@@ -13664,16 +13687,11 @@ void CPhysicalGeometry::SetSensitivity(CConfig *config) {
filename = config->GetSolution_AdjFileName();
filename = config->GetObjFunc_Extension(filename);
-
- if (config->GetUnsteady_Simulation()) {
- filename = config->GetUnsteady_FileName(filename, nExtIter-1);
- }
-
- if (config->GetnZone() > 1){
- filename = config->GetMultizone_FileName(filename, config->GetiZone());
- }
+
if (config->GetRead_Binary_Restart()) {
+
+ filename = config->GetFilename(filename, ".dat", nTimeIter-1);
char str_buf[CGNS_STRING_SIZE], fname[100];
unsigned short iVar;
@@ -13938,6 +13956,28 @@ void CPhysicalGeometry::SetSensitivity(CConfig *config) {
delete [] displace;
#endif
+
+ std::vector::iterator itx = std::find(config->fields.begin(), config->fields.end(), "\"Sensitivity_x\"");
+ std::vector::iterator ity = std::find(config->fields.begin(), config->fields.end(), "\"Sensitivity_y\"");
+ std::vector::iterator itz = std::find(config->fields.begin(), config->fields.end(), "\"Sensitivity_z\"");
+
+ if (itx == config->fields.end()){
+ SU2_MPI::Error("Sensitivity x not found in file.", CURRENT_FUNCTION);
+ }
+ if (ity == config->fields.end()){
+ SU2_MPI::Error("Sensitivity y not found in file.", CURRENT_FUNCTION);
+ }
+ if (nDim == 3){
+ if (itz == config->fields.end()){
+ SU2_MPI::Error("Sensitivity z not found in file.", CURRENT_FUNCTION);
+ }
+ }
+
+ unsigned short sens_x_idx = std::distance(config->fields.begin(), itx);
+ unsigned short sens_y_idx = std::distance(config->fields.begin(), ity);
+ unsigned short sens_z_idx = 0;
+ if (nDim == 3)
+ sens_z_idx = std::distance(config->fields.begin(), itz);
/*--- Load the data from the binary restart. ---*/
@@ -13954,9 +13994,15 @@ void CPhysicalGeometry::SetSensitivity(CConfig *config) {
/*--- We need to store this point's data, so jump to the correct
offset in the buffer of data from the restart file and load it. ---*/
- index = counter*nFields + skipVar;
- for (iDim = 0; iDim < nDim; iDim++) Sensitivity[iPoint_Local*nDim+iDim] = Restart_Data[index+iDim];
-
+ index = counter*nFields + sens_x_idx - 1;
+ Sensitivity[iPoint_Local*nDim+0] = Restart_Data[index];
+ index = counter*nFields + sens_y_idx - 1;
+ Sensitivity[iPoint_Local*nDim+1] = Restart_Data[index];
+
+ if (nDim == 3){
+ index = counter*nFields + sens_z_idx - 1;
+ Sensitivity[iPoint_Local*nDim+2] = Restart_Data[index];
+ }
/*--- Increment the overall counter for how many points have been loaded. ---*/
counter++;
}
@@ -13967,6 +14013,8 @@ void CPhysicalGeometry::SetSensitivity(CConfig *config) {
config->SetAoA_Sens(Restart_Meta[4]);
} else {
+
+ filename = config->GetFilename(filename, ".csv", nTimeIter-1);
/*--- First, check that this is not a binary restart file. ---*/
@@ -14057,11 +14105,40 @@ void CPhysicalGeometry::SetSensitivity(CConfig *config) {
getline (restart_file, text_line);
+ vector fields = PrintingToolbox::split(text_line, ',');
+
+ for (unsigned short iField = 0; iField < fields.size(); iField++){
+ PrintingToolbox::trim(fields[iField]);
+ }
+
+ std::vector::iterator itx = std::find(fields.begin(), fields.end(), "\"Sensitivity_x\"");
+ std::vector::iterator ity = std::find(fields.begin(), fields.end(), "\"Sensitivity_y\"");
+ std::vector::iterator itz = std::find(fields.begin(), fields.end(), "\"Sensitivity_z\"");
+
+ if (itx == fields.end()){
+ SU2_MPI::Error("Sensitivity x not found in file.", CURRENT_FUNCTION);
+ }
+ if (ity ==fields.end()){
+ SU2_MPI::Error("Sensitivity y not found in file.", CURRENT_FUNCTION);
+ }
+ if (nDim == 3){
+ if (itz == fields.end()){
+ SU2_MPI::Error("Sensitivity z not found in file.", CURRENT_FUNCTION);
+ }
+ }
+
+ unsigned short sens_x_idx = std::distance(fields.begin(), itx);
+ unsigned short sens_y_idx = std::distance(fields.begin(), ity);
+ unsigned short sens_z_idx = 0;
+ if (nDim == 3)
+ sens_z_idx = std::distance(fields.begin(), itz);
+
+
for (iPoint_Global = 0; iPoint_Global < GetGlobal_nPointDomain(); iPoint_Global++ ) {
getline (restart_file, text_line);
-
- istringstream point_line(text_line);
+
+ vector point_line = PrintingToolbox::split(text_line, ',');
/*--- Retrieve local index. If this node from the restart file lives
on the current processor, we will load and instantiate the vars. ---*/
@@ -14069,13 +14146,11 @@ void CPhysicalGeometry::SetSensitivity(CConfig *config) {
iPoint_Local = GetGlobal_to_Local_Point(iPoint_Global);
if (iPoint_Local > -1) {
-
- point_line >> index;
- for (iDim = 0; iDim < skipVar; iDim++) { point_line >> dull_val;}
- for (iDim = 0; iDim < nDim; iDim++) {
- point_line >> Sens;
- Sensitivity[iPoint_Local*nDim+iDim] = Sens;
- }
+ Sensitivity[iPoint_Local*nDim+0] = PrintingToolbox::stod(point_line[sens_x_idx]);
+ Sensitivity[iPoint_Local*nDim+1] = PrintingToolbox::stod(point_line[sens_y_idx]);
+ if (nDim == 3)
+ Sensitivity[iPoint_Local*nDim+2] = PrintingToolbox::stod(point_line[sens_z_idx]);
+
}
}
@@ -14918,7 +14993,7 @@ void CPhysicalGeometry::Compute_Wing(CConfig *config, bool original_surface,
/*--- Write an output file---*/
- if (config->GetOutput_FileFormat() == PARAVIEW) {
+ if (config->GetTabular_FileFormat() == TAB_CSV) {
Wing_File.open("wing_description.csv", ios::out);
if (config->GetSystemMeasurements() == US)
Wing_File << "\"yCoord/SemiSpan\",\"Area (in^2)\",\"Max. Thickness (in)\",\"Chord (in)\",\"Leading Edge Radius (1/in)\",\"Max. Thickness/Chord\",\"Twist (deg)\",\"Curvature (1/in)\",\"Dihedral (deg)\",\"Leading Edge XLoc/SemiSpan\",\"Leading Edge ZLoc/SemiSpan\",\"Trailing Edge XLoc/SemiSpan\",\"Trailing Edge ZLoc/SemiSpan\"" << endl;
@@ -15010,7 +15085,7 @@ void CPhysicalGeometry::Compute_Wing(CConfig *config, bool original_surface,
for (iPlane = 0; iPlane < nPlane; iPlane++) {
if (Xcoord_Airfoil[iPlane].size() > 1) {
- if (config->GetOutput_FileFormat() == PARAVIEW) {
+ if (config->GetTabular_FileFormat() == TAB_CSV) {
Wing_File << Ycoord_Airfoil[iPlane][0]/SemiSpan <<", "<< Area[iPlane] <<", "<< MaxThickness[iPlane] <<", "<< Chord[iPlane] <<", "<< LERadius[iPlane] <<", "<< ToC[iPlane]
<<", "<< Twist[iPlane] <<", "<< Curvature[iPlane] <<", "<< Dihedral[iPlane]
<<", "<< LeadingEdge[iPlane][0]/SemiSpan <<", "<< LeadingEdge[iPlane][2]/SemiSpan
@@ -15213,7 +15288,7 @@ void CPhysicalGeometry::Compute_Fuselage(CConfig *config, bool original_surface,
/*--- Write an output file---*/
- if (config->GetOutput_FileFormat() == PARAVIEW) {
+ if (config->GetTabular_FileFormat() == TAB_CSV) {
Fuselage_File.open("fuselage_description.csv", ios::out);
if (config->GetSystemMeasurements() == US)
Fuselage_File << "\"x (in)\",\"Area (in^2)\",\"Length (in)\",\"Width (in)\",\"Waterline width (in)\",\"Height (in)\",\"Curvature (1/in)\",\"Generatrix Curve X (in)\",\"Generatrix Curve Y (in)\",\"Generatrix Curve Z (in)\",\"Axis Curve X (in)\",\"Axis Curve Y (in)\",\"Axis Curve Z (in)\"" << endl;
@@ -15296,7 +15371,7 @@ void CPhysicalGeometry::Compute_Fuselage(CConfig *config, bool original_surface,
for (iPlane = 0; iPlane < nPlane; iPlane++) {
if (Xcoord_Airfoil[iPlane].size() > 1) {
- if (config->GetOutput_FileFormat() == PARAVIEW) {
+ if (config->GetTabular_FileFormat() == TAB_CSV) {
Fuselage_File << -Ycoord_Airfoil[iPlane][0] <<", "<< Area[iPlane] <<", "<< Length[iPlane] <<", "<< Width[iPlane] <<", "<< WaterLineWidth[iPlane] <<", "<< Height[iPlane] <<", "<< Curvature[iPlane]
<<", "<< -LeadingEdge[iPlane][1] <<", "<< LeadingEdge[iPlane][0] <<", "<< LeadingEdge[iPlane][2]
<<", "<< -TrailingEdge[iPlane][1] <<", "<< TrailingEdge[iPlane][0] <<", "<< TrailingEdge[iPlane][2] << endl;
@@ -15524,7 +15599,7 @@ void CPhysicalGeometry::Compute_Nacelle(CConfig *config, bool original_surface,
/*--- Write an output file---*/
- if (config->GetOutput_FileFormat() == PARAVIEW) {
+ if (config->GetTabular_FileFormat() == TAB_CSV) {
Nacelle_File.open("nacelle_description.csv", ios::out);
if (config->GetSystemMeasurements() == US)
Nacelle_File << "\"Theta (deg)\",\"Area (in^2)\",\"Max. Thickness (in)\",\"Chord (in)\",\"Leading Edge Radius (1/in)\",\"Max. Thickness/Chord\",\"Twist (deg)\",\"Leading Edge XLoc\",\"Leading Edge ZLoc\",\"Trailing Edge XLoc\",\"Trailing Edge ZLoc\"" << endl;
@@ -15586,7 +15661,7 @@ void CPhysicalGeometry::Compute_Nacelle(CConfig *config, bool original_surface,
su2double theta_deg = atan2(Plane_Normal[iPlane][1], -Plane_Normal[iPlane][2])/PI_NUMBER*180 + 180;
if (Xcoord_Airfoil[iPlane].size() > 1) {
- if (config->GetOutput_FileFormat() == PARAVIEW) {
+ if (config->GetTabular_FileFormat() == TAB_CSV) {
Nacelle_File << theta_deg <<", "<< Area[iPlane] <<", "<< MaxThickness[iPlane] <<", "<< Chord[iPlane] <<", "<< LERadius[iPlane] <<", "<< ToC[iPlane]
<<", "<< Twist[iPlane] <<", "<< LeadingEdge[iPlane][0] <<", "<< LeadingEdge[iPlane][2]
<<", "<< TrailingEdge[iPlane][0] <<", "<< TrailingEdge[iPlane][2] << endl;
@@ -17120,9 +17195,9 @@ void CMultiGridGeometry::SetGridVelocity(CConfig *config, unsigned long iter) {
/*--- Compute mesh velocity with 1st or 2nd-order approximation ---*/
for (iDim = 0; iDim < nDim; iDim++) {
- if (config->GetUnsteady_Simulation() == DT_STEPPING_1ST)
+ if (config->GetTime_Marching() == DT_STEPPING_1ST)
GridVel = ( Coord_nP1[iDim] - Coord_n[iDim] ) / TimeStep;
- if (config->GetUnsteady_Simulation() == DT_STEPPING_2ND)
+ if (config->GetTime_Marching() == DT_STEPPING_2ND)
GridVel = ( 3.0*Coord_nP1[iDim] - 4.0*Coord_n[iDim]
+ 1.0*Coord_nM1[iDim] ) / (2.0*TimeStep);
@@ -17432,6 +17507,7 @@ CDummyGeometry::CDummyGeometry(CConfig *config){
nDim = CConfig::GetnDim(config->GetMesh_FileName(), config->GetMesh_FileFormat());
+ config->SetnSpanWiseSections(0);
}
CDummyGeometry::~CDummyGeometry(){}
diff --git a/Common/src/geometry_structure_fem_part.cpp b/Common/src/geometry_structure_fem_part.cpp
index c7e05d0045b0..0c3e2355f5f9 100644
--- a/Common/src/geometry_structure_fem_part.cpp
+++ b/Common/src/geometry_structure_fem_part.cpp
@@ -424,7 +424,7 @@ void CPhysicalGeometry::Read_SU2_Format_Parallel_FEM(CConfig *config,
string::size_type position;
unsigned long nDOFsGrid_Local = 0, loc_element_count = 0;
bool domain_flag = false;
- bool time_spectral = config->GetUnsteady_Simulation() == HARMONIC_BALANCE;
+ bool time_spectral = config->GetTime_Marching() == HARMONIC_BALANCE;
unsigned short nMarker_Max = config->GetnMarker_Max();
nZone = val_nZone;
diff --git a/Common/src/grid_adaptation_structure.cpp b/Common/src/grid_adaptation_structure.cpp
index 74c190b3e412..5efb6d9f1b78 100644
--- a/Common/src/grid_adaptation_structure.cpp
+++ b/Common/src/grid_adaptation_structure.cpp
@@ -123,7 +123,7 @@ void CGridAdaptation::GetFlowSolution(CGeometry *geometry, CConfig *config) {
string text_line;
- string mesh_filename = config->GetSolution_FlowFileName();
+ string mesh_filename = config->GetSolution_FileName();
ifstream restart_file;
char *cstr = new char [mesh_filename.size()+1];
@@ -160,7 +160,7 @@ void CGridAdaptation::GetFlowResidual(CGeometry *geometry, CConfig *config) {
su2double dummy;
string text_line;
- string mesh_filename = config->GetSolution_FlowFileName();
+ string mesh_filename = config->GetSolution_FileName();
ifstream restart_file;
char *cstr = new char [mesh_filename.size()+1];
diff --git a/Common/src/grid_movement_structure.cpp b/Common/src/grid_movement_structure.cpp
index 2adb86203694..067e19a385be 100644
--- a/Common/src/grid_movement_structure.cpp
+++ b/Common/src/grid_movement_structure.cpp
@@ -1903,7 +1903,7 @@ void CVolumetricMovement::Rigid_Rotation(CGeometry *geometry, CConfig *config,
su2double rotMatrix[3][3] = {{0.0,0.0,0.0}, {0.0,0.0,0.0}, {0.0,0.0,0.0}};
su2double dtheta, dphi, dpsi, cosTheta, sinTheta;
su2double cosPhi, sinPhi, cosPsi, sinPsi;
- bool harmonic_balance = (config->GetUnsteady_Simulation() == HARMONIC_BALANCE);
+ bool harmonic_balance = (config->GetTime_Marching() == HARMONIC_BALANCE);
bool adjoint = (config->GetContinuous_Adjoint() || config->GetDiscrete_Adjoint());
@@ -1915,7 +1915,7 @@ void CVolumetricMovement::Rigid_Rotation(CGeometry *geometry, CConfig *config,
/*--- For the unsteady adjoint, use reverse time ---*/
if (adjoint) {
/*--- Set the first adjoint mesh position to the final direct one ---*/
- if (iter == 0) dt = ((su2double)config->GetnExtIter()-1)*dt;
+ if (iter == 0) dt = ((su2double)config->GetnTime_Iter()-1)*dt;
/*--- Reverse the rotation direction for the adjoint ---*/
else dt = -1.0*dt;
} else {
@@ -2066,7 +2066,7 @@ void CVolumetricMovement::Rigid_Pitching(CGeometry *geometry, CConfig *config, u
unsigned short iDim;
unsigned short nDim = geometry->GetnDim();
unsigned long iPoint;
- bool harmonic_balance = (config->GetUnsteady_Simulation() == HARMONIC_BALANCE);
+ bool harmonic_balance = (config->GetTime_Marching() == HARMONIC_BALANCE);
bool adjoint = (config->GetContinuous_Adjoint() || config->GetDiscrete_Adjoint());
@@ -2095,7 +2095,7 @@ void CVolumetricMovement::Rigid_Pitching(CGeometry *geometry, CConfig *config, u
if (adjoint) {
/*--- For the unsteady adjoint, we integrate backwards through
physical time, so perform mesh motion in reverse. ---*/
- unsigned long nFlowIter = config->GetnExtIter();
+ unsigned long nFlowIter = config->GetnTime_Iter();
unsigned long directIter = nFlowIter - iter - 1;
time_new = static_cast(directIter)*deltaT;
time_old = time_new;
@@ -2213,7 +2213,7 @@ void CVolumetricMovement::Rigid_Plunging(CGeometry *geometry, CConfig *config, u
su2double deltaT, time_new, time_old;
unsigned short iDim, nDim = geometry->GetnDim();
unsigned long iPoint;
- bool harmonic_balance = (config->GetUnsteady_Simulation() == HARMONIC_BALANCE);
+ bool harmonic_balance = (config->GetTime_Marching() == HARMONIC_BALANCE);
bool adjoint = (config->GetContinuous_Adjoint() || config->GetDiscrete_Adjoint());
@@ -2240,7 +2240,7 @@ void CVolumetricMovement::Rigid_Plunging(CGeometry *geometry, CConfig *config, u
if (adjoint) {
/*--- For the unsteady adjoint, we integrate backwards through
physical time, so perform mesh motion in reverse. ---*/
- unsigned long nFlowIter = config->GetnExtIter();
+ unsigned long nFlowIter = config->GetnTime_Iter();
unsigned long directIter = nFlowIter - iter - 1;
time_new = static_cast(directIter)*deltaT;
time_old = time_new;
@@ -2345,7 +2345,7 @@ void CVolumetricMovement::Rigid_Translation(CGeometry *geometry, CConfig *config
su2double deltaT, time_new, time_old;
unsigned short iDim, nDim = geometry->GetnDim();
unsigned long iPoint;
- bool harmonic_balance = (config->GetUnsteady_Simulation() == HARMONIC_BALANCE);
+ bool harmonic_balance = (config->GetTime_Marching() == HARMONIC_BALANCE);
bool adjoint = (config->GetContinuous_Adjoint() || config->GetDiscrete_Adjoint());
@@ -2370,7 +2370,7 @@ void CVolumetricMovement::Rigid_Translation(CGeometry *geometry, CConfig *config
if (adjoint) {
/*--- For the unsteady adjoint, we integrate backwards through
physical time, so perform mesh motion in reverse. ---*/
- unsigned long nFlowIter = config->GetnExtIter();
+ unsigned long nFlowIter = config->GetnTime_Iter();
unsigned long directIter = nFlowIter - iter - 1;
time_new = static_cast(directIter)*deltaT;
time_old = time_new;
@@ -2712,23 +2712,28 @@ void CSurfaceMovement::SetSurface_Deformation(CGeometry *geometry, CConfig *conf
/*--- Output original FFD FFDBox ---*/
if (rank == MASTER_NODE) {
- if ((config->GetOutput_FileFormat() == PARAVIEW) ||
- (config->GetOutput_FileFormat() == PARAVIEW_BINARY)) {
- cout << "Writing a Paraview file of the FFD boxes." << endl;
- FFDBox[iFFDBox]->SetParaview(geometry, iFFDBox, true);
- }
- else if (config->GetOutput_FileFormat() == TECPLOT ) {
- cout << "Writing a Tecplot file of the FFD boxes." << endl;
- FFDBox[iFFDBox]->SetTecplot(geometry, iFFDBox, true);
- }
- else {
- cout << "Writing a CGNS file of the FFD boxes." << endl;
- FFDBox[iFFDBox]->SetCGNS(geometry, iFFDBox, true);
+ for (unsigned short iFile = 0; iFile < config->GetnVolumeOutputFiles(); iFile++){
+ unsigned short *FileFormat = config->GetVolumeOutputFiles();
+ if (FileFormat[iFile] == PARAVIEW) {
+ cout << "Writing a Paraview file of the FFD boxes." << endl;
+ for (iFFDBox = 0; iFFDBox < GetnFFDBox(); iFFDBox++) {
+ FFDBox[iFFDBox]->SetParaview(geometry, iFFDBox, true);
+ }
+ } else if (FileFormat[iFile] == TECPLOT) {
+ cout << "Writing a Tecplot file of the FFD boxes." << endl;
+ for (iFFDBox = 0; iFFDBox < GetnFFDBox(); iFFDBox++) {
+ FFDBox[iFFDBox]->SetTecplot(geometry, iFFDBox, true);
+ }
+ }
+ else if (FileFormat[iFile] == CGNS) {
+ cout << "Writing a CGNS file of the FFD boxes." << endl;
+ for (iFFDBox = 0; iFFDBox < GetnFFDBox(); iFFDBox++) {
+ FFDBox[iFFDBox]->SetCGNS(geometry, iFFDBox, true);
+ }
+ }
}
- }
-
+ }
}
-
}
else {
@@ -2790,23 +2795,27 @@ void CSurfaceMovement::SetSurface_Deformation(CGeometry *geometry, CConfig *conf
/*--- Output original FFD FFDBox ---*/
- if ((rank == MASTER_NODE) && (config->GetKind_SU2() != SU2_DOT)) {
- if ((config->GetOutput_FileFormat() == PARAVIEW) || (config->GetOutput_FileFormat() == PARAVIEW_BINARY)) {
- cout << "Writing a Paraview file of the FFD boxes." << endl;
- for (iFFDBox = 0; iFFDBox < GetnFFDBox(); iFFDBox++) {
- FFDBox[iFFDBox]->SetParaview(geometry, iFFDBox, true);
- }
- }
- else if (config->GetOutput_FileFormat() == TECPLOT) {
- cout << "Writing a Tecplot file of the FFD boxes." << endl;
- for (iFFDBox = 0; iFFDBox < GetnFFDBox(); iFFDBox++) {
- FFDBox[iFFDBox]->SetTecplot(geometry, iFFDBox, true);
+ if ((rank == MASTER_NODE) && (config->GetKind_SU2() != SU2_DOT)) {
+
+ for (unsigned short iFile = 0; iFile < config->GetnVolumeOutputFiles(); iFile++){
+ unsigned short *FileFormat = config->GetVolumeOutputFiles();
+
+ if (FileFormat[iFile] == PARAVIEW) {
+ cout << "Writing a Paraview file of the FFD boxes." << endl;
+ for (iFFDBox = 0; iFFDBox < GetnFFDBox(); iFFDBox++) {
+ FFDBox[iFFDBox]->SetParaview(geometry, iFFDBox, true);
+ }
+ } else if (FileFormat[iFile] == TECPLOT) {
+ cout << "Writing a Tecplot file of the FFD boxes." << endl;
+ for (iFFDBox = 0; iFFDBox < GetnFFDBox(); iFFDBox++) {
+ FFDBox[iFFDBox]->SetTecplot(geometry, iFFDBox, true);
+ }
}
- }
- else {
- cout << "Writing a CGNS file of the FFD boxes." << endl;
- for (iFFDBox = 0; iFFDBox < GetnFFDBox(); iFFDBox++) {
- FFDBox[iFFDBox]->SetCGNS(geometry, iFFDBox, true);
+ else if (FileFormat[iFile] == CGNS) {
+ cout << "Writing a CGNS file of the FFD boxes." << endl;
+ for (iFFDBox = 0; iFFDBox < GetnFFDBox(); iFFDBox++) {
+ FFDBox[iFFDBox]->SetCGNS(geometry, iFFDBox, true);
+ }
}
}
}
@@ -2966,26 +2975,29 @@ void CSurfaceMovement::SetSurface_Deformation(CGeometry *geometry, CConfig *conf
/*--- Output the deformed FFD Boxes ---*/
if ((rank == MASTER_NODE) && (config->GetKind_SU2() != SU2_DOT)) {
- if ((config->GetOutput_FileFormat() == PARAVIEW) || (config->GetOutput_FileFormat() == PARAVIEW_BINARY)) {
- cout << "Writing a Paraview file of the FFD boxes." << endl;
- for (iFFDBox = 0; iFFDBox < GetnFFDBox(); iFFDBox++) {
- FFDBox[iFFDBox]->SetParaview(geometry, iFFDBox, false);
- }
- }
- else if (config->GetOutput_FileFormat() == TECPLOT) {
- cout << "Writing a Tecplot file of the FFD boxes." << endl;
- for (iFFDBox = 0; iFFDBox < GetnFFDBox(); iFFDBox++) {
- FFDBox[iFFDBox]->SetTecplot(geometry, iFFDBox, false);
+
+ for (unsigned short iFile = 0; iFile < config->GetnVolumeOutputFiles(); iFile++){
+ unsigned short *FileFormat = config->GetVolumeOutputFiles();
+
+ if (FileFormat[iFile] == PARAVIEW) {
+ cout << "Writing a Paraview file of the FFD boxes." << endl;
+ for (iFFDBox = 0; iFFDBox < GetnFFDBox(); iFFDBox++) {
+ FFDBox[iFFDBox]->SetParaview(geometry, iFFDBox, false);
+ }
+ } else if (FileFormat[iFile] == TECPLOT) {
+ cout << "Writing a Tecplot file of the FFD boxes." << endl;
+ for (iFFDBox = 0; iFFDBox < GetnFFDBox(); iFFDBox++) {
+ FFDBox[iFFDBox]->SetTecplot(geometry, iFFDBox, false);
+ }
}
- }
- else {
- cout << "Writing a CGNS file of the FFD boxes." << endl;
- for (iFFDBox = 0; iFFDBox < GetnFFDBox(); iFFDBox++) {
- FFDBox[iFFDBox]->SetCGNS(geometry, iFFDBox, false);
+ else if (FileFormat[iFile] == CGNS) {
+ cout << "Writing a CGNS file of the FFD boxes." << endl;
+ for (iFFDBox = 0; iFFDBox < GetnFFDBox(); iFFDBox++) {
+ FFDBox[iFFDBox]->SetCGNS(geometry, iFFDBox, false);
+ }
}
}
}
-
}
}
@@ -6263,7 +6275,7 @@ void CSurfaceMovement::Surface_Rotating(CGeometry *geometry, CConfig *config,
}
}
-void CSurfaceMovement::AeroelasticDeform(CGeometry *geometry, CConfig *config, unsigned long ExtIter, unsigned short iMarker, unsigned short iMarker_Monitoring, vector& displacements) {
+void CSurfaceMovement::AeroelasticDeform(CGeometry *geometry, CConfig *config, unsigned long TimeIter, unsigned short iMarker, unsigned short iMarker_Monitoring, vector& displacements) {
/* The sign conventions of these are those of the Typical Section Wing Model, below the signs are corrected */
su2double dh = -displacements[0]; // relative plunge
@@ -6283,7 +6295,7 @@ void CSurfaceMovement::AeroelasticDeform(CGeometry *geometry, CConfig *config, u
su2double Omega, dt, psi;
dt = config->GetDelta_UnstTimeND();
Omega = (config->GetRotation_Rate(3)/config->GetOmega_Ref());
- psi = Omega*(dt*ExtIter);
+ psi = Omega*(dt*TimeIter);
/*--- Correct for the airfoil starting position (This is hardcoded in here) ---*/
if (Monitoring_Tag == "Airfoil1") {
@@ -6370,7 +6382,7 @@ void CSurfaceMovement::SetBoundary_Flutter3D(CGeometry *geometry, CConfig *confi
/*--- For the unsteady adjoint, we integrate backwards through
physical time, so perform mesh motion in reverse. ---*/
- unsigned long nFlowIter = config->GetnExtIter();
+ unsigned long nFlowIter = config->GetnTime_Iter();
unsigned long directIter = nFlowIter - iter - 1;
time_new = static_cast(directIter)*deltaT;
time_old = time_new;
@@ -6442,7 +6454,7 @@ void CSurfaceMovement::SetExternal_Deformation(CGeometry *geometry, CConfig *con
char buffer[50];
string DV_Filename, UnstExt, text_line;
ifstream surface_positions;
- bool unsteady = config->GetUnsteady_Simulation();
+ bool unsteady = config->GetTime_Marching();
bool adjoint = (config->GetContinuous_Adjoint() || config->GetDiscrete_Adjoint());
/*--- Load stuff from config ---*/
@@ -6456,7 +6468,7 @@ void CSurfaceMovement::SetExternal_Deformation(CGeometry *geometry, CConfig *con
if (adjoint) {
/*--- For the unsteady adjoint, we integrate backwards through
physical time, so perform mesh motion in reverse. ---*/
- unsigned long nFlowIter = config->GetnExtIter() - 1;
+ unsigned long nFlowIter = config->GetnTime_Iter() - 1;
flowIter = nFlowIter - iter;
unsigned short lastindex = DV_Filename.find_last_of(".");
DV_Filename = DV_Filename.substr(0, lastindex);
@@ -6545,7 +6557,7 @@ void CSurfaceMovement::SetExternal_Deformation(CGeometry *geometry, CConfig *con
/*--- For the unsteady adjoint, use reverse time ---*/
if (adjoint) {
/*--- Set the first adjoint mesh position to the final direct one ---*/
- if (iter == 0) dt = ((su2double)config->GetnExtIter()-1) * dt;
+ if (iter == 0) dt = ((su2double)config->GetnTime_Iter()-1) * dt;
/*--- Reverse the rotation direction for the adjoint ---*/
else dt = -1.0*dt;
} else {
@@ -7838,6 +7850,12 @@ void CSurfaceMovement::WriteFFDInfo(CSurfaceMovement** surface_movement, CGeomet
/*--- Read the name of the output file ---*/
str = config[ZONE_0]->GetMesh_Out_FileName();
+
+ unsigned short lastindex = str.find_last_of(".");
+ str = str.substr(0, lastindex);
+
+ str += ".su2";
+
strcpy (mesh_file, str.c_str());
strcpy (cstr, mesh_file);
diff --git a/Common/src/linear_algebra/CSysSolve.cpp b/Common/src/linear_algebra/CSysSolve.cpp
index 19cd6b605e65..e99f62a46cdf 100644
--- a/Common/src/linear_algebra/CSysSolve.cpp
+++ b/Common/src/linear_algebra/CSysSolve.cpp
@@ -44,6 +44,7 @@ CSysSolve::CSysSolve(const bool mesh_deform_mode) : cg_ready(false),
mesh_deform = mesh_deform_mode;
LinSysRes_ptr = NULL;
LinSysSol_ptr = NULL;
+ Residual = 0.0;
}
template
@@ -489,7 +490,7 @@ unsigned long CSysSolve::FGMRES_LinSolver(const CSysVector::BCGSTAB_LinSolver(const CSysVectorGetUnsteady_Simulation() != TIME_STEPPING) &&
- (config->GetUnsteady_Simulation() != DT_STEPPING_1ST) &&
- (config->GetUnsteady_Simulation() != DT_STEPPING_2ND))
+ if((config->GetTime_Marching() != TIME_STEPPING) &&
+ (config->GetTime_Marching() != DT_STEPPING_1ST) &&
+ (config->GetTime_Marching() != DT_STEPPING_2ND))
SU2_MPI::Error("Unsteady mode must be selected for the incompressible Taylor Green Vortex",
CURRENT_FUNCTION);
diff --git a/Common/src/toolboxes/MMS/CInviscidVortexSolution.cpp b/Common/src/toolboxes/MMS/CInviscidVortexSolution.cpp
index 6a5136d881cb..11e35e48f69e 100644
--- a/Common/src/toolboxes/MMS/CInviscidVortexSolution.cpp
+++ b/Common/src/toolboxes/MMS/CInviscidVortexSolution.cpp
@@ -71,9 +71,9 @@ CInviscidVortexSolution::CInviscidVortexSolution(unsigned short val_nDim,
gamOvGm1 = ovGm1*Gamma;
/*--- Perform some sanity and error checks for this solution here. ---*/
- if((config->GetUnsteady_Simulation() != TIME_STEPPING) &&
- (config->GetUnsteady_Simulation() != DT_STEPPING_1ST) &&
- (config->GetUnsteady_Simulation() != DT_STEPPING_2ND))
+ if((config->GetTime_Marching() != TIME_STEPPING) &&
+ (config->GetTime_Marching() != DT_STEPPING_1ST) &&
+ (config->GetTime_Marching() != DT_STEPPING_2ND))
SU2_MPI::Error("Unsteady mode must be selected for the inviscid vortex",
CURRENT_FUNCTION);
diff --git a/Common/src/toolboxes/MMS/CMMSIncEulerSolution.cpp b/Common/src/toolboxes/MMS/CMMSIncEulerSolution.cpp
index 19df6207057e..b7d1fb4b465f 100644
--- a/Common/src/toolboxes/MMS/CMMSIncEulerSolution.cpp
+++ b/Common/src/toolboxes/MMS/CMMSIncEulerSolution.cpp
@@ -71,7 +71,7 @@ CMMSIncEulerSolution::CMMSIncEulerSolution(unsigned short val_nDim,
epsilon = 0.001;
/*--- Perform some sanity and error checks for this solution here. ---*/
- if(config->GetUnsteady_Simulation() != STEADY)
+ if(config->GetTime_Marching() != STEADY)
SU2_MPI::Error("Steady mode must be selected for the MMS incompressible Euler case",
CURRENT_FUNCTION);
diff --git a/Common/src/toolboxes/MMS/CMMSIncNSSolution.cpp b/Common/src/toolboxes/MMS/CMMSIncNSSolution.cpp
index 762208dfb546..c60ea393e693 100644
--- a/Common/src/toolboxes/MMS/CMMSIncNSSolution.cpp
+++ b/Common/src/toolboxes/MMS/CMMSIncNSSolution.cpp
@@ -72,7 +72,7 @@ CMMSIncNSSolution::CMMSIncNSSolution(unsigned short val_nDim,
epsilon = 0.001;
/*--- Perform some sanity and error checks for this solution here. ---*/
- if(config->GetUnsteady_Simulation() != STEADY)
+ if(config->GetTime_Marching() != STEADY)
SU2_MPI::Error("Steady mode must be selected for the MMS incompressible NS case",
CURRENT_FUNCTION);
diff --git a/Common/src/toolboxes/MMS/CMMSNSTwoHalfCirclesSolution.cpp b/Common/src/toolboxes/MMS/CMMSNSTwoHalfCirclesSolution.cpp
index 0a691dd6ab25..cebfa3bd8bef 100644
--- a/Common/src/toolboxes/MMS/CMMSNSTwoHalfCirclesSolution.cpp
+++ b/Common/src/toolboxes/MMS/CMMSNSTwoHalfCirclesSolution.cpp
@@ -89,7 +89,7 @@ CMMSNSTwoHalfCirclesSolution::CMMSNSTwoHalfCirclesSolution(unsigned short val_nD
a_T2 = -0.85;
/*--- Perform some sanity and error checks for this solution here. ---*/
- if(config->GetUnsteady_Simulation() != STEADY)
+ if(config->GetTime_Marching() != STEADY)
SU2_MPI::Error("Steady mode must be selected for the MMS NS Two Half Circles case",
CURRENT_FUNCTION);
diff --git a/Common/src/toolboxes/MMS/CMMSNSTwoHalfSpheresSolution.cpp b/Common/src/toolboxes/MMS/CMMSNSTwoHalfSpheresSolution.cpp
index 827cfb790cbd..72be6be29833 100644
--- a/Common/src/toolboxes/MMS/CMMSNSTwoHalfSpheresSolution.cpp
+++ b/Common/src/toolboxes/MMS/CMMSNSTwoHalfSpheresSolution.cpp
@@ -94,7 +94,7 @@ CMMSNSTwoHalfSpheresSolution::CMMSNSTwoHalfSpheresSolution(unsigned short val_nD
SU2_MPI::Error("Grid must be 3D for the MMS NS Two Half Spheres case",
CURRENT_FUNCTION);
- if(config->GetUnsteady_Simulation() != STEADY)
+ if(config->GetTime_Marching() != STEADY)
SU2_MPI::Error("Steady mode must be selected for the MMS NS Two Half Spheres case",
CURRENT_FUNCTION);
diff --git a/Common/src/toolboxes/MMS/CMMSNSUnitQuadSolution.cpp b/Common/src/toolboxes/MMS/CMMSNSUnitQuadSolution.cpp
index bcc77e882b7f..b3bee18b42d6 100644
--- a/Common/src/toolboxes/MMS/CMMSNSUnitQuadSolution.cpp
+++ b/Common/src/toolboxes/MMS/CMMSNSUnitQuadSolution.cpp
@@ -98,7 +98,7 @@ CMMSNSUnitQuadSolution::CMMSNSUnitQuadSolution(unsigned short val_nDim,
v_y = 4.0;
/*--- Perform some sanity and error checks for this solution here. ---*/
- if(config->GetUnsteady_Simulation() != STEADY)
+ if(config->GetTime_Marching() != STEADY)
SU2_MPI::Error("Steady mode must be selected for the MMS NS Unit Quad case",
CURRENT_FUNCTION);
diff --git a/Common/src/toolboxes/MMS/CMMSNSUnitQuadSolutionWallBC.cpp b/Common/src/toolboxes/MMS/CMMSNSUnitQuadSolutionWallBC.cpp
index 5f5a517bb631..dc94d1525626 100644
--- a/Common/src/toolboxes/MMS/CMMSNSUnitQuadSolutionWallBC.cpp
+++ b/Common/src/toolboxes/MMS/CMMSNSUnitQuadSolutionWallBC.cpp
@@ -91,7 +91,7 @@ CMMSNSUnitQuadSolutionWallBC::CMMSNSUnitQuadSolutionWallBC(unsigned short val_nD
a_T2 = -0.85;
/*--- Perform some sanity and error checks for this solution here. ---*/
- if(config->GetUnsteady_Simulation() != STEADY)
+ if(config->GetTime_Marching() != STEADY)
SU2_MPI::Error("Steady mode must be selected for the MMS NS Unit Quad case with wall BCs.",
CURRENT_FUNCTION);
diff --git a/Common/src/toolboxes/MMS/CNSUnitQuadSolution.cpp b/Common/src/toolboxes/MMS/CNSUnitQuadSolution.cpp
index 103667f6f015..2e64ad54dfd7 100644
--- a/Common/src/toolboxes/MMS/CNSUnitQuadSolution.cpp
+++ b/Common/src/toolboxes/MMS/CNSUnitQuadSolution.cpp
@@ -64,7 +64,7 @@ CNSUnitQuadSolution::CNSUnitQuadSolution(unsigned short val_nDim,
Viscosity = config->GetMu_ConstantND();
/*--- Perform some sanity and error checks for this solution here. ---*/
- if(config->GetUnsteady_Simulation() != STEADY)
+ if(config->GetTime_Marching() != STEADY)
SU2_MPI::Error("Steady mode must be selected for the NS Unit Quad case",
CURRENT_FUNCTION);
diff --git a/Common/src/toolboxes/MMS/CRinglebSolution.cpp b/Common/src/toolboxes/MMS/CRinglebSolution.cpp
index 77f53bdcabb5..e52728710b36 100644
--- a/Common/src/toolboxes/MMS/CRinglebSolution.cpp
+++ b/Common/src/toolboxes/MMS/CRinglebSolution.cpp
@@ -61,7 +61,7 @@ CRinglebSolution::CRinglebSolution(unsigned short val_nDim,
tGamOvGm1 = Gamma*tovGm1;
/*--- Perform some sanity and error checks for this solution here. ---*/
- if(config->GetUnsteady_Simulation() != STEADY)
+ if(config->GetTime_Marching() != STEADY)
SU2_MPI::Error("Steady mode must be selected for the Ringleb case",
CURRENT_FUNCTION);
diff --git a/Common/src/toolboxes/MMS/CTGVSolution.cpp b/Common/src/toolboxes/MMS/CTGVSolution.cpp
index 7ade895e3c40..bdaa7e9e089e 100644
--- a/Common/src/toolboxes/MMS/CTGVSolution.cpp
+++ b/Common/src/toolboxes/MMS/CTGVSolution.cpp
@@ -68,9 +68,9 @@ CTGVSolution::CTGVSolution(unsigned short val_nDim,
/*--- Perform some sanity and error checks for this solution here. ---*/
- if((config->GetUnsteady_Simulation() != TIME_STEPPING) &&
- (config->GetUnsteady_Simulation() != DT_STEPPING_1ST) &&
- (config->GetUnsteady_Simulation() != DT_STEPPING_2ND))
+ if((config->GetTime_Marching() != TIME_STEPPING) &&
+ (config->GetTime_Marching() != DT_STEPPING_1ST) &&
+ (config->GetTime_Marching() != DT_STEPPING_2ND))
SU2_MPI::Error("Unsteady mode must be selected for the Taylor Green Vortex",
CURRENT_FUNCTION);
diff --git a/Common/src/toolboxes/printing_toolbox.cpp b/Common/src/toolboxes/printing_toolbox.cpp
index eb5775f0e37d..69527d734359 100644
--- a/Common/src/toolboxes/printing_toolbox.cpp
+++ b/Common/src/toolboxes/printing_toolbox.cpp
@@ -12,6 +12,8 @@ PrintingToolbox::CTablePrinter::CTablePrinter(std::ostream * output, const std::
print_header_bottom_line_ = true;
print_header_top_line_ = true;
align_ = RIGHT;
+ inner_separator_ = separator;
+ precision_ = 6;
}
PrintingToolbox::CTablePrinter::~CTablePrinter(){
@@ -30,6 +32,10 @@ void PrintingToolbox::CTablePrinter::SetSeparator(const std::string &separator){
separator_ = separator;
}
+void PrintingToolbox::CTablePrinter::SetInnerSeparator(const std::string &inner_separator){
+ inner_separator_ = inner_separator;
+}
+
void PrintingToolbox::CTablePrinter::SetPrintHeaderBottomLine(bool print){
print_header_bottom_line_ = print;
}
@@ -42,6 +48,11 @@ void PrintingToolbox::CTablePrinter::SetAlign(int align){
align_ = align;
}
+void PrintingToolbox::CTablePrinter::SetPrecision(int precision){
+ precision_ = precision;
+ out_stream_->precision(precision_);
+}
+
void PrintingToolbox::CTablePrinter::AddColumn(const std::string & header_name, int column_width){
if (column_width < 4){
throw std::invalid_argument("Column size has to be >= 4");
@@ -67,7 +78,7 @@ void PrintingToolbox::CTablePrinter::PrintHeader(){
if (print_header_top_line_) PrintHorizontalLine();
- *out_stream_ << "|";
+ *out_stream_ << separator_;
int indent = 0;
for (int i=0; i &data){
+ su2double avg = 0.0;
+ for (std::vector::iterator it = data.begin(); it != data.end(); it++){
+ avg += (*it);
+ }
+ return avg/=data.size();
+}
diff --git a/QuickStart/inv_NACA0012.cfg b/QuickStart/inv_NACA0012.cfg
index 156d0c707d86..3d160fc0136f 100644
--- a/QuickStart/inv_NACA0012.cfg
+++ b/QuickStart/inv_NACA0012.cfg
@@ -21,7 +21,7 @@ MATH_PROBLEM= DIRECT
%
% Restart solution (NO, YES)
RESTART_SOL= NO
-
+SCREEN_OUTPUT=(INNER_ITER, WALL_TIME, RMS_DENSITY, LIFT, DRAG, CAUCHY_SENS_PRESS, CAUCHY_DRAG)
% ----------- COMPRESSIBLE AND INCOMPRESSIBLE FREE-STREAM DEFINITION ----------%
%
% Mach number (non-dimensional, based on the free-stream values)
@@ -98,7 +98,7 @@ OBJECTIVE_FUNCTION= DRAG
CFL_NUMBER= 4.0
%
% Number of total iterations
-EXT_ITER= 250
+ITER= 250
% ------------------------ LINEAR SOLVER DEFINITION ---------------------------%
%
@@ -240,26 +240,19 @@ VISUALIZE_VOLUME_DEF= NO
% --------------------------- CONVERGENCE PARAMETERS --------------------------%
% Convergence criteria (CAUCHY, RESIDUAL)
%
-CONV_CRITERIA= CAUCHY
-%
-% Residual reduction (order of magnitude with respect to the initial value)
-RESIDUAL_REDUCTION= 6
+CONV_FIELD= RMS_DENSITY
%
% Min value of the residual (log10 of the residual)
-RESIDUAL_MINVAL= -8
+CONV_RESIDUAL_MINVAL= -8
%
% Start Cauchy criteria at iteration number
-STARTCONV_ITER= 10
+CONV_STARTITER= 10
%
% Number of elements to apply the criteria
-CAUCHY_ELEMS= 100
+CONV_CAUCHY_ELEMS= 100
%
% Epsilon to control the series convergence
-CAUCHY_EPS= 1E-6
-%
-% Function to apply the criteria (LIFT, DRAG, SENS_GEOMETRY, SENS_MACH,
-% DELTA_LIFT, DELTA_DRAG)
-CAUCHY_FUNC_FLOW= DRAG
+CONV_CAUCHY_EPS= 1E-6
% ------------------------- INPUT/OUTPUT INFORMATION --------------------------%
% Mesh input file
@@ -272,25 +265,25 @@ MESH_FORMAT= SU2
MESH_OUT_FILENAME= mesh_out.su2
%
% Restart flow input file
-SOLUTION_FLOW_FILENAME= solution_flow.dat
+SOLUTION_FILENAME= solution_flow.dat
%
% Restart adjoint input file
SOLUTION_ADJ_FILENAME= solution_adj.dat
%
% Output file format (TECPLOT, PARAVIEW, TECPLOT_BINARY)
-OUTPUT_FORMAT= TECPLOT
+TABULAR_FORMAT= CSV
%
% Output file convergence history (w/o extension)
CONV_FILENAME= history
%
% Output file restart flow
-RESTART_FLOW_FILENAME= restart_flow.dat
+RESTART_FILENAME= restart_flow.dat
%
% Output file restart adjoint
RESTART_ADJ_FILENAME= restart_adj.dat
%
% Output file flow (w/o extension) variables
-VOLUME_FLOW_FILENAME= flow
+VOLUME_FILENAME= flow
%
% Output file adjoint (w/o extension) variables
VOLUME_ADJ_FILENAME= adjoint
@@ -299,7 +292,7 @@ VOLUME_ADJ_FILENAME= adjoint
GRAD_OBJFUNC_FILENAME= of_grad.dat
%
% Output file surface flow coefficient (w/o extension)
-SURFACE_FLOW_FILENAME= surface_flow
+SURFACE_FILENAME= surface_flow
%
% Output file surface adjoint coefficient (w/o extension)
SURFACE_ADJ_FILENAME= surface_adjoint
@@ -343,5 +336,6 @@ OPT_OBJECTIVE= DRAG * 0.001
% ex= (Objective = Value ) * Scale, use '>','<','='
OPT_CONSTRAINT= ( LIFT > 0.328188 ) * 0.001; ( MOMENT_Z > 0.034068 ) * 0.001; ( AIRFOIL_THICKNESS > 0.11 ) * 0.001
%
+
% Optimization design variables, separated by semicolons
-DEFINITION_DV= ( 1, 1.0 | airfoil | 0, 0.05 ); ( 1, 1.0 | airfoil | 0, 0.10 ); ( 1, 1.0 | airfoil | 0, 0.15 ); ( 1, 1.0 | airfoil | 0, 0.20 ); ( 1, 1.0 | airfoil | 0, 0.25 ); ( 1, 1.0 | airfoil | 0, 0.30 ); ( 1, 1.0 | airfoil | 0, 0.35 ); ( 1, 1.0 | airfoil | 0, 0.40 ); ( 1, 1.0 | airfoil | 0, 0.45 ); ( 1, 1.0 | airfoil | 0, 0.50 ); ( 1, 1.0 | airfoil | 0, 0.55 ); ( 1, 1.0 | airfoil | 0, 0.60 ); ( 1, 1.0 | airfoil | 0, 0.65 ); ( 1, 1.0 | airfoil | 0, 0.70 ); ( 1, 1.0 | airfoil | 0, 0.75 ); ( 1, 1.0 | airfoil | 0, 0.80 ); ( 1, 1.0 | airfoil | 0, 0.85 ); ( 1, 1.0 | airfoil | 0, 0.90 ); ( 1, 1.0 | airfoil | 0, 0.95 ); ( 1, 1.0 | airfoil | 1, 0.05 ); ( 1, 1.0 | airfoil | 1, 0.10 ); ( 1, 1.0 | airfoil | 1, 0.15 ); ( 1, 1.0 | airfoil | 1, 0.20 ); ( 1, 1.0 | airfoil | 1, 0.25 ); ( 1, 1.0 | airfoil | 1, 0.30 ); ( 1, 1.0 | airfoil | 1, 0.35 ); ( 1, 1.0 | airfoil | 1, 0.40 ); ( 1, 1.0 | airfoil | 1, 0.45 ); ( 1, 1.0 | airfoil | 1, 0.50 ); ( 1, 1.0 | airfoil | 1, 0.55 ); ( 1, 1.0 | airfoil | 1, 0.60 ); ( 1, 1.0 | airfoil | 1, 0.65 ); ( 1, 1.0 | airfoil | 1, 0.70 ); ( 1, 1.0 | airfoil | 1, 0.75 ); ( 1, 1.0 | airfoil | 1, 0.80 ); ( 1, 1.0 | airfoil | 1, 0.85 ); ( 1, 1.0 | airfoil | 1, 0.90 ); ( 1, 1.0 | airfoil | 1, 0.95 )
+DEFINITION_DV= ( 30, 1.0 | airfoil | 0, 0.05 ); ( 30, 1.0 | airfoil | 0, 0.10 ); ( 30, 1.0 | airfoil | 0, 0.15 ); ( 30, 1.0 | airfoil | 0, 0.20 ); ( 30, 1.0 | airfoil | 0, 0.25 ); ( 30, 1.0 | airfoil | 0, 0.30 ); ( 30, 1.0 | airfoil | 0, 0.35 ); ( 30, 1.0 | airfoil | 0, 0.40 ); ( 30, 1.0 | airfoil | 0, 0.45 ); ( 30, 1.0 | airfoil | 0, 0.50 ); ( 30, 1.0 | airfoil | 0, 0.55 ); ( 30, 1.0 | airfoil | 0, 0.60 ); ( 30, 1.0 | airfoil | 0, 0.65 ); ( 30, 1.0 | airfoil | 0, 0.70 ); ( 30, 1.0 | airfoil | 0, 0.75 ); ( 30, 1.0 | airfoil | 0, 0.80 ); ( 30, 1.0 | airfoil | 0, 0.85 ); ( 30, 1.0 | airfoil | 0, 0.90 ); ( 30, 1.0 | airfoil | 0, 0.95 ); ( 30, 1.0 | airfoil | 1, 0.05 ); ( 30, 1.0 | airfoil | 1, 0.10 ); ( 30, 1.0 | airfoil | 1, 0.15 ); ( 30, 1.0 | airfoil | 1, 0.20 ); ( 30, 1.0 | airfoil | 1, 0.25 ); ( 30, 1.0 | airfoil | 1, 0.30 ); ( 30, 1.0 | airfoil | 1, 0.35 ); ( 30, 1.0 | airfoil | 1, 0.40 ); ( 30, 1.0 | airfoil | 1, 0.45 ); ( 30, 1.0 | airfoil | 1, 0.50 ); ( 30, 1.0 | airfoil | 1, 0.55 ); ( 30, 1.0 | airfoil | 1, 0.60 ); ( 30, 1.0 | airfoil | 1, 0.65 ); ( 30, 1.0 | airfoil | 1, 0.70 ); ( 30, 1.0 | airfoil | 1, 0.75 ); ( 30, 1.0 | airfoil | 1, 0.80 ); ( 30, 1.0 | airfoil | 1, 0.85 ); ( 30, 1.0 | airfoil | 1, 0.90 ); ( 30, 1.0 | airfoil | 1, 0.95 )
diff --git a/SU2_CFD/include/SU2_CFD.hpp b/SU2_CFD/include/SU2_CFD.hpp
index 58da93d28758..5925bd6bf722 100644
--- a/SU2_CFD/include/SU2_CFD.hpp
+++ b/SU2_CFD/include/SU2_CFD.hpp
@@ -50,7 +50,7 @@
#include "drivers/CDummyDriver.hpp"
#include "solver_structure.hpp"
#include "integration_structure.hpp"
-#include "output_structure.hpp"
+#include "output/COutput.hpp"
#include "numerics_structure.hpp"
#include "../../Common/include/fem_geometry_structure.hpp"
#include "../../Common/include/geometry_structure.hpp"
diff --git a/SU2_CFD/include/definition_structure.hpp b/SU2_CFD/include/definition_structure.hpp
index 12fcb876ed00..6c96cc27674f 100644
--- a/SU2_CFD/include/definition_structure.hpp
+++ b/SU2_CFD/include/definition_structure.hpp
@@ -42,19 +42,9 @@
#include
-#include "../../Common/include/gauss_structure.hpp"
-#include "../../Common/include/element_structure.hpp"
-#include "drivers/CDriver.hpp"
-#include "iteration_structure.hpp"
-#include "solver_structure.hpp"
-#include "integration_structure.hpp"
-#include "output_structure.hpp"
-#include "numerics_structure.hpp"
-#include "../../Common/include/fem_geometry_structure.hpp"
-#include "../../Common/include/geometry_structure.hpp"
#include "../../Common/include/config_structure.hpp"
-#include "../../Common/include/interpolation_structure.hpp"
-
+#include "../../Common/include/geometry_structure.hpp"
+#include "../../Common/include/fem_geometry_structure.hpp"
using namespace std;
diff --git a/SU2_CFD/include/drivers/CDiscAdjSinglezoneDriver.hpp b/SU2_CFD/include/drivers/CDiscAdjSinglezoneDriver.hpp
index 3cb1c038952a..00071ffe5ae2 100644
--- a/SU2_CFD/include/drivers/CDiscAdjSinglezoneDriver.hpp
+++ b/SU2_CFD/include/drivers/CDiscAdjSinglezoneDriver.hpp
@@ -60,9 +60,11 @@ class CDiscAdjSinglezoneDriver : public CSinglezoneDriver {
CIntegration **integration; /*!< \brief Container vector with all the integration methods. */
CGeometry *geometry; /*!< \brief Geometrical definition of the problem. */
CSolver **solver; /*!< \brief Container vector with all the solutions. */
+ COutput *direct_output;
CNumerics ***numerics; /*!< \brief Container vector with all the numerics. */
-
-
+
+ COutputLegacy* output_legacy;
+
public:
/*!
diff --git a/SU2_CFD/include/drivers/CDriver.hpp b/SU2_CFD/include/drivers/CDriver.hpp
index b1832879bede..e77961bbb260 100644
--- a/SU2_CFD/include/drivers/CDriver.hpp
+++ b/SU2_CFD/include/drivers/CDriver.hpp
@@ -38,11 +38,11 @@
#pragma once
-#include "../../../Common/include/mpi_structure.hpp"
+#include "../../Common/include/mpi_structure.hpp"
#include "../iteration_structure.hpp"
#include "../solver_structure.hpp"
#include "../integration_structure.hpp"
-#include "../output_structure.hpp"
+
#include "../numerics_structure.hpp"
/*--- Transfer includes ---*/
#include "../interfaces/CInterface.hpp"
@@ -63,6 +63,20 @@
#include "../../../Common/include/config_structure.hpp"
#include "../../../Common/include/interpolation_structure.hpp"
+#include "../output/COutputLegacy.hpp"
+
+#include "../output/COutput.hpp"
+#include "../output/CMultizoneOutput.hpp"
+#include "../output/CElasticityOutput.hpp"
+#include "../output/CAdjElasticityOutput.hpp"
+#include "../output/CFlowCompOutput.hpp"
+#include "../output/CAdjFlowOutput.hpp"
+#include "../output/CFlowCompFEMOutput.hpp"
+#include "../output/CFlowIncOutput.hpp"
+#include "../output/CAdjFlowIncOutput.hpp"
+#include "../output/CHeatOutput.hpp"
+#include "../output/CAdjHeatOutput.hpp"
+
using namespace std;
/*!
@@ -90,7 +104,7 @@ class CDriver {
su2double MpointsDomain; /*!< \brief Total number of grid points in millions in the calculation (excluding ghost points).*/
su2double MDOFs; /*!< \brief Total number of DOFs in millions in the calculation (including ghost points).*/
su2double MDOFsDomain; /*!< \brief Total number of DOFs in millions in the calculation (excluding ghost points).*/
- unsigned long ExtIter; /*!< \brief External iteration.*/
+ unsigned long TimeIter; /*!< \brief External iteration.*/
ofstream **ConvHist_file; /*!< \brief Convergence history file.*/
ofstream FSIHist_file; /*!< \brief FSI convergence history file.*/
unsigned short iMesh, /*!< \brief Iterator on mesh levels.*/
@@ -105,13 +119,14 @@ class CDriver {
fsi, /*!< \brief FSI simulation flag.*/
fem_solver; /*!< \brief FEM fluid solver simulation flag. */
CIteration ***iteration_container; /*!< \brief Container vector with all the iteration methods. */
- COutput *output; /*!< \brief Pointer to the COutput class. */
+ COutput **output_container; /*!< \brief Pointer to the COutput class. */
CIntegration ****integration_container; /*!< \brief Container vector with all the integration methods. */
CGeometry ****geometry_container; /*!< \brief Geometrical definition of the problem. */
CSolver *****solver_container; /*!< \brief Container vector with all the solutions. */
CNumerics ******numerics_container; /*!< \brief Description of the numerical method (the way in which the equations are solved). */
CConfig **config_container; /*!< \brief Definition of the particular problem. */
CConfig *driver_config; /*!< \brief Definition of the driver configuration. */
+ COutput *driver_output; /*!< \brief Definition of the driver output. */
CSurfaceMovement **surface_movement; /*!< \brief Surface movement classes of the problem. */
CVolumetricMovement ***grid_movement; /*!< \brief Volume grid movement classes of the problem. */
CFreeFormDefBox*** FFDBox; /*!< \brief FFD FFDBoxes of the problem. */
@@ -262,6 +277,11 @@ class CDriver {
*/
void PythonInterface_Preprocessing(CConfig** config, CGeometry**** geometry, CSolver***** solver);
+ /*!
+ * \brief Preprocess the output container.
+ */
+ void Output_Preprocessing(CConfig **config, CConfig *driver_config, COutput **&output_container, COutput *&driver_output);
+
/*!
* \brief Initiate value for static mesh movement such as the gridVel for the ROTATING frame.
*/
@@ -274,35 +294,33 @@ class CDriver {
CInterface*** interface);
- void Output_Preprocessing(CConfig **config, COutput *&output);
-
/*!
* \brief A virtual member.
* \param[in] donorZone - zone in which the displacements will be predicted.
* \param[in] targetZone - zone which receives the predicted displacements.
*/
- virtual void Predict_Displacements(unsigned short donorZone, unsigned short targetZone) {};
+ virtual void Predict_Displacements(unsigned short donorZone, unsigned short targetZone) {}
/*!
* \brief A virtual member.
* \param[in] donorZone - zone in which the tractions will be predicted.
* \param[in] targetZone - zone which receives the predicted traction.
*/
- virtual void Predict_Tractions(unsigned short donorZone, unsigned short targetZone) {};
+ virtual void Predict_Tractions(unsigned short donorZone, unsigned short targetZone) {}
/*!
* \brief A virtual member.
* \param[in] donorZone - zone in which the displacements will be transferred.
* \param[in] targetZone - zone which receives the tractions transferred.
*/
- virtual void Transfer_Displacements(unsigned short donorZone, unsigned short targetZone) {};
+ virtual void Transfer_Displacements(unsigned short donorZone, unsigned short targetZone) {}
/*!
* \brief A virtual member.
* \param[in] donorZone - zone from which the tractions will be transferred.
* \param[in] targetZone - zone which receives the tractions transferred.
*/
- virtual void Transfer_Tractions(unsigned short donorZone, unsigned short targetZone) {};
+ virtual void Transfer_Tractions(unsigned short donorZone, unsigned short targetZone) {}
/*!
* \brief A virtual member.
@@ -310,7 +328,7 @@ class CDriver {
* \param[in] targetZone - destination of the information.
* \param[in] iOuterIter - Fluid-Structure Interaction subiteration.
*/
- virtual void Relaxation_Displacements(unsigned short donorZone, unsigned short targetZone, unsigned long iOuterIter) {};
+ virtual void Relaxation_Displacements(unsigned short donorZone, unsigned short targetZone, unsigned long iOuterIter) {}
/*!
* \brief A virtual member.
@@ -318,29 +336,29 @@ class CDriver {
* \param[in] targetZone - destination of the information.
* \param[in] iOuterIter - Fluid-Structure Interaction subiteration.
*/
- virtual void Relaxation_Tractions(unsigned short donorZone, unsigned short targetZone, unsigned long iOuterIter) {};
+ virtual void Relaxation_Tractions(unsigned short donorZone, unsigned short targetZone, unsigned long iOuterIter) {}
/*!
* \brief A virtual member to run a Block Gauss-Seidel iteration in multizone problems.
*/
- virtual void Run_GaussSeidel(){};
+ virtual void Run_GaussSeidel(){}
/*!
* \brief A virtual member to run a Block-Jacobi iteration in multizone problems.
*/
- virtual void Run_Jacobi(){};
+ virtual void Run_Jacobi(){}
/*!
* \brief A virtual member.
*/
- virtual void Update() {};
+ virtual void Update() {}
public:
/*!
* \brief Launch the computation for all zones and all physics.
*/
- virtual void StartSolver();
+ virtual void StartSolver() {}
/*!
* \brief Deallocation routine
@@ -355,42 +373,42 @@ class CDriver {
/*!
* \brief Perform some pre-processing before an iteration of the physics.
*/
- void PreprocessExtIter(unsigned long ExtIter);
+ virtual void Preprocess(unsigned long TimeIter){ }
/*!
* \brief Monitor the computation.
*/
- virtual bool Monitor(unsigned long ExtIter);
+ virtual bool Monitor(unsigned long TimeIter){ return false; }
/*!
* \brief Output the solution in solution file.
*/
- void Output(unsigned long ExtIter);
+ virtual void Output(unsigned long TimeIter){ }
/*!
* \brief Perform a dynamic mesh deformation, including grid velocity computation and update of the multigrid structure.
*/
- virtual void DynamicMeshUpdate(unsigned long ExtIter) { };
+ virtual void DynamicMeshUpdate(unsigned long TimeIter) { }
/*!
* \brief Perform a dynamic mesh deformation, including grid velocity computation and update of the multigrid structure.
*/
- virtual void DynamicMeshUpdate(unsigned short val_iZone, unsigned long ExtIter) { };
+ virtual void DynamicMeshUpdate(unsigned short val_iZone, unsigned long TimeIter) { }
/*!
* \brief Perform a static mesh deformation, without considering grid velocity.
*/
- virtual void StaticMeshUpdate() { };
+ virtual void StaticMeshUpdate() { }
/*!
* \brief Perform a mesh deformation as initial condition.
*/
- virtual void SetInitialMesh() { };
+ virtual void SetInitialMesh() { }
/*!
* \brief Process the boundary conditions and update the multigrid structure.
*/
- virtual void BoundaryConditionsUpdate() { };
+ virtual void BoundaryConditionsUpdate() { }
/*!
* \brief Get the total drag.
@@ -466,13 +484,13 @@ class CDriver {
* \brief Get the number of external iterations.
* \return Number of external iterations.
*/
- unsigned long GetnExtIter();
+ unsigned long GetnTimeIter();
/*!
* \brief Get the current external iteration.
* \return Current external iteration.
*/
- unsigned long GetExtIter();
+ unsigned long GetTime_Iter();
/*!
* \brief Get the unsteady time step.
@@ -852,6 +870,10 @@ class CDriver {
* \author T. Economon, G. Gori
*/
class CFluidDriver : public CDriver {
+
+protected:
+ unsigned long Max_Iter;
+
public:
/*!
@@ -869,6 +891,11 @@ class CFluidDriver : public CDriver {
* \brief Destructor of the class.
*/
~CFluidDriver(void);
+
+ /*!
+ * \brief Launch the computation for all zones and all physics.
+ */
+ void StartSolver();
/*!
* \brief Run a single iteration of the physics within multiple zones.
@@ -879,11 +906,26 @@ class CFluidDriver : public CDriver {
* \brief Update the dual-time solution within multiple zones.
*/
void Update();
+
+ /*!
+ * \brief Output the solution in solution file.
+ */
+ void Output(unsigned long InnerIter);
+
+ /*!
+ * \brief Monitor the computation.
+ */
+ bool Monitor(unsigned long ExtIter);
+
+ /*!
+ * \brief Perform some pre-processing before an iteration of the physics.
+ */
+ void Preprocess(unsigned long Iter);
/*!
* \brief Perform a dynamic mesh deformation, included grid velocity computation and the update of the multigrid structure (multiple zone).
*/
- void DynamicMeshUpdate(unsigned long ExtIter);
+ void DynamicMeshUpdate(unsigned long TimeIter);
/*!
* \brief Perform a static mesh deformation, without considering grid velocity (multiple zone).
@@ -948,6 +990,9 @@ class CFluidDriver : public CDriver {
* \author S. Vitale
*/
class CTurbomachineryDriver : public CFluidDriver {
+private:
+ COutputLegacy* output_legacy;
+
public:
/*!
@@ -986,7 +1031,7 @@ class CTurbomachineryDriver : public CFluidDriver {
/*!
* \brief Monitor the computation.
*/
- bool Monitor(unsigned long ExtIter);
+ bool Monitor(unsigned long TimeIter);
@@ -997,10 +1042,10 @@ class CTurbomachineryDriver : public CFluidDriver {
* \brief Class for driving an iteration of Harmonic Balance (HB) method problem using multiple time zones.
* \author T. Economon
*/
-class CHBDriver : public CDriver {
+class CHBDriver : public CFluidDriver {
private:
-
+ COutputLegacy* output_legacy;
unsigned short nInstHB;
su2double **D; /*!< \brief Harmonic Balance operator. */
@@ -1057,112 +1102,6 @@ class CHBDriver : public CDriver {
void ResetConvergence();
};
-
-/*!
- * \class CFSIDriver
- * \brief Class for driving a BGS iteration for a fluid-structure interaction problem in multiple zones.
- * \author R. Sanchez.
- */
-class CFSIDriver : public CDriver {
-
- su2double *init_res_flow, /*!< \brief Stores the initial residual for the flow. */
- *init_res_struct, /*!< \brief Stores the initial residual for the structure. */
- *residual_flow, /*!< \brief Stores the current residual for the flow. */
- *residual_struct, /*!< \brief Stores the current residual for the structure. */
- *residual_flow_rel,
- *residual_struct_rel;
-
- su2double flow_criteria,
- flow_criteria_rel,
- structure_criteria,
- structure_criteria_rel;
-
-public:
-
- /*!
- * \brief Constructor of the class.
- * \param[in] confFile - Configuration file name.
- * \param[in] val_nZone - Total number of zones.
- * \param[in] MPICommunicator - MPI communicator for SU2.
- */
- CFSIDriver(char* confFile,
- unsigned short val_nZone,
- SU2_Comm MPICommunicator);
-
- /*!
- * \brief Destructor of the class.
- */
- ~CFSIDriver(void);
-
- /*!
- * \brief Run a Block Gauss-Seidel iteration of the FSI problem.
- */
- void Run();
-
- /*!
- * \brief Predict the structural displacements to pass them into the fluid solver on a BGS implementation.
- * \param[in] donorZone - zone in which the displacements will be predicted.
- * \param[in] targetZone - zone which receives the predicted displacements.
- */
- void Predict_Displacements(unsigned short donorZone, unsigned short targetZone);
-
- /*!
- * \brief Predict the fluid tractions to pass them into the structural solver on a BGS implementation.
- * \param[in] donorZone - zone in which the tractions will be predicted.
- * \param[in] targetZone - zone which receives the predicted traction.
- */
- void Predict_Tractions(unsigned short donorZone, unsigned short targetZone);
-
- /*!
- * \brief Transfer the displacements computed on the structural solver into the fluid solver.
- * \param[in] donorZone - zone in which the displacements will be transferred.
- * \param[in] targetZone - zone which receives the tractions transferred.
- */
- void Transfer_Displacements(unsigned short donorZone, unsigned short targetZone);
-
- /*!
- * \brief Transfer the tractions computed on the fluid solver into the structural solver.
- * \param[in] donorZone - zone from which the tractions will be transferred.
- * \param[in] targetZone - zone which receives the tractions transferred.
- */
- void Transfer_Tractions(unsigned short donorZone, unsigned short targetZone);
-
- /*!
- * \brief Apply a relaxation method into the computed displacements.
- * \param[in] donorZone - origin of the information.
- * \param[in] targetZone - destination of the information.
- * \param[in] iOuterIter - Fluid-Structure Interaction subiteration.
- */
- void Relaxation_Displacements(unsigned short donorZone, unsigned short targetZone, unsigned long iOuterIter);
-
- /*!
- * \brief Apply a relaxation method into the computed tractions.
- * \param[in] donorZone - origin of the information.
- * \param[in] targetZone - destination of the information.
- * \param[in] iOuterIter - Fluid-Structure Interaction subiteration.
- */
- void Relaxation_Tractions(unsigned short donorZone, unsigned short targetZone, unsigned long iOuterIter);
-
- /*!
- * \brief Check the convergence of BGS subiteration process
- * \param[in] ZONE_FLOW - zone of the fluid solver.
- * \param[in] ZONE_STRUCT - zone of the structural solver.
- * \param[in] kind_recording - kind of recording (flow, structure, mesh, cross terms)
- */
- bool BGSConvergence(unsigned long IntIter, unsigned short ZONE_FLOW, unsigned short ZONE_STRUCT);
-
- /*!
- * \brief Enforce the coupling condition at the end of the time step
- */
- void Update(void);
-
- /*!
- * \brief Overload, does nothing but avoids dynamic mesh updates in FSI problems before the iteration
- */
- void DynamicMeshUpdate(unsigned long ExtIter);
-
-};
-
/*!
* \class CDiscAdjFSIDriver
* \brief Overload: Class for driving a discrete adjoint FSI iteration.
@@ -1170,7 +1109,8 @@ class CFSIDriver : public CDriver {
* \version 6.2.0 "Falcon"
*/
class CDiscAdjFSIDriver : public CDriver {
-
+
+ COutputLegacy* output_legacy;
CIteration** direct_iteration;
unsigned short RecordingState;
unsigned short CurrentRecording; /*!< \brief Stores the current status of the recording. */
@@ -1411,7 +1351,7 @@ class CDiscAdjFSIDriver : public CDriver {
/*!
* \brief Overload, does nothing but avoids dynamic mesh updates in adjoint FSI problems before the iteration
*/
- void DynamicMeshUpdate(unsigned long ExtIter);
+ void DynamicMeshUpdate(unsigned long TimeIter);
/*!
* \brief Transfer the displacements computed on the structural solver into the fluid solver.
diff --git a/SU2_CFD/include/drivers/CMultizoneDriver.hpp b/SU2_CFD/include/drivers/CMultizoneDriver.hpp
index 02a8eb364ad6..5be1d0e9601f 100644
--- a/SU2_CFD/include/drivers/CMultizoneDriver.hpp
+++ b/SU2_CFD/include/drivers/CMultizoneDriver.hpp
@@ -126,17 +126,19 @@ class CMultizoneDriver : public CDriver {
/*!
* \brief Perform a dynamic mesh deformation, included grid velocity computation and the update of the multigrid structure (multiple zone).
*/
- void DynamicMeshUpdate(unsigned long ExtIter);
+ void DynamicMeshUpdate(unsigned long TimeIter);
/*!
* \brief Perform a dynamic mesh deformation, including grid velocity computation and update of the multigrid structure.
*/
- void DynamicMeshUpdate(unsigned short val_iZone, unsigned long ExtIter);
+ void DynamicMeshUpdate(unsigned short val_iZone, unsigned long TimeIter);
/*!
* \brief Routine to provide all the desired physical transfers between the different zones during one iteration.
* \return Boolean that determines whether the mesh needs to be updated for this particular transfer
*/
bool Transfer_Data(unsigned short donorZone, unsigned short targetZone);
+
+ bool Monitor(unsigned long TimeIter);
-};
\ No newline at end of file
+};
diff --git a/SU2_CFD/include/drivers/CSinglezoneDriver.hpp b/SU2_CFD/include/drivers/CSinglezoneDriver.hpp
index 90d856906fb9..298b74f875ea 100644
--- a/SU2_CFD/include/drivers/CSinglezoneDriver.hpp
+++ b/SU2_CFD/include/drivers/CSinglezoneDriver.hpp
@@ -95,12 +95,22 @@ class CSinglezoneDriver : public CDriver {
/*!
* \brief Output the solution in solution file.
*/
- void Output(unsigned long ExtIter);
+ void Output(unsigned long TimeIter);
/*!
* \brief Perform a dynamic mesh deformation, included grid velocity computation and the update of the multigrid structure.
*/
- void DynamicMeshUpdate(unsigned long ExtIter);
+ void DynamicMeshUpdate(unsigned long TimeIter);
+ /*!
+ * \brief Monitor
+ * \param ExtIter
+ */
+ virtual bool Monitor(unsigned long TimeIter);
+
+ /*!
+ * \brief Runtime_Parsing
+ */
+ virtual void Runtime_Options();
};
diff --git a/SU2_CFD/include/integration_structure.hpp b/SU2_CFD/include/integration_structure.hpp
index 4e1d624cad63..a6a72ea496ac 100644
--- a/SU2_CFD/include/integration_structure.hpp
+++ b/SU2_CFD/include/integration_structure.hpp
@@ -105,10 +105,9 @@ class CIntegration {
* \param[in] solver - Description of the numerical method.
* \param[in] config - Definition of the particular problem.
* \param[in] RunTime_EqSystem - System of equations which is going to be solved.
- * \param[in] Iteration - Current iteration.
*/
void Space_Integration_FEM(CGeometry *geometry, CSolver **solver_container, CNumerics **numerics, CConfig *config,
- unsigned short RunTime_EqSystem, unsigned long Iteration);
+ unsigned short RunTime_EqSystem);
/*!
* \brief Do the time integration (explicit or implicit) of the numerical system.
@@ -117,10 +116,9 @@ class CIntegration {
* \param[in] config - Definition of the particular problem.
* \param[in] iRKStep - Current step of the Runge-Kutta iteration.
* \param[in] RunTime_EqSystem - System of equations which is going to be solved.
- * \param[in] Iteration - Current iteration.
*/
void Time_Integration(CGeometry *geometry, CSolver **solver_container, CConfig *config,
- unsigned short iRKStep, unsigned short RunTime_EqSystem, unsigned long Iteration);
+ unsigned short iRKStep, unsigned short RunTime_EqSystem);
/*!
* \brief Do the time integration (explicit or implicit) of the numerical system on a FEM framework.
@@ -132,7 +130,7 @@ class CIntegration {
* \param[in] Iteration - Current iteration.
*/
void Time_Integration_FEM(CGeometry *geometry, CSolver **solver_container, CNumerics **numerics, CConfig *config,
- unsigned short RunTime_EqSystem, unsigned long Iteration);
+ unsigned short RunTime_EqSystem);
/*!
* \brief Initialize the adjoint solution using the primal problem.
@@ -145,16 +143,6 @@ class CIntegration {
void Adjoint_Setup(CGeometry ****geometry, CSolver *****solver_container, CConfig **config,
unsigned short RunTime_EqSystem, unsigned long Iteration, unsigned short iZone);
- /*!
- * \brief Do the convergence analysis to determine if the code must stop the execution.
- * \param[in] geometry - Geometrical definition of the problem.
- * \param[in] config - Definition of the particular problem.
- * \param[in] Iteration - Current iteration.
- * \param[in] monitor - Objective function that is use to study its convergence.
- */
- void Convergence_Monitoring(CGeometry *geometry, CConfig *config,
- unsigned long Iteration, su2double monitor, unsigned short iMesh);
-
/*!
* \brief Average the scalar output in case there is a unsteady solution.
* \param[in] geometry - Geometrical definition of the problem.
@@ -166,37 +154,6 @@ class CIntegration {
void Average_Monitoring(CGeometry *geometry, CConfig *config,
unsigned long Iteration, su2double monitor, unsigned short iMesh);
- /*!
- * \brief Do the convergence analysis to determine if the structural FEM analysis has converged.
- * \param[in] geometry - Geometrical definition of the problem.
- * \param[in] config - Definition of the particular problem.
- * \param[in] solver - Solution of the problem
- * \param[in] Iteration - Current iteration.
- * \param[in] monitor - Objective function that is use to study its convergence.
- */
- void Convergence_Monitoring_FEM(CGeometry *geometry, CConfig *config, CSolver *solver, unsigned long iOuterIter);
-
- /*!
- * \brief Do the convergence analysis to determine if the adjoint FEM analysis has converged.
- * \param[in] geometry - Geometrical definition of the problem.
- * \param[in] config - Definition of the particular problem.
- * \param[in] solver - Solution of the problem
- * \param[in] Iteration - Current iteration.
- * \param[in] monitor - Objective function that is use to study its convergence.
- */
- void Convergence_Monitoring_FEM_Adj(CGeometry *geometry, CConfig *config, CSolver *solver, unsigned long iOuterIter);
-
-
- /*!
- * \brief Do the convergence analysis to determine if the FSI problem has converged on the structural side.
- * \param[in] geometry - Geometrical definition of the problem.
- * \param[in] config - Definition of the particular problem.
- * \param[in] Iteration - Current iteration.
- * \param[in] monitor - Objective function that is use to study its convergence.
- */
- void Convergence_Monitoring_FSI(CGeometry *fea_geometry, CConfig *fea_config, CSolver *fea_solver, unsigned long iOuterIter);
-
-
/*!
* \brief Get the value of the convergence.
* \return Level of convergence of the solution.
@@ -271,10 +228,9 @@ class CIntegration {
* \param[in] numerics_container - Description of the numerical method (the way in which the equations are solved).
* \param[in] config - Definition of the particular problem.
* \param[in] RunTime_EqSystem - System of equations which is going to be solved.
- * \param[in] Iteration - Current iteration.
*/
virtual void MultiGrid_Iteration(CGeometry ****geometry, CSolver *****solver_container, CNumerics ******numerics_container,
- CConfig **config, unsigned short RunTime_EqSystem, unsigned long Iteration, unsigned short iZone, unsigned short iInst);
+ CConfig **config, unsigned short RunTime_EqSystem, unsigned short iZone, unsigned short iInst);
/*!
* \brief A virtual member.
@@ -285,11 +241,10 @@ class CIntegration {
* \param[in] iMesh - Index of the mesh in multigrid computations.
* \param[in] mu - Variable for controlling the kind of multigrid algorithm.
* \param[in] RunTime_EqSystem - System of equations which is going to be solved.
- * \param[in] Iteration - Current iteration.
*/
virtual void MultiGrid_Cycle(CGeometry ****geometry, CSolver *****solver_container, CNumerics ******numerics_container,
CConfig **config, unsigned short iMesh, unsigned short mu, unsigned short RunTime_EqSystem,
- unsigned long Iteration, unsigned short iZone, unsigned short iInst);
+ unsigned short iZone, unsigned short iInst);
/*!
* \brief A virtual member.
@@ -297,11 +252,10 @@ class CIntegration {
* \param[in] solver_container - Container vector with all the solutions.
* \param[in] config - Definition of the particular problem.
* \param[in] RunTime_EqSystem - System of equations which is going to be solved.
- * \param[in] Iteration - Current iteration.
* \param[in] monitor - value of the non-dimensional parameters for monitoring the convergence.
*/
virtual void NonDimensional_Parameters(CGeometry **geometry, CSolver ***solver_container, CNumerics ****numerics_container,
- CConfig *config, unsigned short FinestMesh, unsigned short RunTime_EqSystem, unsigned long Iteration,
+ CConfig *config, unsigned short FinestMesh, unsigned short RunTime_EqSystem,
su2double *monitor);
/*!
@@ -398,10 +352,9 @@ class CIntegration {
* \param[in] numerics_container - Description of the numerical method (the way in which the equations are solved).
* \param[in] config - Definition of the particular problem.
* \param[in] RunTime_EqSystem - System of equations which is going to be solved.
- * \param[in] Iteration - Current iteration.
*/
virtual void SingleGrid_Iteration(CGeometry ****geometry, CSolver *****solver_container, CNumerics ******numerics_container,
- CConfig **config, unsigned short RunTime_EqSystem, unsigned long Iteration, unsigned short iZone, unsigned short iInst);
+ CConfig **config, unsigned short RunTime_EqSystem, unsigned short iZone, unsigned short iInst);
/*!
@@ -411,10 +364,9 @@ class CIntegration {
* \param[in] numerics_container - Description of the numerical method (the way in which the equations are solved).
* \param[in] config - Definition of the particular problem.
* \param[in] RunTime_EqSystem - System of equations which is going to be solved.
- * \param[in] Iteration - Current iteration.
*/
virtual void Structural_Iteration(CGeometry ****geometry, CSolver *****solver_container, CNumerics ******numerics_container,
- CConfig **config, unsigned short RunTime_EqSystem, unsigned long Iteration, unsigned short iZone, unsigned short iInst);
+ CConfig **config, unsigned short RunTime_EqSystem, unsigned short iZone, unsigned short iInst);
/*!
@@ -474,7 +426,7 @@ class CMultiGridIntegration : public CIntegration {
* \param[in] Iteration - Current iteration.
*/
void MultiGrid_Iteration(CGeometry ****geometry, CSolver *****solver_container, CNumerics ******numerics_container,
- CConfig **config, unsigned short RunTime_EqSystem, unsigned long Iteration, unsigned short iZone, unsigned short iInst);
+ CConfig **config, unsigned short RunTime_EqSystem, unsigned short iZone, unsigned short iInst);
/*!
* \brief Perform a Full-Approximation Storage (FAS) Multigrid.
@@ -488,8 +440,7 @@ class CMultiGridIntegration : public CIntegration {
* \param[in] Iteration - Current iteration.
*/
void MultiGrid_Cycle(CGeometry ****geometry, CSolver *****solver_container, CNumerics ******numerics_container,
- CConfig **config, unsigned short iMesh, unsigned short mu, unsigned short RunTime_EqSystem,
- unsigned long Iteration, unsigned short iZone, unsigned short iInst);
+ CConfig **config, unsigned short iMesh, unsigned short mu, unsigned short RunTime_EqSystem, unsigned short iZone, unsigned short iInst);
/*!
* \brief Compute the non-dimensional parameters.
@@ -501,7 +452,7 @@ class CMultiGridIntegration : public CIntegration {
* \param[in] monitor - value of the non-dimensional parameters for monitoring the convergence.
*/
void NonDimensional_Parameters(CGeometry **geometry, CSolver ***solver_container, CNumerics ****numerics_container,
- CConfig *config, unsigned short FinestMesh, unsigned short RunTime_EqSystem, unsigned long Iteration,
+ CConfig *config, unsigned short FinestMesh, unsigned short RunTime_EqSystem,
su2double *monitor);
/*!
@@ -640,10 +591,9 @@ class CSingleGridIntegration : public CIntegration {
* \param[in] numerics_container - Description of the numerical method (the way in which the equations are solved).
* \param[in] config - Definition of the particular problem.
* \param[in] RunTime_EqSystem - System of equations which is going to be solved.
- * \param[in] Iteration - Current iteration.
*/
void SingleGrid_Iteration(CGeometry ****geometry, CSolver *****solver_container, CNumerics ******numerics_container,
- CConfig **config, unsigned short RunTime_EqSystem, unsigned long Iteration, unsigned short iZone, unsigned short iInst);
+ CConfig **config, unsigned short RunTime_EqSystem, unsigned short iZone, unsigned short iInst);
/*!
* \brief Restrict solution from fine grid to a coarse grid.
@@ -700,10 +650,9 @@ class CStructuralIntegration : public CIntegration {
* \param[in] numerics_container - Description of the numerical method (the way in which the equations are solved).
* \param[in] config - Definition of the particular problem.
* \param[in] RunTime_EqSystem - System of equations which is going to be solved.
- * \param[in] Iteration - Current iteration.
*/
void Structural_Iteration(CGeometry ****geometry, CSolver *****solver_container, CNumerics ******numerics_container,
- CConfig **config, unsigned short RunTime_EqSystem, unsigned long Iteration, unsigned short iZone, unsigned short iInst);
+ CConfig **config, unsigned short RunTime_EqSystem, unsigned short iZone, unsigned short iInst);
};
@@ -734,10 +683,9 @@ class CFEM_DG_Integration : public CIntegration {
* \param[in] numerics_container - Description of the numerical method (the way in which the equations are solved).
* \param[in] config - Definition of the particular problem.
* \param[in] RunTime_EqSystem - System of equations which is going to be solved.
- * \param[in] Iteration - Current iteration.
*/
void SingleGrid_Iteration(CGeometry ****geometry, CSolver *****solver_container, CNumerics ******numerics_container,
- CConfig **config, unsigned short RunTime_EqSystem, unsigned long Iteration, unsigned short iZone, unsigned short iInst);
+ CConfig **config, unsigned short RunTime_EqSystem, unsigned short iZone, unsigned short iInst);
/*!
* \brief Perform the spatial integration of the numerical system.
* \param[in] geometry - Geometrical definition of the problem.
@@ -763,7 +711,7 @@ class CFEM_DG_Integration : public CIntegration {
* \param[in] Iteration - Current iteration.
*/
void Time_Integration(CGeometry *geometry, CSolver **solver_container, CConfig *config,
- unsigned short iStep, unsigned short RunTime_EqSystem, unsigned long Iteration);
+ unsigned short iStep, unsigned short RunTime_EqSystem);
};
#include "integration_structure.inl"
diff --git a/SU2_CFD/include/integration_structure.inl b/SU2_CFD/include/integration_structure.inl
index 91b7f6bfbf86..c2ef06be85ef 100644
--- a/SU2_CFD/include/integration_structure.inl
+++ b/SU2_CFD/include/integration_structure.inl
@@ -50,14 +50,14 @@ inline void CIntegration::SetConvergence(bool value) { Convergence = value; }
inline void CIntegration::SetConvergence_FSI(bool valueFSI) { Convergence_FSI = valueFSI; }
inline void CIntegration::MultiGrid_Iteration(CGeometry ****geometry, CSolver *****solver_container, CNumerics ******numerics_container,
- CConfig **config, unsigned short RunTime_EqSystem, unsigned long Iteration, unsigned short iZone, unsigned short iInst) { }
+ CConfig **config, unsigned short RunTime_EqSystem, unsigned short iZone, unsigned short iInst) { }
inline void CIntegration::MultiGrid_Cycle(CGeometry ****geometry, CSolver *****solver_container, CNumerics ******numerics_container,
CConfig **config, unsigned short iMesh, unsigned short mu, unsigned short RunTime_EqSystem,
- unsigned long Iteration, unsigned short iZone, unsigned short iInst) { }
+ unsigned short iZone, unsigned short iInst) { }
inline void CIntegration::NonDimensional_Parameters(CGeometry **geometry, CSolver ***solver_container, CNumerics ****numerics_container,
- CConfig *config, unsigned short FinestMesh, unsigned short RunTime_EqSystem, unsigned long Iteration,
+ CConfig *config, unsigned short FinestMesh, unsigned short RunTime_EqSystem,
su2double *monitor) { }
inline void CIntegration::SetProlongated_Correction(CSolver *sol_fine, CGeometry *geo_fine, CConfig *config, unsigned short iMesh) { }
@@ -81,10 +81,10 @@ inline void CIntegration::SetForcing_Term(CSolver *sol_fine, CSolver *sol_coarse
CConfig *config, unsigned short iMesh) { }
inline void CIntegration::SingleGrid_Iteration(CGeometry ****geometry, CSolver *****solver_container, CNumerics ******numerics_container,
- CConfig **config, unsigned short RunTime_EqSystem, unsigned long Iteration, unsigned short iZone, unsigned short iInst) { }
+ CConfig **config, unsigned short RunTime_EqSystem, unsigned short iZone, unsigned short iInst) { }
inline void CIntegration::Structural_Iteration(CGeometry ****geometry, CSolver *****solver_container, CNumerics ******numerics_container,
- CConfig **config, unsigned short RunTime_EqSystem, unsigned long Iteration, unsigned short iZone, unsigned short iInst) { }
+ CConfig **config, unsigned short RunTime_EqSystem, unsigned short iZone, unsigned short iInst) { }
inline void CIntegration::SetPotential_Solver(CGeometry ****geometry, CSolver *****solver_container, CNumerics ******numerics_container,
diff --git a/SU2_CFD/include/iteration_structure.hpp b/SU2_CFD/include/iteration_structure.hpp
index 6d8f7a76a46f..cbf3f0177c7f 100644
--- a/SU2_CFD/include/iteration_structure.hpp
+++ b/SU2_CFD/include/iteration_structure.hpp
@@ -44,7 +44,7 @@
#include "solver_structure.hpp"
#include "integration_structure.hpp"
-#include "output_structure.hpp"
+#include "output/COutput.hpp"
#include "numerics_structure.hpp"
#include "../../Common/include/geometry_structure.hpp"
#include "../../Common/include/grid_movement_structure.hpp"
@@ -98,7 +98,7 @@ class CIteration {
*/
virtual void SetGrid_Movement(CGeometry **geometry, CSurfaceMovement *surface_movement,
CVolumetricMovement *grid_movement,
- CSolver ***solver, CConfig *config, unsigned long IntIter, unsigned long ExtIter);
+ CSolver ***solver, CConfig *config, unsigned long IntIter, unsigned long TimeIter);
/*!
* \brief Run the mesh deformation algorithms.
* \author R. Sanchez
@@ -274,7 +274,7 @@ class CIteration {
CGeometry ****geometry,
CSolver *****solver,
CConfig **config,
- unsigned long ExtIter,
+ unsigned long InnerIter,
bool StopCalc,
unsigned short val_iZone,
unsigned short val_iInst);
@@ -384,7 +384,7 @@ class CFluidIteration : public CIteration {
* \brief Preprocessing to prepare for an iteration of the physics.
* \param[in] ??? - Description here.
*/
- void Preprocess(COutput *output,
+virtual void Preprocess(COutput *output,
CIntegration ****integration,
CGeometry ****geometry,
CSolver *****solver,
@@ -408,7 +408,7 @@ class CFluidIteration : public CIteration {
* \param[in] grid_movement - Volume grid movement classes of the problem.
* \param[in] FFDBox - FFD FFDBoxes of the problem.
*/
- void Iterate(COutput *output,
+virtual void Iterate(COutput *output,
CIntegration ****integration,
CGeometry ****geometry,
CSolver *****solver,
@@ -432,7 +432,7 @@ class CFluidIteration : public CIteration {
* \param[in] grid_movement - Volume grid movement classes of the problem.
* \param[in] FFDBox - FFD FFDBoxes of the problem.
*/
- void Solve(COutput *output,
+ virtual void Solve(COutput *output,
CIntegration ****integration,
CGeometry ****geometry,
CSolver *****solver,
@@ -448,7 +448,7 @@ class CFluidIteration : public CIteration {
* \brief Updates the containers for the fluid system.
* \param[in] ??? - Description here.
*/
- void Update(COutput *output,
+virtual void Update(COutput *output,
CIntegration ****integration,
CGeometry ****geometry,
CSolver *****solver,
@@ -464,7 +464,7 @@ class CFluidIteration : public CIteration {
* \brief Monitors the convergence and other metrics for the fluid system.
* \param[in] ??? - Description here.
*/
- bool Monitor(COutput *output,
+virtual bool Monitor(COutput *output,
CIntegration ****integration,
CGeometry ****geometry,
CSolver *****solver,
@@ -482,7 +482,7 @@ class CFluidIteration : public CIteration {
* \param[in] geometry - Geometrical definition of the problem.
* \param[in] config - Definition of the particular problem.
*/
- void Postprocess(COutput *output,
+ virtual void Postprocess(COutput *output,
CIntegration ****integration,
CGeometry ****geometry,
CSolver *****solver,
@@ -580,7 +580,7 @@ class CTurboIteration : public CFluidIteration {
* \author T. Economon, E. van der Weide
* \version 6.2.0 "Falcon"
*/
-class CFEMFluidIteration : public CIteration {
+class CFEMFluidIteration : public CFluidIteration {
public:
/*!
@@ -657,22 +657,6 @@ class CFEMFluidIteration : public CIteration {
unsigned short val_iZone,
unsigned short val_iInst);
- /*!
- * \brief Monitors the convergence and other metrics for the finite element flow system.
- * \param[in] ??? - Description here.
- */
- bool Monitor(COutput *output,
- CIntegration ****integration,
- CGeometry ****geometry,
- CSolver *****solver,
- CNumerics ******numerics,
- CConfig **config,
- CSurfaceMovement **surface_movement,
- CVolumetricMovement ***grid_movement,
- CFreeFormDefBox*** FFDBox,
- unsigned short val_iZone,
- unsigned short val_iInst);
-
/*!
* \brief Postprocess routine for the finite element flow system.
* \param[in] solver - Container vector with all the solutions.
@@ -1012,7 +996,7 @@ class CFEAIteration : public CIteration {
* \brief Class for driving an iteration of the adjoint fluid system.
* \author T. Economon
*/
-class CAdjFluidIteration : public CIteration {
+class CAdjFluidIteration : public CFluidIteration {
public:
/*!
@@ -1082,38 +1066,6 @@ class CAdjFluidIteration : public CIteration {
unsigned short val_iZone,
unsigned short val_iInst);
- /*!
- * \brief Monitors the convergence and other metrics for the adjoint fluid system.
- */
- bool Monitor(COutput *output,
- CIntegration ****integration,
- CGeometry ****geometry,
- CSolver *****solver,
- CNumerics ******numerics,
- CConfig **config,
- CSurfaceMovement **surface_movement,
- CVolumetricMovement ***grid_movement,
- CFreeFormDefBox*** FFDBox,
- unsigned short val_iZone,
- unsigned short val_iInst);
-
- /*!
- * \brief Postprocess ???.
- * \param[in] solver - Container vector with all the solutions.
- * \param[in] geometry - Geometrical definition of the problem.
- * \param[in] config - Definition of the particular problem.
- */
- void Postprocess(COutput *output,
- CIntegration ****integration,
- CGeometry ****geometry,
- CSolver *****solver,
- CNumerics ******numerics,
- CConfig **config,
- CSurfaceMovement **surface_movement,
- CVolumetricMovement ***grid_movement,
- CFreeFormDefBox*** FFDBox,
- unsigned short val_iZone,
- unsigned short val_iInst);
};
@@ -1816,7 +1768,7 @@ class CDiscAdjHeatIteration : public CIteration {
CGeometry ****geometry,
CSolver *****solver,
CConfig **config,
- unsigned long ExtIter,
+ unsigned long InnerIter,
bool StopCalc,
unsigned short val_iZone,
unsigned short val_iInst);
diff --git a/SU2_CFD/include/output/CAdjElasticityOutput.hpp b/SU2_CFD/include/output/CAdjElasticityOutput.hpp
new file mode 100644
index 000000000000..c236be31cef5
--- /dev/null
+++ b/SU2_CFD/include/output/CAdjElasticityOutput.hpp
@@ -0,0 +1,90 @@
+/*!
+ * \file CAdjElasticityOutput.hpp
+ * \brief Headers of the adjoint elasticity output class.
+ * \author T. Albring, R. Sanchez
+ * \version 6.2.0 "Falcon"
+ *
+ * The current SU2 release has been coordinated by the
+ * SU2 International Developers Society
+ * with selected contributions from the open-source community.
+ *
+ * The main research teams contributing to the current release are:
+ * - Prof. Juan J. Alonso's group at Stanford University.
+ * - Prof. Piero Colonna's group at Delft University of Technology.
+ * - Prof. Nicolas R. Gauger's group at Kaiserslautern University of Technology.
+ * - Prof. Alberto Guardone's group at Polytechnic University of Milan.
+ * - Prof. Rafael Palacios' group at Imperial College London.
+ * - Prof. Vincent Terrapon's group at the University of Liege.
+ * - Prof. Edwin van der Weide's group at the University of Twente.
+ * - Lab. of New Concepts in Aeronautics at Tech. Institute of Aeronautics.
+ *
+ * Copyright 2012-2019, Francisco D. Palacios, Thomas D. Economon,
+ * Tim Albring, and the SU2 contributors.
+ *
+ * SU2 is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * SU2 is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with SU2. If not, see .
+ */
+
+#pragma once
+
+#include "COutput.hpp"
+
+/*! \class CAdjElasticityOutput
+ * \brief Output class for elasticity discrete adjoint problems.
+ * \author R. Sanchez, T. Albring.
+ * \date June 5, 2018.
+ */
+class CAdjElasticityOutput final : public COutput {
+private:
+ unsigned short nVar_FEM; //!< Number of FEM variables
+
+public:
+ /*!
+ * \brief Constructor of the class
+ * \param[in] config - Definition of the particular problem.
+ */
+ CAdjElasticityOutput(CConfig *config, unsigned short nDim);
+
+ /*!
+ * \brief Destructor of the class.
+ */
+ ~CAdjElasticityOutput(void) override;
+
+ /*!
+ * \brief Set the available history output fields
+ * \param[in] config - Definition of the particular problem.
+ */
+ void SetHistoryOutputFields(CConfig *config) override;
+
+ /*!
+ * \brief Load the history output field values
+ * \param[in] config - Definition of the particular problem.
+ */
+ void LoadHistoryData(CConfig *config, CGeometry *geometry, CSolver **solver) override;
+
+ /*!
+ * \brief Set the available volume output fields
+ * \param[in] config - Definition of the particular problem.
+ */
+ void SetVolumeOutputFields(CConfig *config) override;
+
+ /*!
+ * \brief Set the values of the volume output fields for a point.
+ * \param[in] config - Definition of the particular problem.
+ * \param[in] geometry - Geometrical definition of the problem.
+ * \param[in] solver_container - The container holding all solution data.
+ * \param[in] iPoint - Index of the point.
+ */
+ void LoadVolumeData(CConfig *config, CGeometry *geometry, CSolver **solver, unsigned long iPoint) override;
+
+};
diff --git a/SU2_CFD/include/output/CAdjFlowIncOutput.hpp b/SU2_CFD/include/output/CAdjFlowIncOutput.hpp
new file mode 100644
index 000000000000..59b7d464a334
--- /dev/null
+++ b/SU2_CFD/include/output/CAdjFlowIncOutput.hpp
@@ -0,0 +1,121 @@
+/*!
+ * \file CAdjFlowIncOutput.hpp
+ * \brief Headers of the adjoint incompressible flow output.
+ * \author T. Albring
+ * \version 6.2.0 "Falcon"
+ *
+ * The current SU2 release has been coordinated by the
+ * SU2 International Developers Society
+ * with selected contributions from the open-source community.
+ *
+ * The main research teams contributing to the current release are:
+ * - Prof. Juan J. Alonso's group at Stanford University.
+ * - Prof. Piero Colonna's group at Delft University of Technology.
+ * - Prof. Nicolas R. Gauger's group at Kaiserslautern University of Technology.
+ * - Prof. Alberto Guardone's group at Polytechnic University of Milan.
+ * - Prof. Rafael Palacios' group at Imperial College London.
+ * - Prof. Vincent Terrapon's group at the University of Liege.
+ * - Prof. Edwin van der Weide's group at the University of Twente.
+ * - Lab. of New Concepts in Aeronautics at Tech. Institute of Aeronautics.
+ *
+ * Copyright 2012-2019, Francisco D. Palacios, Thomas D. Economon,
+ * Tim Albring, and the SU2 contributors.
+ *
+ * SU2 is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * SU2 is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with SU2. If not, see .
+ */
+
+#pragma once
+
+#include "COutput.hpp"
+
+/*! \class CAdjFlowIncOutput
+ * \brief Output class for incompressible flow discrete adjoint problems.
+ * \author R. Sanchez, T. Albring.
+ * \date June 5, 2018.
+ */
+class CAdjFlowIncOutput final: public COutput {
+private:
+
+ unsigned short turb_model; /*!< \brief The kind of turbulence model*/
+ bool heat, /*!< \brief Boolean indicating whether have a heat problem*/
+ weakly_coupled_heat; /*!< \brief Boolean indicating whether have a weakly coupled heat equation*/
+
+public:
+
+
+ /*!
+ * \brief Constructor of the class
+ * \param[in] config - Definition of the particular problem.
+ */
+ CAdjFlowIncOutput(CConfig *config, unsigned short nDim);
+
+ /*!
+ * \brief Destructor of the class.
+ */
+ ~CAdjFlowIncOutput(void) override;
+
+ /*!
+ * \brief Load the history output field values
+ * \param[in] config - Definition of the particular problem.
+ */
+ void LoadHistoryData(CConfig *config, CGeometry *geometry, CSolver **solver) override;
+
+ /*!
+ * \brief Set the available history output fields
+ * \param[in] config - Definition of the particular problem.
+ */
+ void SetHistoryOutputFields(CConfig *config) override;
+
+ /*!
+ * \brief Set the available volume output fields
+ * \param[in] config - Definition of the particular problem.
+ */
+ void SetVolumeOutputFields(CConfig *config) override;
+
+ /*!
+ * \brief Set the values of the volume output fields for a point.
+ * \param[in] config - Definition of the particular problem.
+ * \param[in] geometry - Geometrical definition of the problem.
+ * \param[in] solver - The container holding all solution data.
+ * \param[in] iPoint - Index of the point.
+ */
+ void LoadVolumeData(CConfig *config, CGeometry *geometry, CSolver **solver, unsigned long iPoint) override;
+
+ /*!
+ * \brief Set the values of the volume output fields for a surface point.
+ * \param[in] config - Definition of the particular problem.
+ * \param[in] geometry - Geometrical definition of the problem.
+ * \param[in] solver - The container holding all solution data.
+ * \param[in] iPoint - Index of the point.
+ * \param[in] iMarker - Index of the surface marker.
+ * \param[in] iVertex - Index of the vertex on the marker.
+ */
+ void LoadSurfaceData(CConfig *config, CGeometry *geometry, CSolver **solver,
+ unsigned long iPoint, unsigned short iMarker, unsigned long iVertex) override;
+
+ /*!
+ * \brief Check whether the base values for relative residuals should be initialized
+ * \param[in] config - Definition of the particular problem.
+ * \return if the residuals should be initialized.
+ */
+ bool SetInit_Residuals(CConfig *config) override;
+
+ /*!
+ * \brief Check whether the averaged values should be updated
+ * \param[in] config - Definition of the particular problem.
+ * \return averages should be updated.
+ */
+ bool SetUpdate_Averages(CConfig *config) override;
+
+};
diff --git a/SU2_CFD/include/output/CAdjFlowOutput.hpp b/SU2_CFD/include/output/CAdjFlowOutput.hpp
new file mode 100644
index 000000000000..bb1a552a8625
--- /dev/null
+++ b/SU2_CFD/include/output/CAdjFlowOutput.hpp
@@ -0,0 +1,119 @@
+/*!
+ * \file CAdjFlowCompOutput.hpp
+ * \brief Headers of the adjoint compressible flow output.
+ * \author T. Albring
+ * \version 6.2.0 "Falcon"
+ *
+ * The current SU2 release has been coordinated by the
+ * SU2 International Developers Society
+ * with selected contributions from the open-source community.
+ *
+ * The main research teams contributing to the current release are:
+ * - Prof. Juan J. Alonso's group at Stanford University.
+ * - Prof. Piero Colonna's group at Delft University of Technology.
+ * - Prof. Nicolas R. Gauger's group at Kaiserslautern University of Technology.
+ * - Prof. Alberto Guardone's group at Polytechnic University of Milan.
+ * - Prof. Rafael Palacios' group at Imperial College London.
+ * - Prof. Vincent Terrapon's group at the University of Liege.
+ * - Prof. Edwin van der Weide's group at the University of Twente.
+ * - Lab. of New Concepts in Aeronautics at Tech. Institute of Aeronautics.
+ *
+ * Copyright 2012-2019, Francisco D. Palacios, Thomas D. Economon,
+ * Tim Albring, and the SU2 contributors.
+ *
+ * SU2 is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * SU2 is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with SU2. If not, see .
+ */
+
+#pragma once
+
+#include "COutput.hpp"
+
+/*! \class CAdjFlowCompOutput
+ * \brief Output class for compressible flow adjoint problems.
+ * \author R. Sanchez, T. Albring.
+ * \date June 5, 2018.
+ */
+class CAdjFlowCompOutput final: public COutput {
+private:
+
+ bool cont_adj; /*!< \brief Boolean indicating whether we run a cont. adjoint problem */
+ unsigned short turb_model; /*!< \brief The kind of turbulence model*/
+
+public:
+
+ /*!
+ * \brief Constructor of the class
+ * \param[in] config - Definition of the particular problem.
+ */
+ CAdjFlowCompOutput(CConfig *config, unsigned short nDim);
+
+ /*!
+ * \brief Destructor of the class.
+ */
+ ~CAdjFlowCompOutput(void) override;
+
+ /*!
+ * \brief Load the history output field values
+ * \param[in] config - Definition of the particular problem.
+ */
+ void LoadHistoryData(CConfig *config, CGeometry *geometry, CSolver **solver) override;
+
+ /*!
+ * \brief Set the available history output fields
+ * \param[in] config - Definition of the particular problem.
+ */
+ void SetHistoryOutputFields(CConfig *config) override;
+
+ /*!
+ * \brief Set the available volume output fields
+ * \param[in] config - Definition of the particular problem.
+ */
+ void SetVolumeOutputFields(CConfig *config) override;
+
+ /*!
+ * \brief Set the values of the volume output fields for a point.
+ * \param[in] config - Definition of the particular problem.
+ * \param[in] geometry - Geometrical definition of the problem.
+ * \param[in] solver - The container holding all solution data.
+ * \param[in] iPoint - Index of the point.
+ */
+ void LoadVolumeData(CConfig *config, CGeometry *geometry, CSolver **solver, unsigned long iPoint) override;
+
+ /*!
+ * \brief Set the values of the volume output fields for a surface point.
+ * \param[in] config - Definition of the particular problem.
+ * \param[in] geometry - Geometrical definition of the problem.
+ * \param[in] solver - The container holding all solution data.
+ * \param[in] iPoint - Index of the point.
+ * \param[in] iMarker - Index of the surface marker.
+ * \param[in] iVertex - Index of the vertex on the marker.
+ */
+ void LoadSurfaceData(CConfig *config, CGeometry *geometry, CSolver **solver,
+ unsigned long iPoint, unsigned short iMarker, unsigned long iVertex) override;
+
+ /*!
+ * \brief Check whether the base values for relative residuals should be initialized
+ * \param[in] config - Definition of the particular problem.
+ * \return if the residuals should be initialized.
+ */
+ bool SetInit_Residuals(CConfig *config) override;
+
+ /*!
+ * \brief Check whether the averaged values should be updated
+ * \param[in] config - Definition of the particular problem.
+ * \return averages should be updated.
+ */
+ bool SetUpdate_Averages(CConfig *config) override;
+
+};
diff --git a/SU2_CFD/include/output/CAdjHeatOutput.hpp b/SU2_CFD/include/output/CAdjHeatOutput.hpp
new file mode 100644
index 000000000000..032437a862cc
--- /dev/null
+++ b/SU2_CFD/include/output/CAdjHeatOutput.hpp
@@ -0,0 +1,99 @@
+/*!
+ * \file output_fea_discadj.hpp
+ * \brief Headers of the adjoint heat output.
+ * \author T. Albring
+ * \version 6.2.0 "Falcon"
+ *
+ * The current SU2 release has been coordinated by the
+ * SU2 International Developers Society
+ * with selected contributions from the open-source community.
+ *
+ * The main research teams contributing to the current release are:
+ * - Prof. Juan J. Alonso's group at Stanford University.
+ * - Prof. Piero Colonna's group at Delft University of Technology.
+ * - Prof. Nicolas R. Gauger's group at Kaiserslautern University of Technology.
+ * - Prof. Alberto Guardone's group at Polytechnic University of Milan.
+ * - Prof. Rafael Palacios' group at Imperial College London.
+ * - Prof. Vincent Terrapon's group at the University of Liege.
+ * - Prof. Edwin van der Weide's group at the University of Twente.
+ * - Lab. of New Concepts in Aeronautics at Tech. Institute of Aeronautics.
+ *
+ * Copyright 2012-2019, Francisco D. Palacios, Thomas D. Economon,
+ * Tim Albring, and the SU2 contributors.
+ *
+ * SU2 is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * SU2 is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with SU2. If not, see .
+ */
+
+#pragma once
+
+#include "COutput.hpp"
+
+/*! \class CAdjHeatOutput
+ * \brief Output class for adjoint heat output.
+ * \author R. Sanchez, T. Albring.
+ * \date June 5, 2018.
+ */
+class CAdjHeatOutput final: public COutput {
+public:
+
+ /*!
+ * \brief Constructor of the class
+ * \param[in] config - Definition of the particular problem.
+ */
+ CAdjHeatOutput(CConfig *config, unsigned short nDim);
+
+ /*!
+ * \brief Destructor of the class.
+ */
+ ~CAdjHeatOutput(void) override;
+
+ /*!
+ * \brief Load the history output field values
+ * \param[in] config - Definition of the particular problem.
+ */
+ void LoadHistoryData(CConfig *config, CGeometry *geometry, CSolver **solver) override;
+
+ /*!
+ * \brief Set the available history output fields
+ * \param[in] config - Definition of the particular problem.
+ */
+ void SetHistoryOutputFields(CConfig *config) override;
+
+ /*!
+ * \brief Set the available volume output fields
+ * \param[in] config - Definition of the particular problem.
+ */
+ void SetVolumeOutputFields(CConfig *config) override;
+
+ /*!
+ * \brief Set the values of the volume output fields for a point.
+ * \param[in] config - Definition of the particular problem.
+ * \param[in] geometry - Geometrical definition of the problem.
+ * \param[in] solver - The container holding all solution data.
+ * \param[in] iPoint - Index of the point.
+ */
+ void LoadVolumeData(CConfig *config, CGeometry *geometry, CSolver **solver, unsigned long iPoint) override;
+
+ /*!
+ * \brief Set the values of the volume output fields for a surface point.
+ * \param[in] config - Definition of the particular problem.
+ * \param[in] geometry - Geometrical definition of the problem.
+ * \param[in] solver - The container holding all solution data.
+ * \param[in] iPoint - Index of the point.
+ * \param[in] iMarker - Index of the surface marker.
+ * \param[in] iVertex - Index of the vertex on the marker.
+ */
+ void LoadSurfaceData(CConfig *config, CGeometry *geometry, CSolver **solver,
+ unsigned long iPoint, unsigned short iMarker, unsigned long iVertex) override;
+};
diff --git a/SU2_CFD/include/output/CBaselineOutput.hpp b/SU2_CFD/include/output/CBaselineOutput.hpp
new file mode 100644
index 000000000000..4bbc6fc8b8f6
--- /dev/null
+++ b/SU2_CFD/include/output/CBaselineOutput.hpp
@@ -0,0 +1,78 @@
+/*!
+ * \file CBaselineOutput.hpp
+ * \brief Headers of the baseline output.
+ * \author T. Albring
+ * \version 6.2.0 "Falcon"
+ *
+ * The current SU2 release has been coordinated by the
+ * SU2 International Developers Society
+ * with selected contributions from the open-source community.
+ *
+ * The main research teams contributing to the current release are:
+ * - Prof. Juan J. Alonso's group at Stanford University.
+ * - Prof. Piero Colonna's group at Delft University of Technology.
+ * - Prof. Nicolas R. Gauger's group at Kaiserslautern University of Technology.
+ * - Prof. Alberto Guardone's group at Polytechnic University of Milan.
+ * - Prof. Rafael Palacios' group at Imperial College London.
+ * - Prof. Vincent Terrapon's group at the University of Liege.
+ * - Prof. Edwin van der Weide's group at the University of Twente.
+ * - Lab. of New Concepts in Aeronautics at Tech. Institute of Aeronautics.
+ *
+ * Copyright 2012-2019, Francisco D. Palacios, Thomas D. Economon,
+ * Tim Albring, and the SU2 contributors.
+ *
+ * SU2 is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * SU2 is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with SU2. If not, see .
+ */
+
+#pragma once
+
+#include "COutput.hpp"
+
+/*! \class CBaselineOutput
+ * \brief Output class for baseline solver output.
+ * \author R. Sanchez, T. Albring.
+ * \date June 5, 2018.
+ */
+class CBaselineOutput : public COutput {
+
+ std::vector fields;
+public:
+
+ /*!
+ * \brief Constructor of the class
+ * \param[in] config - Definition of the particular problem.
+ */
+ CBaselineOutput(CConfig *config, unsigned short nDim, CSolver *solver);
+
+ /*!
+ * \brief Destructor of the class.
+ */
+ ~CBaselineOutput(void) override;
+
+ /*!
+ * \brief Set the available volume output fields
+ * \param[in] config - Definition of the particular problem.
+ */
+ void SetVolumeOutputFields(CConfig *config) override;
+
+ /*!
+ * \brief Set the values of the volume output fields for a point.
+ * \param[in] config - Definition of the particular problem.
+ * \param[in] geometry - Geometrical definition of the problem.
+ * \param[in] solver - The container holding all solution data.
+ * \param[in] iPoint - Index of the point.
+ */
+ void LoadVolumeData(CConfig *config, CGeometry *geometry, CSolver **solver, unsigned long iPoint) override;
+
+};
diff --git a/SU2_CFD/include/output/CElasticityOutput.hpp b/SU2_CFD/include/output/CElasticityOutput.hpp
new file mode 100644
index 000000000000..5d7d54509492
--- /dev/null
+++ b/SU2_CFD/include/output/CElasticityOutput.hpp
@@ -0,0 +1,101 @@
+/*!
+ * \file CElasticityOutput.hpp
+ * \brief Headers of the elasticity output.
+ * \author F. Palacios, T. Economon, M. Colonno
+ * \version 6.2.0 "Falcon"
+ *
+ * The current SU2 release has been coordinated by the
+ * SU2 International Developers Society
+ * with selected contributions from the open-source community.
+ *
+ * The main research teams contributing to the current release are:
+ * - Prof. Juan J. Alonso's group at Stanford University.
+ * - Prof. Piero Colonna's group at Delft University of Technology.
+ * - Prof. Nicolas R. Gauger's group at Kaiserslautern University of Technology.
+ * - Prof. Alberto Guardone's group at Polytechnic University of Milan.
+ * - Prof. Rafael Palacios' group at Imperial College London.
+ * - Prof. Vincent Terrapon's group at the University of Liege.
+ * - Prof. Edwin van der Weide's group at the University of Twente.
+ * - Lab. of New Concepts in Aeronautics at Tech. Institute of Aeronautics.
+ *
+ * Copyright 2012-2019, Francisco D. Palacios, Thomas D. Economon,
+ * Tim Albring, and the SU2 contributors.
+ *
+ * SU2 is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * SU2 is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with SU2. If not, see .
+ */
+
+#pragma once
+
+#include "COutput.hpp"
+
+/*! \class CElasticityOutput
+ * \brief Output class for FEA problems.
+ * \author R. Sanchez, T. Albring.
+ * \date May 24, 2018.
+ */
+class CElasticityOutput final: public COutput {
+protected:
+
+ unsigned short nVar_FEM; //!< Number of FEM variables
+ bool linear_analysis, //!< Boolean indicating a linear analysis
+ nonlinear_analysis, //!< Boolean indicating a nonlinear analysis
+ dynamic; //!< Boolean indicating a dynamic analysis
+
+public:
+
+ /*!
+ * \brief Constructor of the class
+ * \param[in] config - Definition of the particular problem.
+ */
+ CElasticityOutput(CConfig *config, unsigned short nDim);
+
+ /*!
+ * \brief Destructor of the class.
+ */
+ ~CElasticityOutput(void) override;
+
+ /*!
+ * \brief Load the history output field values
+ * \param[in] config - Definition of the particular problem.
+ */
+ void LoadHistoryData(CConfig *config, CGeometry *geometry, CSolver **solver) override;
+
+ /*!
+ * \brief Set the available history output fields
+ * \param[in] config - Definition of the particular problem.
+ */
+ void SetHistoryOutputFields(CConfig *config) override;
+
+ /*!
+ * \brief Set the available volume output fields
+ * \param[in] config - Definition of the particular problem.
+ */
+ void SetVolumeOutputFields(CConfig *config) override;
+
+ /*!
+ * \brief Set the values of the volume output fields for a point.
+ * \param[in] config - Definition of the particular problem.
+ * \param[in] geometry - Geometrical definition of the problem.
+ * \param[in] solver - The container holding all solution data.
+ * \param[in] iPoint - Index of the point.
+ */
+ void LoadVolumeData(CConfig *config, CGeometry *geometry, CSolver **solver, unsigned long iPoint) override;
+
+ /*!
+ * \brief Check whether the base values for relative residuals should be initialized
+ * \param[in] config - Definition of the particular problem.
+ * \return if the residuals should be initialized.
+ */
+ bool SetInit_Residuals(CConfig *config) override;
+};
diff --git a/SU2_CFD/include/output/CFlowCompFEMOutput.hpp b/SU2_CFD/include/output/CFlowCompFEMOutput.hpp
new file mode 100644
index 000000000000..fa407f93c497
--- /dev/null
+++ b/SU2_CFD/include/output/CFlowCompFEMOutput.hpp
@@ -0,0 +1,133 @@
+/*!
+ * \file CFlowCompFEMOutput.hpp
+ * \brief Headers of the compressible FEM flow output.
+ * \author R. Sanchez, T. Albring.
+ * \version 6.2.0 "Falcon"
+ *
+ * The current SU2 release has been coordinated by the
+ * SU2 International Developers Society
+ * with selected contributions from the open-source community.
+ *
+ * The main research teams contributing to the current release are:
+ * - Prof. Juan J. Alonso's group at Stanford University.
+ * - Prof. Piero Colonna's group at Delft University of Technology.
+ * - Prof. Nicolas R. Gauger's group at Kaiserslautern University of Technology.
+ * - Prof. Alberto Guardone's group at Polytechnic University of Milan.
+ * - Prof. Rafael Palacios' group at Imperial College London.
+ * - Prof. Vincent Terrapon's group at the University of Liege.
+ * - Prof. Edwin van der Weide's group at the University of Twente.
+ * - Lab. of New Concepts in Aeronautics at Tech. Institute of Aeronautics.
+ *
+ * Copyright 2012-2019, Francisco D. Palacios, Thomas D. Economon,
+ * Tim Albring, and the SU2 contributors.
+ *
+ * SU2 is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * SU2 is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with SU2. If not, see .
+ */
+
+#pragma once
+
+#include "CFlowOutput.hpp"
+
+class CVariable;
+
+/*! \class CFlowCompFEMOutput
+ * \brief Output class for the compressible FEM flow output.
+ * \author R. Sanchez, T. Albring.
+ * \date May 30, 2018.
+ */
+class CFlowCompFEMOutput final: public CFlowOutput {
+private:
+
+ unsigned short nVar; //!< Number of variables
+ unsigned short turb_model; //!< Kind of turbulence model
+
+public:
+
+ /*!
+ * \brief Constructor of the class
+ * \param[in] config - Definition of the particular problem.
+ */
+ CFlowCompFEMOutput(CConfig *config, unsigned short nDim);
+
+ /*!
+ * \brief Destructor of the class.
+ */
+ ~CFlowCompFEMOutput(void) override;
+
+ /*!
+ * \brief Load the history output field values
+ * \param[in] config - Definition of the particular problem.
+ */
+ void LoadHistoryData(CConfig *config, CGeometry *geometry, CSolver **solver) override;
+
+ /*!
+ * \brief Set the values of the volume output fields for a surface point.
+ * \param[in] config - Definition of the particular problem.
+ * \param[in] geometry - Geometrical definition of the problem.
+ * \param[in] solver - The container holding all solution data.
+ * \param[in] iPoint - Index of the point.
+ * \param[in] iMarker - Index of the surface marker.
+ * \param[in] iVertex - Index of the vertex on the marker.
+ */
+ void LoadSurfaceData(CConfig *config, CGeometry *geometry, CSolver **solver,
+ unsigned long iPoint, unsigned short iMarker, unsigned long iVertex) override;
+
+ /*!
+ * \brief Set the available volume output fields
+ * \param[in] config - Definition of the particular problem.
+ */
+ void SetVolumeOutputFields(CConfig *config) override;
+
+ /*!
+ * \brief Set the values of the volume output fields for a point.
+ * \param[in] config - Definition of the particular problem.
+ * \param[in] geometry - Geometrical definition of the problem.
+ * \param[in] solver - The container holding all solution data.
+ * \param[in] iElem - Index of the element.
+ * \param[in] index - Index of the value.
+ * \param[in] dof - Index of the local degree of freedom.
+ */
+ void LoadVolumeDataFEM(CConfig *config, CGeometry *geometry, CSolver **solver,
+ unsigned long iElem, unsigned long index, unsigned short dof) override;
+
+ /*!
+ * \brief Set the available history output fields
+ * \param[in] config - Definition of the particular problem.
+ */
+ void SetHistoryOutputFields(CConfig *config) override;
+
+ /*!
+ * \brief Compute value of the Q criteration for vortex idenfitication
+ * \param[in] config - Definition of the particular problem.
+ * \param[in] geometry - Geometrical definition of the problem.
+ * \param[in] node_flow - The flow variable node
+ * \return Value of the Q criteration at the node
+ */
+ su2double GetQ_Criterion(CConfig *config, CGeometry *geometry, CVariable *node_flow);
+
+ /*!
+ * \brief Check whether the base values for relative residuals should be initialized
+ * \param[in] config - Definition of the particular problem.
+ * \return if the residuals should be initialized.
+ */
+ bool SetInit_Residuals(CConfig *config) override;
+
+ /*!
+ * \brief Check whether the averaged values should be updated
+ * \param[in] config - Definition of the particular problem.
+ * \return averages should be updated.
+ */
+ bool SetUpdate_Averages(CConfig *config) override;
+
+};
diff --git a/SU2_CFD/include/output/CFlowCompOutput.hpp b/SU2_CFD/include/output/CFlowCompOutput.hpp
new file mode 100644
index 000000000000..06385afeaba5
--- /dev/null
+++ b/SU2_CFD/include/output/CFlowCompOutput.hpp
@@ -0,0 +1,131 @@
+/*!
+ * \file CFlowCompOutput.hpp
+ * \brief Headers of the compressible flow output.
+ * \author R. Sanchez, T. Albring.
+ * \version 6.2.0 "Falcon"
+ *
+ * The current SU2 release has been coordinated by the
+ * SU2 International Developers Society
+ * with selected contributions from the open-source community.
+ *
+ * The main research teams contributing to the current release are:
+ * - Prof. Juan J. Alonso's group at Stanford University.
+ * - Prof. Piero Colonna's group at Delft University of Technology.
+ * - Prof. Nicolas R. Gauger's group at Kaiserslautern University of Technology.
+ * - Prof. Alberto Guardone's group at Polytechnic University of Milan.
+ * - Prof. Rafael Palacios' group at Imperial College London.
+ * - Prof. Vincent Terrapon's group at the University of Liege.
+ * - Prof. Edwin van der Weide's group at the University of Twente.
+ * - Lab. of New Concepts in Aeronautics at Tech. Institute of Aeronautics.
+ *
+ * Copyright 2012-2019, Francisco D. Palacios, Thomas D. Economon,
+ * Tim Albring, and the SU2 contributors.
+ *
+ * SU2 is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * SU2 is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with SU2. If not, see .
+ */
+
+#pragma once
+
+#include "CFlowOutput.hpp"
+
+class CVariable;
+
+/*! \class CFlowCompOutput
+ * \brief Output class for compressible flow problems.
+ * \author R. Sanchez, T. Albring.
+ * \date May 30, 2018.
+ */
+class CFlowCompOutput final: public CFlowOutput {
+private:
+
+ unsigned short turb_model; //!< Kind of turbulence model
+
+public:
+
+ /*!
+ * \brief Constructor of the class
+ * \param[in] config - Definition of the particular problem.
+ */
+ CFlowCompOutput(CConfig *config, unsigned short nDim);
+
+ /*!
+ * \brief Destructor of the class.
+ */
+ ~CFlowCompOutput(void) override;
+
+
+ /*!
+ * \brief Load the history output field values
+ * \param[in] config - Definition of the particular problem.
+ */
+ void LoadHistoryData(CConfig *config, CGeometry *geometry, CSolver **solver) override;
+
+ /*!
+ * \brief Set the values of the volume output fields for a surface point.
+ * \param[in] config - Definition of the particular problem.
+ * \param[in] geometry - Geometrical definition of the problem.
+ * \param[in] solver - The container holding all solution data.
+ * \param[in] iPoint - Index of the point.
+ * \param[in] iMarker - Index of the surface marker.
+ * \param[in] iVertex - Index of the vertex on the marker.
+ */
+ void LoadSurfaceData(CConfig *config, CGeometry *geometry, CSolver **solver,
+ unsigned long iPoint, unsigned short iMarker, unsigned long iVertex) override;
+
+ /*!
+ * \brief Set the available volume output fields
+ * \param[in] config - Definition of the particular problem.
+ */
+ void SetVolumeOutputFields(CConfig *config) override;
+
+ /*!
+ * \brief Set the values of the volume output fields for a point.
+ * \param[in] config - Definition of the particular problem.
+ * \param[in] geometry - Geometrical definition of the problem.
+ * \param[in] solver - The container holding all solution data.
+ * \param[in] iPoint - Index of the point.
+ */
+ void LoadVolumeData(CConfig *config, CGeometry *geometry, CSolver **solver, unsigned long iPoint) override;
+
+ /*!
+ * \brief Set the available history output fields
+ * \param[in] config - Definition of the particular problem.
+ */
+ void SetHistoryOutputFields(CConfig *config) override;
+
+ /*!
+ * \brief Compute value of the Q criteration for vortex idenfitication
+ * \param[in] config - Definition of the particular problem.
+ * \param[in] geometry - Geometrical definition of the problem.
+ * \param[in] node_flow - The flow variable node
+ * \return Value of the Q criteration at the node
+ */
+ su2double GetQ_Criterion(CConfig *config, CGeometry *geometry, CVariable *node_flow);
+
+ /*!
+ * \brief Check whether the base values for relative residuals should be initialized
+ * \param[in] config - Definition of the particular problem.
+ * \return if the residuals should be initialized.
+ */
+ bool SetInit_Residuals(CConfig *config) override;
+
+ /*!
+ * \brief Check whether the averaged values should be updated
+ * \param[in] config - Definition of the particular problem.
+ * \return averages should be updated.
+ */
+ bool SetUpdate_Averages(CConfig *config) override;
+
+
+};
diff --git a/SU2_CFD/include/output/CFlowIncOutput.hpp b/SU2_CFD/include/output/CFlowIncOutput.hpp
new file mode 100644
index 000000000000..7efeb9467777
--- /dev/null
+++ b/SU2_CFD/include/output/CFlowIncOutput.hpp
@@ -0,0 +1,131 @@
+/*!
+ * \file CFlowIncCompOutput.hpp
+ * \brief Headers of the incompressible flow output.
+ * \author T. Albring, R. Sanchez
+ * \version 6.2.0 "Falcon"
+ *
+ * The current SU2 release has been coordinated by the
+ * SU2 International Developers Society
+ * with selected contributions from the open-source community.
+ *
+ * The main research teams contributing to the current release are:
+ * - Prof. Juan J. Alonso's group at Stanford University.
+ * - Prof. Piero Colonna's group at Delft University of Technology.
+ * - Prof. Nicolas R. Gauger's group at Kaiserslautern University of Technology.
+ * - Prof. Alberto Guardone's group at Polytechnic University of Milan.
+ * - Prof. Rafael Palacios' group at Imperial College London.
+ * - Prof. Vincent Terrapon's group at the University of Liege.
+ * - Prof. Edwin van der Weide's group at the University of Twente.
+ * - Lab. of New Concepts in Aeronautics at Tech. Institute of Aeronautics.
+ *
+ * Copyright 2012-2019, Francisco D. Palacios, Thomas D. Economon,
+ * Tim Albring, and the SU2 contributors.
+ *
+ * SU2 is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * SU2 is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with SU2. If not, see .
+ */
+
+#pragma once
+
+#include "CFlowOutput.hpp"
+
+class CVariable;
+
+/*! \class CFlowIncOutput
+ * \brief Output class for incompressible flow problems.
+ * \author R. Sanchez, T. Albring.
+ * \date May 30, 2018.
+ */
+class CFlowIncOutput final: public CFlowOutput {
+private:
+
+ unsigned short turb_model; /*!< \brief The kind of turbulence model*/
+ bool heat, /*!< \brief Boolean indicating whether have a heat problem*/
+ weakly_coupled_heat; /*!< \brief Boolean indicating whether have a weakly coupled heat equation*/
+
+public:
+
+ /*!
+ * \brief Constructor of the class
+ * \param[in] config - Definition of the particular problem.
+ */
+ CFlowIncOutput(CConfig *config, unsigned short nDim);
+
+ /*!
+ * \brief Destructor of the class.
+ */
+ ~CFlowIncOutput(void) override;
+
+ /*!
+ * \brief Load the history output field values
+ * \param[in] config - Definition of the particular problem.
+ */
+ void LoadHistoryData(CConfig *config, CGeometry *geometry, CSolver **solver) override;
+
+ /*!
+ * \brief Set the values of the volume output fields for a surface point.
+ * \param[in] config - Definition of the particular problem.
+ * \param[in] geometry - Geometrical definition of the problem.
+ * \param[in] solver - The container holding all solution data.
+ * \param[in] iPoint - Index of the point.
+ * \param[in] iMarker - Index of the surface marker.
+ * \param[in] iVertex - Index of the vertex on the marker.
+ */
+ void LoadSurfaceData(CConfig *config, CGeometry *geometry, CSolver **solver,
+ unsigned long iPoint, unsigned short iMarker, unsigned long iVertex) override;
+
+ /*!
+ * \brief Set the available volume output fields
+ * \param[in] config - Definition of the particular problem.
+ */
+ void SetVolumeOutputFields(CConfig *config) override;
+
+ /*!
+ * \brief Set the values of the volume output fields for a point.
+ * \param[in] config - Definition of the particular problem.
+ * \param[in] geometry - Geometrical definition of the problem.
+ * \param[in] solver - The container holding all solution data.
+ * \param[in] iPoint - Index of the point.
+ */
+ void LoadVolumeData(CConfig *config, CGeometry *geometry, CSolver **solver, unsigned long iPoint) override;
+
+ /*!
+ * \brief Set the available history output fields
+ * \param[in] config - Definition of the particular problem.
+ */
+ void SetHistoryOutputFields(CConfig *config) override;
+
+ /*!
+ * \brief Compute value of the Q criteration for vortex idenfitication
+ * \param[in] config - Definition of the particular problem.
+ * \param[in] geometry - Geometrical definition of the problem.
+ * \param[in] node_flow - The flow variable node
+ * \return Value of the Q criteration at the node
+ */
+ su2double GetQ_Criterion(CConfig *config, CGeometry *geometry, CVariable *node_flow);
+
+ /*!
+ * \brief Check whether the base values for relative residuals should be initialized
+ * \param[in] config - Definition of the particular problem.
+ * \return if the residuals should be initialized.
+ */
+ bool SetInit_Residuals(CConfig *config) override;
+
+ /*!
+ * \brief Check whether the averaged values should be updated
+ * \param[in] config - Definition of the particular problem.
+ * \return averages should be updated.
+ */
+ bool SetUpdate_Averages(CConfig *config) override;
+
+};
diff --git a/SU2_CFD/include/output/CFlowOutput.hpp b/SU2_CFD/include/output/CFlowOutput.hpp
new file mode 100644
index 000000000000..f5d0e3aa1f5b
--- /dev/null
+++ b/SU2_CFD/include/output/CFlowOutput.hpp
@@ -0,0 +1,140 @@
+/*!
+ * \file CFlowOutput.hpp
+ * \brief Headers of the flow output.
+ * \author F. Palacios, T. Economon, M. Colonno
+ * \version 6.2.0 "Falcon"
+ *
+ * The current SU2 release has been coordinated by the
+ * SU2 International Developers Society
+ * with selected contributions from the open-source community.
+ *
+ * The main research teams contributing to the current release are:
+ * - Prof. Juan J. Alonso's group at Stanford University.
+ * - Prof. Piero Colonna's group at Delft University of Technology.
+ * - Prof. Nicolas R. Gauger's group at Kaiserslautern University of Technology.
+ * - Prof. Alberto Guardone's group at Polytechnic University of Milan.
+ * - Prof. Rafael Palacios' group at Imperial College London.
+ * - Prof. Vincent Terrapon's group at the University of Liege.
+ * - Prof. Edwin van der Weide's group at the University of Twente.
+ * - Lab. of New Concepts in Aeronautics at Tech. Institute of Aeronautics.
+ *
+ * Copyright 2012-2019, Francisco D. Palacios, Thomas D. Economon,
+ * Tim Albring, and the SU2 contributors.
+ *
+ * SU2 is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * SU2 is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with SU2. If not, see .
+ */
+
+#pragma once
+
+#include "COutput.hpp"
+#include "../variables/CVariable.hpp"
+
+class CFlowOutput : public COutput{
+public:
+ /*!
+ * \brief Constructor of the class
+ * \param[in] config - Definition of the particular problem.
+ */
+ CFlowOutput(CConfig *config, unsigned short nDim, bool femOutput);
+
+ /*!
+ * \brief Destructor of the class.
+ */
+ ~CFlowOutput(void) override;
+
+protected:
+ /*!
+ * \brief Add flow surface output fields
+ * \param[in] config - Definition of the particular problem.
+ */
+ void AddAnalyzeSurfaceOutput(CConfig *config);
+
+ /*!
+ * \brief Set flow surface output field values
+ * \param[in] solver - The container holding all solution data.
+ * \param[in] geometry - Geometrical definition of the problem.
+ * \param[in] config - Definition of the particular problem.
+ * \param[in] output - Boolean indicating whether information should be written to screen
+ */
+ void SetAnalyzeSurface(CSolver *solver, CGeometry *geometry, CConfig *config, bool output);
+
+ /*!
+ * \brief Add aerodynamic coefficients as output fields
+ * \param[in] config - Definition of the particular problem.
+ */
+ void AddAerodynamicCoefficients(CConfig *config);
+
+ /*!
+ * \brief Set the value of the aerodynamic coefficients
+ * \param[in] config - Definition of the particular problem.
+ * \param[in] flow_solver - The container holding all solution data.
+ */
+ void SetAerodynamicCoefficients(CConfig *config, CSolver *flow_solver);
+
+ /*!
+ * \brief Add CP inverse design output as history fields
+ * \param[in] config - Definition of the particular problem.
+ */
+ void Add_CpInverseDesignOutput(CConfig *config);
+
+ /*!
+ * \brief Set CP inverse design output field values
+ * \param[in] solver - The container holding all solution data.
+ * \param[in] geometry - Geometrical definition of the problem.
+ * \param[in] config - Definition of the particular problem.
+ */
+ void Set_CpInverseDesign(CSolver *solver, CGeometry *geometry, CConfig *config);
+
+ /*!
+ * \brief Write information to meta data file
+ * \param[in] output - Container holding the output instances per zone.
+ * \param[in] config - Definition of the particular problem per zone.
+ */
+ void WriteMetaData(CConfig *config, CGeometry *geometry);
+
+ /*!
+ * \brief Write any additional files defined for the current solver.
+ * \param[in] config - Definition of the particular problem per zone.
+ * \param[in] geometry - Geometrical definition of the problem.
+ * \param[in] solver_container - The container holding all solution data.
+ */
+ void WriteAdditionalFiles(CConfig *config, CGeometry *geometry, CSolver **solver_container) override;
+
+ /*!
+ * \brief Determines if the the volume output should be written.
+ * \param[in] config - Definition of the particular problem.
+ * \param[in] Iter - Current iteration index.
+ */
+ bool WriteVolume_Output(CConfig *config, unsigned long Iter) override;
+
+ /*!
+ * \brief Write the forces breakdown file
+ * \param[in] config - Definition of the particular problem per zone.
+ * \param[in] geometry - Geometrical definition of the problem.
+ * \param[in] solver_container - The container holding all solution data.
+ */
+ void WriteForcesBreakdown(CConfig *config, CGeometry *geometry, CSolver **solver_container);
+
+ /*!
+ * \brief Set the time averaged output fields.
+ */
+ void SetTimeAveragedFields();
+
+ /*!
+ * \brief Load the time averaged output fields.
+ * \param iPoint
+ * \param node_flow
+ */
+ void LoadTimeAveragedData(unsigned long iPoint, CVariable *node_flow);
+};
diff --git a/SU2_CFD/include/output/CHeatOutput.hpp b/SU2_CFD/include/output/CHeatOutput.hpp
new file mode 100644
index 000000000000..8a41c49f45b8
--- /dev/null
+++ b/SU2_CFD/include/output/CHeatOutput.hpp
@@ -0,0 +1,88 @@
+/*!
+ * \file CHeatOutput.hpp
+ * \brief Headers of the heat output.
+ * \author R. Sanchez, T. Albring.
+ * \version 6.2.0 "Falcon"
+ *
+ * The current SU2 release has been coordinated by the
+ * SU2 International Developers Society
+ * with selected contributions from the open-source community.
+ *
+ * The main research teams contributing to the current release are:
+ * - Prof. Juan J. Alonso's group at Stanford University.
+ * - Prof. Piero Colonna's group at Delft University of Technology.
+ * - Prof. Nicolas R. Gauger's group at Kaiserslautern University of Technology.
+ * - Prof. Alberto Guardone's group at Polytechnic University of Milan.
+ * - Prof. Rafael Palacios' group at Imperial College London.
+ * - Prof. Vincent Terrapon's group at the University of Liege.
+ * - Prof. Edwin van der Weide's group at the University of Twente.
+ * - Lab. of New Concepts in Aeronautics at Tech. Institute of Aeronautics.
+ *
+ * Copyright 2012-2019, Francisco D. Palacios, Thomas D. Economon,
+ * Tim Albring, and the SU2 contributors.
+ *
+ * SU2 is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * SU2 is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with SU2. If not, see .
+ */
+
+#pragma once
+
+#include "COutput.hpp"
+
+
+/*! \class CHeatOutput
+ * \brief Output class for heat problems.
+ * \author R. Sanchez, T. Albring.
+ * \date June 5, 2018.
+ */
+class CHeatOutput final: public COutput {
+public:
+
+ /*!
+ * \brief Constructor of the class
+ * \param[in] config - Definition of the particular problem.
+ */
+ CHeatOutput(CConfig *config, unsigned short nDim);
+
+ /*!
+ * \brief Destructor of the class.
+ */
+ ~CHeatOutput(void) override;
+
+ /*!
+ * \brief Load the history output field values
+ * \param[in] config - Definition of the particular problem.
+ */
+ void LoadHistoryData(CConfig *config, CGeometry *geometry, CSolver **solver) override;
+
+ /*!
+ * \brief Set the available volume output fields
+ * \param[in] config - Definition of the particular problem.
+ */
+ void SetVolumeOutputFields(CConfig *config) override;
+
+ /*!
+ * \brief Set the values of the volume output fields for a point.
+ * \param[in] config - Definition of the particular problem.
+ * \param[in] geometry - Geometrical definition of the problem.
+ * \param[in] solver - The container holding all solution data.
+ * \param[in] iPoint - Index of the point.
+ */
+ void LoadVolumeData(CConfig *config, CGeometry *geometry, CSolver **solver, unsigned long iPoint) override;
+
+ /*!
+ * \brief Set the available history output fields
+ * \param[in] config - Definition of the particular problem.
+ */
+ void SetHistoryOutputFields(CConfig *config) override;
+};
diff --git a/SU2_CFD/include/output/CMeshOutput.hpp b/SU2_CFD/include/output/CMeshOutput.hpp
new file mode 100644
index 000000000000..8d2124f0d3b8
--- /dev/null
+++ b/SU2_CFD/include/output/CMeshOutput.hpp
@@ -0,0 +1,77 @@
+/*!
+ * \file CMeshOutput.hpp
+ * \brief Headers of the mesh output.
+ * \author R. Sanchez, T. Albring.
+ * \version 6.2.0 "Falcon"
+ *
+ * The current SU2 release has been coordinated by the
+ * SU2 International Developers Society
+ * with selected contributions from the open-source community.
+ *
+ * The main research teams contributing to the current release are:
+ * - Prof. Juan J. Alonso's group at Stanford University.
+ * - Prof. Piero Colonna's group at Delft University of Technology.
+ * - Prof. Nicolas R. Gauger's group at Kaiserslautern University of Technology.
+ * - Prof. Alberto Guardone's group at Polytechnic University of Milan.
+ * - Prof. Rafael Palacios' group at Imperial College London.
+ * - Prof. Vincent Terrapon's group at the University of Liege.
+ * - Prof. Edwin van der Weide's group at the University of Twente.
+ * - Lab. of New Concepts in Aeronautics at Tech. Institute of Aeronautics.
+ *
+ * Copyright 2012-2019, Francisco D. Palacios, Thomas D. Economon,
+ * Tim Albring, and the SU2 contributors.
+ *
+ * SU2 is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * SU2 is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with SU2. If not, see .
+ */
+
+#pragma once
+
+#include "COutput.hpp"
+
+/*! \class CMeshOutput
+ * \brief Output class for mesh solution.
+ * \author R. Sanchez, T. Albring.
+ * \date June 5, 2018.
+ */
+class CMeshOutput final: public COutput {
+
+public:
+
+ /*!
+ * \brief Constructor of the class
+ * \param[in] config - Definition of the particular problem.
+ */
+ CMeshOutput(CConfig *config, unsigned short nDim);
+
+ /*!
+ * \brief Destructor of the class.
+ */
+ ~CMeshOutput(void) override;
+
+ /*!
+ * \brief Set the available volume output fields
+ * \param[in] config - Definition of the particular problem.
+ */
+ void SetVolumeOutputFields(CConfig *config) override;
+
+ /*!
+ * \brief Set the values of the volume output fields for a point.
+ * \param[in] config - Definition of the particular problem.
+ * \param[in] geometry - Geometrical definition of the problem.
+ * \param[in] solver - The container holding all solution data.
+ * \param[in] iPoint - Index of the point.
+ */
+ void LoadVolumeData(CConfig *config, CGeometry *geometry, CSolver **solver, unsigned long iPoint) override;
+
+};
diff --git a/SU2_CFD/include/output/CMultizoneOutput.hpp b/SU2_CFD/include/output/CMultizoneOutput.hpp
new file mode 100644
index 000000000000..754d57b830d1
--- /dev/null
+++ b/SU2_CFD/include/output/CMultizoneOutput.hpp
@@ -0,0 +1,114 @@
+/*!
+ * \file CDriverOutput.hpp
+ * \brief Headers of the main subroutines for screen and history output in multizone problems.
+ * \author R. Sanchez, T. Albring
+ * \version 6.1.0 "Falcon"
+ *
+ * The current SU2 release has been coordinated by the
+ * SU2 International Developers Society
+ * with selected contributions from the open-source community.
+ *
+ * The main research teams contributing to the current release are:
+ * - Prof. Juan J. Alonso's group at Stanford University.
+ * - Prof. Piero Colonna's group at Delft University of Technology.
+ * - Prof. Nicolas R. Gauger's group at Kaiserslautern University of Technology.
+ * - Prof. Alberto Guardone's group at Polytechnic University of Milan.
+ * - Prof. Rafael Palacios' group at Imperial College London.
+ * - Prof. Vincent Terrapon's group at the University of Liege.
+ * - Prof. Edwin van der Weide's group at the University of Twente.
+ * - Lab. of New Concepts in Aeronautics at Tech. Institute of Aeronautics.
+ *
+ * Copyright 2012-2018, Francisco D. Palacios, Thomas D. Economon,
+ * Tim Albring, and the SU2 contributors.
+ *
+ * SU2 is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * SU2 is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with SU2. If not, see .
+ */
+
+#pragma once
+
+#include "../../../Common/include/mpi_structure.hpp"
+
+#ifdef HAVE_CGNS
+ #include "cgnslib.h"
+#endif
+#ifdef HAVE_TECIO
+ #include "TECIO.h"
+#endif
+#include
+#include
+#include
+#include
+
+#include "COutput.hpp"
+#include "../../../Common/include/config_structure.hpp"
+
+using namespace std;
+
+/*!
+ * \class CDriverOutput
+ * \brief Class for writing the multizone output.
+ * \author R. Sanchez, T. Albring.
+ */
+class CMultizoneOutput final: public COutput {
+
+protected:
+ unsigned short nZone; //!< Number of zones
+
+ string bgs_res_name; //!< Block-Gauss seidel residual name
+ bool write_zone; //!< Boolean indicating whether the individual zones write to screen
+
+public:
+
+ /*!
+ * \brief Constructor of the class.
+ */
+ CMultizoneOutput(CConfig *driver_config, CConfig** config, unsigned short nDim);
+
+ /*!
+ * \brief Destructor of the class.
+ */
+ ~CMultizoneOutput(void) override;
+
+ /*!
+ * \brief Load the multizone history output field values
+ * \param[in] output - Container holding the output instances per zone.
+ * \param[in] config - Definition of the particular problem.
+ */
+ void LoadMultizoneHistoryData(COutput **output, CConfig **config) override;
+
+ /*!
+ * \brief Set the available multizone history output fields
+ * \param[in] output - Container holding the output instances per zone.
+ * \param[in] config - Definition of the particular problem per zone.
+ */
+ void SetMultizoneHistoryOutputFields(COutput **output, CConfig **config) override;
+
+ /*!
+ * \brief Determines if the history file output.
+ * \param[in] config - Definition of the particular problem.
+ */
+ bool WriteHistoryFile_Output(CConfig *config) override;
+
+ /*!
+ * \brief Determines if the screen header should be written.
+ * \param[in] config - Definition of the particular problem.
+ */
+ bool WriteScreen_Header(CConfig *config) override;
+
+ /*!
+ * \brief Determines if the screen header should be written.
+ * \param[in] config - Definition of the particular problem.
+ */
+ bool WriteScreen_Output(CConfig *config) override;
+};
diff --git a/SU2_CFD/include/output/COutput.hpp b/SU2_CFD/include/output/COutput.hpp
new file mode 100644
index 000000000000..d9b3cb6be8b3
--- /dev/null
+++ b/SU2_CFD/include/output/COutput.hpp
@@ -0,0 +1,782 @@
+/*!
+ * \file COutput.hpp
+ * \brief Headers of the output class.
+ * \author T.Albring
+ * \version 6.2.0 "Falcon"
+ *
+ * The current SU2 release has been coordinated by the
+ * SU2 International Developers Society
+ * with selected contributions from the open-source community.
+ *
+ * The main research teams contributing to the current release are:
+ * - Prof. Juan J. Alonso's group at Stanford University.
+ * - Prof. Piero Colonna's group at Delft University of Technology.
+ * - Prof. Nicolas R. Gauger's group at Kaiserslautern University of Technology.
+ * - Prof. Alberto Guardone's group at Polytechnic University of Milan.
+ * - Prof. Rafael Palacios' group at Imperial College London.
+ * - Prof. Vincent Terrapon's group at the University of Liege.
+ * - Prof. Edwin van der Weide's group at the University of Twente.
+ * - Lab. of New Concepts in Aeronautics at Tech. Institute of Aeronautics.
+ *
+ * Copyright 2012-2019, Francisco D. Palacios, Thomas D. Economon,
+ * Tim Albring, and the SU2 contributors.
+ *
+ * SU2 is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * SU2 is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with SU2. If not, see .
+ */
+
+#pragma once
+
+#include
+#include
+#include