Skip to content

Commit 57e8c12

Browse files
authored
Merge branch 'develop' into feature_Sobolev_smoothing_solver
2 parents 0630b4a + 36be2b8 commit 57e8c12

264 files changed

Lines changed: 774 additions & 715 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Common/include/CConfig.hpp

Lines changed: 49 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -675,9 +675,12 @@ class CConfig {
675675
unsigned short Res_FEM_CRIT; /*!< \brief Criteria to apply to the FEM convergence (absolute/relative). */
676676
unsigned long StartConv_Iter; /*!< \brief Start convergence criteria at iteration. */
677677
su2double Cauchy_Eps; /*!< \brief Epsilon used for the convergence. */
678-
bool Restart, /*!< \brief Restart solution (for direct, adjoint, and linearized problems).*/
679-
Read_Binary_Restart, /*!< \brief Read binary SU2 native restart files.*/
680-
Restart_Flow; /*!< \brief Restart flow solution for adjoint and linearized problems. */
678+
bool Restart, /*!< \brief Restart solution (for direct, adjoint, and linearized problems).*/
679+
Read_Binary_Restart, /*!< \brief Read binary SU2 native restart files.*/
680+
Wrt_Restart_Overwrite, /*!< \brief Overwrite restart files or append iteration number.*/
681+
Wrt_Surface_Overwrite, /*!< \brief Overwrite surface output files or append iteration number.*/
682+
Wrt_Volume_Overwrite, /*!< \brief Overwrite volume output files or append iteration number.*/
683+
Restart_Flow; /*!< \brief Restart flow solution for adjoint and linearized problems. */
681684
unsigned short nMarker_Monitoring, /*!< \brief Number of markers to monitor. */
682685
nMarker_Designing, /*!< \brief Number of markers for the objective function. */
683686
nMarker_GeoEval, /*!< \brief Number of markers for the objective function. */
@@ -743,7 +746,7 @@ class CConfig {
743746
su2double *nBlades; /*!< \brief number of blades for turbomachinery computation. */
744747
unsigned short Geo_Description; /*!< \brief Description of the geometry. */
745748
unsigned short Mesh_FileFormat; /*!< \brief Mesh input format. */
746-
unsigned short Tab_FileFormat; /*!< \brief Format of the output files. */
749+
TAB_OUTPUT Tab_FileFormat; /*!< \brief Format of the output files. */
747750
unsigned short output_precision; /*!< \brief <ofstream>.precision(value) for SU2_DOT and HISTORY output */
748751
unsigned short ActDisk_Jump; /*!< \brief Format of the output files. */
749752
unsigned long StartWindowIteration; /*!< \brief Starting Iteration for long time Windowing apporach . */
@@ -1122,7 +1125,7 @@ class CConfig {
11221125
unsigned long HistoryWrtFreq[3], /*!< \brief Array containing history writing frequencies for timer iter, outer iter, inner iter */
11231126
ScreenWrtFreq[3]; /*!< \brief Array containing screen writing frequencies for timer iter, outer iter, inner iter */
11241127
unsigned long VolumeWrtFreq; /*!< \brief Writing frequency for solution files. */
1125-
unsigned short* VolumeOutputFiles; /*!< \brief File formats to output */
1128+
OUTPUT_TYPE* VolumeOutputFiles; /*!< \brief File formats to output */
11261129
unsigned short nVolumeOutputFiles; /*!< \brief Number of File formats to output */
11271130

11281131
bool Multizone_Mesh; /*!< \brief Determines if the mesh contains multiple zones. */
@@ -5264,6 +5267,24 @@ class CConfig {
52645267
*/
52655268
bool GetRead_Binary_Restart(void) const { return Read_Binary_Restart; }
52665269

5270+
/*!
5271+
* \brief Flag for whether restart solution files are overwritten.
5272+
* \return Flag for overwriting. If Flag=false, iteration nr is appended to filename
5273+
*/
5274+
bool GetWrt_Restart_Overwrite(void) const { return Wrt_Restart_Overwrite; }
5275+
5276+
/*!
5277+
* \brief Flag for whether visualization files are overwritten.
5278+
* \return Flag for overwriting. If Flag=false, iteration nr is appended to filename
5279+
*/
5280+
bool GetWrt_Surface_Overwrite(void) const { return Wrt_Surface_Overwrite; }
5281+
5282+
/*!
5283+
* \brief Flag for whether visualization files are overwritten.
5284+
* \return Flag for overwriting. If Flag=false, iteration nr is appended to filename
5285+
*/
5286+
bool GetWrt_Volume_Overwrite(void) const { return Wrt_Volume_Overwrite; }
5287+
52675288
/*!
52685289
* \brief Provides the number of varaibles.
52695290
* \return Number of variables.
@@ -5365,7 +5386,7 @@ class CConfig {
53655386
* \brief Get the format of the output solution.
53665387
* \return Format of the output solution.
53675388
*/
5368-
unsigned short GetTabular_FileFormat(void) const { return Tab_FileFormat; }
5389+
TAB_OUTPUT GetTabular_FileFormat(void) const { return Tab_FileFormat; }
53695390

53705391
/*!
53715392
* \brief Get the output precision to be used in <ofstream>.precision(value) for history and SU2_DOT output.
@@ -5412,13 +5433,22 @@ class CConfig {
54125433

54135434
/*!
54145435
* \brief Add any numbers necessary to the filename (iteration number, zone ID ...)
5415-
* \param[in] config - Definition of the particular problem.
54165436
* \param[in] filename - the base filename.
54175437
* \param[in] ext - the extension to be added.
5438+
* \param[in] Iter - the current iteration
54185439
* \return The new filename
54195440
*/
54205441
string GetFilename(string filename, string ext, int Iter) const;
54215442

5443+
/*!
5444+
* \brief Add steady iteration number to the filename (does not overwrite previous files)
5445+
* \param[in] filename - the base filename.
5446+
* \param[in] inner_iter - the inner iterations
5447+
* \param[in] outer_iter - the outer iterations
5448+
* \return The new filename
5449+
*/
5450+
string GetFilename_Iter(const string& filename_iter, unsigned long curInnerIter, unsigned long curOuterIter) const;
5451+
54225452
/*!
54235453
* \brief Append the zone index to the restart or the solution files.
54245454
* \return Name of the restart file for the flow variables.
@@ -5427,18 +5457,26 @@ class CConfig {
54275457

54285458
/*!
54295459
* \brief Append the zone index to the restart or the solution files.
5460+
* \param[in] val_filename - the base filename.
5461+
* \param[in] val_iZone - the zone ID.
5462+
* \param[in] ext - the filename extension.
54305463
* \return Name of the restart file for the flow variables.
54315464
*/
54325465
string GetMultizone_HistoryFileName(string val_filename, int val_iZone, string ext) const;
54335466

54345467
/*!
54355468
* \brief Append the instance index to the restart or the solution files.
5469+
* \param[in] val_filename - the base filename.
5470+
* \param[in] val_iInst - the current instance.
5471+
* \param[in] ext - the filename extension.
54365472
* \return Name of the restart file for the flow variables.
54375473
*/
54385474
string GetMultiInstance_FileName(string val_filename, int val_iInst, string ext) const;
54395475

54405476
/*!
54415477
* \brief Append the instance index to the restart or the solution files.
5478+
* \param[in] val_filename - the base filename.
5479+
* \param[in] val_iInst - the current instance.
54425480
* \return Name of the restart file for the flow variables.
54435481
*/
54445482
string GetMultiInstance_HistoryFileName(string val_filename, int val_iInst) const;
@@ -5501,6 +5539,7 @@ class CConfig {
55015539
* \brief Augment the input filename with the iteration number for an unsteady file.
55025540
* \param[in] val_filename - String value of the base filename.
55035541
* \param[in] val_iter - Unsteady iteration number or time instance.
5542+
* \param[in] ext - the filename extension.
55045543
* \return Name of the file with the iteration number for an unsteady solution file.
55055544
*/
55065545
string GetUnsteady_FileName(string val_filename, int val_iter, string ext) const;
@@ -5626,6 +5665,7 @@ class CConfig {
56265665
/*!
56275666
* \brief Set the value of the design variable step, we use this value in design problems.
56285667
* \param[in] val_dv - Number of the design variable that we want to read.
5668+
* \param[in] val_ind - value of initial deformation.
56295669
* \param[in] val - Value of the design variable.
56305670
*/
56315671
void SetDV_Value(unsigned short val_dv, unsigned short val_ind, su2double val) { DV_Value[val_dv][val_ind] = val; }
@@ -5673,7 +5713,6 @@ class CConfig {
56735713

56745714
/*!
56755715
* \brief Set the type of dynamic mesh motion.
5676-
* \param[in] val_iZone - Number for the current zone in the mesh (each zone has independent motion).
56775716
* \param[in] motion_Type - Specify motion type.
56785717
*/
56795718
void SetKind_GridMovement(unsigned short motion_Type) { Kind_GridMovement = motion_Type; }
@@ -5792,7 +5831,7 @@ class CConfig {
57925831

57935832
/*!
57945833
* \brief Get the pitching phase of the mesh.
5795-
* \param[in] val_iZone - Number for the current zone in the mesh (each zone has independent motion).
5834+
* \param[in] iDim - spatial component.
57965835
* \return pitching phase of the mesh.
57975836
*/
57985837
su2double GetPitching_Phase(unsigned short iDim) const { return Pitching_Phase[iDim];}
@@ -5822,7 +5861,6 @@ class CConfig {
58225861

58235862
/*!
58245863
* \brief Get the plunging amplitude of the mesh.
5825-
* \param[in] val_iZone - Number for the current zone in the mesh (each zone has independent motion).
58265864
* \param[in] iDim - spatial component
58275865
* \return Plunging amplitude of the mesh.
58285866
*/
@@ -9426,7 +9464,7 @@ class CConfig {
94269464
/*!
94279465
* \brief GetVolumeOutputFiles
94289466
*/
9429-
const unsigned short* GetVolumeOutputFiles() const { return VolumeOutputFiles; }
9467+
const OUTPUT_TYPE* GetVolumeOutputFiles() const { return VolumeOutputFiles; }
94309468

94319469
/*!
94329470
* \brief GetnVolumeOutputFiles

Common/include/option_structure.hpp

Lines changed: 65 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -1059,7 +1059,7 @@ static const MapType<std::string, ENUM_ROELOWDISS> RoeLowDiss_Map = {
10591059
* \brief Types of wall functions.
10601060
*/
10611061
enum class WALL_FUNCTIONS {
1062-
NONE , /*!< \brief No wall function treatment, integration to the wall. Default behavior. */
1062+
NONE , /*!< \brief No wall function treatment, integration to the wall. Default behavior. */
10631063
STANDARD_FUNCTION , /*!< \brief Standard wall function. */
10641064
ADAPTIVE_FUNCTION , /*!< \brief Adaptive wall function. Formulation depends on y+. */
10651065
SCALABLE_FUNCTION , /*!< \brief Scalable wall function. */
@@ -1456,7 +1456,7 @@ enum TURBO_MARKER_TYPE{
14561456
/*!
14571457
* \brief Types inlet boundary treatments
14581458
*/
1459-
enum INLET_TYPE {
1459+
enum class INLET_TYPE {
14601460
TOTAL_CONDITIONS, /*!< \brief User specifies total pressure, total temperature, and flow direction. */
14611461
MASS_FLOW, /*!< \brief User specifies density and velocity (mass flow). */
14621462
INPUT_FILE, /*!< \brief User specifies an input file. */
@@ -1641,65 +1641,67 @@ static const MapType<std::string, ENUM_INPUT> Input_Map = {
16411641
MakePair("BOX", BOX)
16421642
};
16431643

1644+
16441645
/*!
16451646
* \brief Type of solution output file formats
16461647
*/
1647-
enum ENUM_OUTPUT {
1648-
TECPLOT = 1, /*!< \brief Tecplot format for the solution output. */
1649-
TECPLOT_BINARY = 2, /*!< \brief Tecplot binary format for the solution output. */
1650-
SURFACE_TECPLOT = 3, /*!< \brief Tecplot format for the solution output. */
1651-
SURFACE_TECPLOT_BINARY = 4, /*!< \brief Tecplot binary format for the solution output. */
1652-
CSV = 5, /*!< \brief Comma-separated values format for the solution output. */
1653-
SURFACE_CSV = 6, /*!< \brief Comma-separated values format for the solution output. */
1654-
PARAVIEW = 7, /*!< \brief Paraview ASCII format for the solution output. */
1655-
PARAVIEW_BINARY = 8, /*!< \brief Paraview binary format for the solution output. */
1656-
SURFACE_PARAVIEW = 9, /*!< \brief Paraview ASCII format for the solution output. */
1657-
SURFACE_PARAVIEW_BINARY = 10, /*!< \brief Paraview binary format for the solution output. */
1658-
MESH = 11, /*!< \brief SU2 mesh format. */
1659-
RESTART_BINARY = 12, /*!< \brief SU2 binary restart format. */
1660-
RESTART_ASCII = 13, /*!< \brief SU2 ASCII restart format. */
1661-
STL = 14, /*!< \brief STL ASCII format for surface solution output. */
1662-
STL_BINARY = 15, /*!< \brief STL binary format for surface solution output. Not implemented yet. */
1663-
PARAVIEW_XML = 16, /*!< \brief Paraview XML with binary data format */
1664-
SURFACE_PARAVIEW_XML = 17, /*!< \brief Surface Paraview XML with binary data format */
1665-
PARAVIEW_MULTIBLOCK = 18, /*!< \brief Paraview XML Multiblock */
1666-
CGNS = 19, /*!< \brief CGNS format. */
1667-
SURFACE_CGNS = 20 /*!< \brief CGNS format. */
1668-
};
1669-
static const MapType<std::string, ENUM_OUTPUT> Output_Map = {
1670-
MakePair("TECPLOT_ASCII", TECPLOT)
1671-
MakePair("TECPLOT", TECPLOT_BINARY)
1672-
MakePair("SURFACE_TECPLOT_ASCII", SURFACE_TECPLOT)
1673-
MakePair("SURFACE_TECPLOT", SURFACE_TECPLOT_BINARY)
1674-
MakePair("CSV", CSV)
1675-
MakePair("SURFACE_CSV", SURFACE_CSV)
1676-
MakePair("PARAVIEW_ASCII", PARAVIEW)
1677-
MakePair("PARAVIEW_LEGACY", PARAVIEW_BINARY)
1678-
MakePair("SURFACE_PARAVIEW_ASCII", SURFACE_PARAVIEW)
1679-
MakePair("SURFACE_PARAVIEW_LEGACY", SURFACE_PARAVIEW_BINARY)
1680-
MakePair("PARAVIEW", PARAVIEW_XML)
1681-
MakePair("SURFACE_PARAVIEW", SURFACE_PARAVIEW_XML)
1682-
MakePair("PARAVIEW_MULTIBLOCK", PARAVIEW_MULTIBLOCK)
1683-
MakePair("RESTART_ASCII", RESTART_ASCII)
1684-
MakePair("RESTART", RESTART_BINARY)
1685-
MakePair("CGNS", CGNS)
1686-
MakePair("SURFACE_CGNS", SURFACE_CGNS)
1687-
MakePair("STL", STL)
1688-
MakePair("STL_BINARY", STL_BINARY)
1648+
enum class OUTPUT_TYPE {
1649+
TECPLOT_ASCII, /*!< \brief Tecplot format for the solution output. */
1650+
TECPLOT_BINARY, /*!< \brief Tecplot binary format for the solution output. */
1651+
SURFACE_TECPLOT_ASCII, /*!< \brief Tecplot format for the solution output. */
1652+
SURFACE_TECPLOT_BINARY, /*!< \brief Tecplot binary format for the solution output. */
1653+
CSV, /*!< \brief Comma-separated values format for the solution output. */
1654+
SURFACE_CSV, /*!< \brief Comma-separated values format for the solution output. */
1655+
PARAVIEW_ASCII, /*!< \brief Paraview ASCII format for the solution output. */
1656+
PARAVIEW_LEGACY_BINARY, /*!< \brief Paraview binary format for the solution output. */
1657+
SURFACE_PARAVIEW_ASCII, /*!< \brief Paraview ASCII format for the solution output. */
1658+
SURFACE_PARAVIEW_LEGACY_BINARY, /*!< \brief Paraview binary format for the solution output. */
1659+
MESH, /*!< \brief SU2 mesh format. */
1660+
RESTART_BINARY, /*!< \brief SU2 binary restart format. */
1661+
RESTART_ASCII, /*!< \brief SU2 ASCII restart format. */
1662+
PARAVIEW_XML, /*!< \brief Paraview XML with binary data format */
1663+
SURFACE_PARAVIEW_XML, /*!< \brief Surface Paraview XML with binary data format */
1664+
PARAVIEW_MULTIBLOCK, /*!< \brief Paraview XML Multiblock */
1665+
CGNS, /*!< \brief CGNS format. */
1666+
SURFACE_CGNS, /*!< \brief CGNS format. */
1667+
STL_ASCII, /*!< \brief STL ASCII format for surface solution output. */
1668+
STL_BINARY, /*!< \brief STL binary format for surface solution output. Not implemented yet. */
1669+
};
1670+
static const MapType<std::string, OUTPUT_TYPE> Output_Map = {
1671+
MakePair("TECPLOT_ASCII", OUTPUT_TYPE::TECPLOT_ASCII)
1672+
MakePair("TECPLOT", OUTPUT_TYPE::TECPLOT_BINARY)
1673+
MakePair("SURFACE_TECPLOT_ASCII", OUTPUT_TYPE::SURFACE_TECPLOT_ASCII)
1674+
MakePair("SURFACE_TECPLOT", OUTPUT_TYPE::SURFACE_TECPLOT_BINARY)
1675+
MakePair("CSV", OUTPUT_TYPE::CSV)
1676+
MakePair("SURFACE_CSV", OUTPUT_TYPE::SURFACE_CSV)
1677+
MakePair("PARAVIEW_ASCII", OUTPUT_TYPE::PARAVIEW_ASCII)
1678+
MakePair("PARAVIEW_LEGACY", OUTPUT_TYPE::PARAVIEW_LEGACY_BINARY)
1679+
MakePair("SURFACE_PARAVIEW_ASCII", OUTPUT_TYPE::SURFACE_PARAVIEW_ASCII)
1680+
MakePair("SURFACE_PARAVIEW_LEGACY", OUTPUT_TYPE::SURFACE_PARAVIEW_LEGACY_BINARY)
1681+
MakePair("PARAVIEW", OUTPUT_TYPE::PARAVIEW_XML)
1682+
MakePair("SURFACE_PARAVIEW", OUTPUT_TYPE::SURFACE_PARAVIEW_XML)
1683+
MakePair("PARAVIEW_MULTIBLOCK", OUTPUT_TYPE::PARAVIEW_MULTIBLOCK)
1684+
MakePair("MESH", OUTPUT_TYPE::MESH)
1685+
MakePair("RESTART_ASCII", OUTPUT_TYPE::RESTART_ASCII)
1686+
MakePair("RESTART", OUTPUT_TYPE::RESTART_BINARY)
1687+
MakePair("CGNS", OUTPUT_TYPE::CGNS)
1688+
MakePair("SURFACE_CGNS", OUTPUT_TYPE::SURFACE_CGNS)
1689+
MakePair("STL_ASCII", OUTPUT_TYPE::STL_ASCII)
1690+
MakePair("STL_BINARY", OUTPUT_TYPE::STL_BINARY)
16891691
};
16901692

16911693
/*!
16921694
* \brief Return true if format is one of the Paraview options.
16931695
*/
1694-
inline bool isParaview(ENUM_OUTPUT format) {
1696+
inline bool isParaview(OUTPUT_TYPE format) {
16951697
switch(format) {
1696-
case PARAVIEW:
1697-
case PARAVIEW_BINARY:
1698-
case SURFACE_PARAVIEW:
1699-
case SURFACE_PARAVIEW_BINARY:
1700-
case PARAVIEW_XML:
1701-
case SURFACE_PARAVIEW_XML:
1702-
case PARAVIEW_MULTIBLOCK:
1698+
case OUTPUT_TYPE::PARAVIEW_ASCII:
1699+
case OUTPUT_TYPE::PARAVIEW_LEGACY_BINARY:
1700+
case OUTPUT_TYPE::SURFACE_PARAVIEW_ASCII:
1701+
case OUTPUT_TYPE::SURFACE_PARAVIEW_LEGACY_BINARY:
1702+
case OUTPUT_TYPE::PARAVIEW_XML:
1703+
case OUTPUT_TYPE::SURFACE_PARAVIEW_XML:
1704+
case OUTPUT_TYPE::PARAVIEW_MULTIBLOCK:
17031705
return true;
17041706
default:
17051707
return false;
@@ -1709,12 +1711,12 @@ inline bool isParaview(ENUM_OUTPUT format) {
17091711
/*!
17101712
* \brief Return true if format is one of the Tecplot options.
17111713
*/
1712-
inline bool isTecplot(ENUM_OUTPUT format) {
1714+
inline bool isTecplot(OUTPUT_TYPE format) {
17131715
switch(format) {
1714-
case TECPLOT:
1715-
case TECPLOT_BINARY:
1716-
case SURFACE_TECPLOT:
1717-
case SURFACE_TECPLOT_BINARY:
1716+
case OUTPUT_TYPE::TECPLOT_ASCII:
1717+
case OUTPUT_TYPE::TECPLOT_BINARY:
1718+
case OUTPUT_TYPE::SURFACE_TECPLOT_ASCII:
1719+
case OUTPUT_TYPE::SURFACE_TECPLOT_BINARY:
17181720
return true;
17191721
default:
17201722
return false;
@@ -1724,13 +1726,13 @@ inline bool isTecplot(ENUM_OUTPUT format) {
17241726
/*!
17251727
* \brief Type of solution output file formats
17261728
*/
1727-
enum ENUM_TAB_OUTPUT {
1728-
TAB_CSV = 1, /*!< \brief Comma-separated values format for the solution output. */
1729-
TAB_TECPLOT = 2 /*!< \brief Tecplot format for the solution output. */
1729+
enum class TAB_OUTPUT {
1730+
TAB_CSV, /*!< \brief Comma-separated values format for the solution output. */
1731+
TAB_TECPLOT /*!< \brief Tecplot format for the solution output. */
17301732
};
1731-
static const MapType<std::string, ENUM_TAB_OUTPUT> TabOutput_Map = {
1732-
MakePair("CSV", TAB_CSV)
1733-
MakePair("TECPLOT", TAB_TECPLOT)
1733+
static const MapType<std::string, TAB_OUTPUT> TabOutput_Map = {
1734+
MakePair("CSV", TAB_OUTPUT::TAB_CSV)
1735+
MakePair("TECPLOT", TAB_OUTPUT::TAB_TECPLOT)
17341736
};
17351737

17361738
/*!

0 commit comments

Comments
 (0)