Skip to content

Commit c7b6dbf

Browse files
authored
Merge pull request #2003 from su2code/remove_legacy_output
Remove the legacy output classes
2 parents 959fec5 + c2d991f commit c7b6dbf

33 files changed

Lines changed: 211 additions & 8443 deletions

Common/include/CConfig.hpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1147,7 +1147,6 @@ class CConfig {
11471147
unsigned long *VolumeOutputFrequencies; /*!< \brief list containing the writing frequencies */
11481148

11491149
bool Multizone_Mesh; /*!< \brief Determines if the mesh contains multiple zones. */
1150-
bool SinglezoneDriver; /*!< \brief Determines if the single-zone driver is used. (TEMPORARY) */
11511150
bool Wrt_ZoneConv; /*!< \brief Write the convergence history of each individual zone to screen. */
11521151
bool Wrt_ZoneHist; /*!< \brief Write the convergence history of each individual zone to file. */
11531152
bool SpecialOutput, /*!< \brief Determines if the special output is written. */
@@ -9325,12 +9324,6 @@ class CConfig {
93259324
*/
93269325
bool GetMultizone_Residual(void) const { return Multizone_Residual; }
93279326

9328-
/*!
9329-
* \brief Check if the (new) single-zone driver is to be used (temporary)
9330-
* \return YES if the (new) single-zone driver is to be used.
9331-
*/
9332-
bool GetSinglezone_Driver(void) const { return SinglezoneDriver; }
9333-
93349327
/*!
93359328
* \brief Get the Kind of Radiation model applied.
93369329
* \return Kind of radiation model used.

Common/include/option_structure.hpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1875,9 +1875,6 @@ enum ENUM_OBJECTIVE {
18751875
SURFACE_SPECIES_0 = 58, /*!< \brief Surface Avg. Species_0 objective function definition. */
18761876
SURFACE_SPECIES_VARIANCE = 59,/*!< \brief Species Variance objective function definition. */
18771877
CUSTOM_OBJFUNC = 31, /*!< \brief Custom objective function definition. */
1878-
FLOW_ANGLE_OUT = 46,
1879-
MASS_FLOW_IN = 47,
1880-
ENTROPY_GENERATION = 50,
18811878
REFERENCE_GEOMETRY = 60, /*!< \brief Norm of displacements with respect to target geometry. */
18821879
REFERENCE_NODE = 61, /*!< \brief Objective function defined as the difference of a particular node respect to a reference position. */
18831880
VOLUME_FRACTION = 62, /*!< \brief Volume average physical density, for material-based topology optimization applications. */
@@ -1920,9 +1917,6 @@ static const MapType<std::string, ENUM_OBJECTIVE> Objective_Map = {
19201917
MakePair("SURFACE_SPECIES_0", SURFACE_SPECIES_0)
19211918
MakePair("SURFACE_SPECIES_VARIANCE", SURFACE_SPECIES_VARIANCE)
19221919
MakePair("CUSTOM_OBJFUNC", CUSTOM_OBJFUNC)
1923-
MakePair("FLOW_ANGLE_OUT", FLOW_ANGLE_OUT)
1924-
MakePair("MASS_FLOW_IN", MASS_FLOW_IN)
1925-
MakePair("ENTROPY_GENERATION", ENTROPY_GENERATION)
19261920
MakePair("REFERENCE_GEOMETRY", REFERENCE_GEOMETRY)
19271921
MakePair("REFERENCE_NODE", REFERENCE_NODE)
19281922
MakePair("VOLUME_FRACTION", VOLUME_FRACTION)

Common/src/CConfig.cpp

Lines changed: 2 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -2513,8 +2513,6 @@ void CConfig::SetConfig_Options() {
25132513
addDoubleOption("TIME_STEP", Time_Step, 0.0);
25142514
/* DESCRIPTION: Total Physical Time for time-domain problems (s) */
25152515
addDoubleOption("MAX_TIME", Max_Time, 1.0);
2516-
/* DESCRIPTION: Determines if the single-zone driver is used. (TEMPORARY) */
2517-
addBoolOption("SINGLEZONE_DRIVER", SinglezoneDriver, true);
25182516
/* DESCRIPTION: Determines if the special output is written out */
25192517
addBoolOption("SPECIAL_OUTPUT", SpecialOutput, false);
25202518

@@ -2987,52 +2985,8 @@ void CConfig::SetConfig_Parsing(istream& config_buffer){
29872985
newString.append(": invalid option name");
29882986
newString.append(". Check current SU2 options in config_template.cfg.");
29892987
newString.append("\n");
2990-
if (!option_name.compare("RELAXATION_FACTOR_ADJFLOW"))
2991-
newString.append("Option RELAXATION_FACTOR_ADJFLOW is now RELAXATION_FACTOR_ADJOINT, "
2992-
"and it also applies to discrete adjoint problems.\n\n");
2993-
else if (!option_name.compare("WRT_MESH_QUALITY"))
2994-
newString.append("WRT_MESH_QUALITY is deprecated. Use VOLUME_OUTPUT= (MESH_QUALITY, ...) instead.\n\n");
2995-
else if (!option_name.compare("VISUALIZE_SURFACE_DEF"))
2996-
newString.append("VISUALIZE_SURFACE_DEF is deprecated. Simply add a surface format to OUTPUT_FILES.\n\n");
2997-
else if (!option_name.compare("VISUALIZE_VOLUME_DEF"))
2998-
newString.append("VISUALIZE_VOLUME_DEF is deprecated. Simply add a volume format to OUTPUT_FILES.\n\n");
2999-
else if (!option_name.compare("WRT_BINARY_RESTART"))
3000-
newString.append("WRT_BINARY_RESTART is deprecated. The type of restart is determined from the OUTPUT_FILES list.\n\n");
3001-
else if (!option_name.compare("WRT_RESIDUALS"))
3002-
newString.append("WRT_RESIDUALS is deprecated. Use VOLUME_OUTPUT= ( RESIDUAL, ... ) instead.\n\n");
3003-
else if (!option_name.compare("WRT_LIMITERS"))
3004-
newString.append("WRT_LIMITERS is deprecated. Use VOLUME_OUTPUT= ( LIMITER, ... ) instead.\n\n");
3005-
else if (!option_name.compare("WRT_CON_FREQ"))
3006-
newString.append("WRT_CON_FREQ is deprecated. Use SCREEN_WRT_FREQ_INNER or SCREEN_WRT_FREQ_OUTER for multizone cases instead.\n\n");
3007-
else if (!option_name.compare("WRT_CON_FREQ_DUALTIME"))
3008-
newString.append("WRT_CON_FREQ_DUALTIME is deprecated. Use SCREEN_WRT_FREQ_TIME instead.\n\n");
3009-
else if (!option_name.compare("WRT_SRF_SOL"))
3010-
newString.append("WRT_SRF_SOL is deprecated. Simply add a surface format to OUTPUT_FILES.\n\n");
3011-
else if (!option_name.compare("WRT_CSV_SOL"))
3012-
newString.append("WRT_CSV_SOL is deprecated. Simply add a CSV format to OUTPUT_FILES.\n\n");
3013-
else if (!option_name.compare("WRT_SOL_FREQ"))
3014-
newString.append("WRT_SOL_FREQ is deprecated. Use OUTPUT_WRT_FREQ instead.\n\n");
3015-
else if (!option_name.compare("WRT_SOL_FREQ_DUALTIME"))
3016-
newString.append("WRT_SOL_FREQ_DUALTIME is deprecated. Use OUTPUT_WRT_FREQ instead.\n\n");
3017-
else if (!option_name.compare("UNST_RESTART_ITER"))
3018-
newString.append("UNST_RESTART_ITER is deprecated. Use RESTART_ITER instead.\n\n");
3019-
else if (!option_name.compare("DYN_RESTART_ITER"))
3020-
newString.append("DYN_RESTART_ITER is deprecated. Use RESTART_ITER instead.\n\n");
3021-
else if (!option_name.compare("CONV_CRITERIA"))
3022-
newString.append("CONV_CRITERIA is deprecated. SU2 will choose the criteria automatically based on the CONV_FIELD.\n"
3023-
"RESIDUAL for any RMS_* BGS_* value. CAUCHY for coefficients like DRAG etc.\n\n");
3024-
else if (!option_name.compare("THERMAL_DIFFUSIVITY"))
3025-
newString.append("THERMAL_DIFFUSIVITY is deprecated. See the INC_ENERGY_EQUATION options instead.\n\n");
3026-
else if (!option_name.compare("THERMAL_DIFFUSIVITY_SOLID"))
3027-
newString.append("THERMAL_DIFFUSIVITY_SOLID is deprecated. Set THERMAL_CONDUCTIVITY_CONSTANT, MATERIAL_DENSITY and SPECIFIC_HEAT_CP instead.\n\n");
3028-
else if (!option_name.compare("SOLID_THERMAL_CONDUCTIVITY"))
3029-
newString.append("SOLID_THERMAL_CONDUCTIVITY is deprecated. Use THERMAL_CONDUCTIVITY_CONSTANT instead.\n\n");
3030-
else if (!option_name.compare("SOLID_DENSITY"))
3031-
newString.append("SOLID_DENSITY is deprecated. Use MATERIAL_DENSITY instead.\n\n");
3032-
else if (!option_name.compare("SOLID_TEMPERATURE_INIT"))
3033-
newString.append("SOLID_TEMPERATURE_INIT is deprecated. Use FREESTREAM_TEMPERATURE instead.\n\n");
3034-
else if (!option_name.compare("SA_QCR"))
3035-
newString.append("SA_QCR is deprecated. Use SA_OPTIONS=QCR2000 instead.\n\n");
2988+
if (!option_name.compare("SINGLEZONE_DRIVER"))
2989+
newString.append("Option SINGLEZONE_DRIVER is deprecated, it does not have a replacement.\n\n");
30362990
else {
30372991
/*--- Find the most likely candidate for the unrecognized option, based on the length
30382992
of start and end character sequences shared by candidates and the option. ---*/
@@ -3299,8 +3253,6 @@ void CConfig::SetnZone(){
32993253
SU2_MPI::Error("Number of markers in MARKER_ZONE_INTERFACE must be a multiple of 2", CURRENT_FUNCTION);
33003254
}
33013255

3302-
SinglezoneDriver = NO;
3303-
33043256
if (Multizone_Mesh){
33053257

33063258
/*--- Get the number of zones from the mesh file --- */
@@ -8291,9 +8243,6 @@ string CConfig::GetObjFunc_Extension(string val_filename) const {
82918243
case SURFACE_SPECIES_VARIANCE: AdjExt = "_specvar"; break;
82928244
case SURFACE_MACH: AdjExt = "_mach"; break;
82938245
case CUSTOM_OBJFUNC: AdjExt = "_custom"; break;
8294-
case FLOW_ANGLE_OUT: AdjExt = "_fao"; break;
8295-
case MASS_FLOW_IN: AdjExt = "_mfi"; break;
8296-
case ENTROPY_GENERATION: AdjExt = "_entg"; break;
82978246
case REFERENCE_GEOMETRY: AdjExt = "_refgeom"; break;
82988247
case REFERENCE_NODE: AdjExt = "_refnode"; break;
82998248
case VOLUME_FRACTION: AdjExt = "_volfrac"; break;

SU2_CFD/include/drivers/CDiscAdjSinglezoneDriver.hpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,6 @@ class CDiscAdjSinglezoneDriver : public CSinglezoneDriver {
5555
COutput *direct_output;
5656
CNumerics ***numerics; /*!< \brief Container vector with all the numerics. */
5757

58-
COutputLegacy* output_legacy;
59-
6058
/*!
6159
* \brief Record one iteration of a flow iteration in within multiple zones.
6260
* \param[in] kind_recording - Type of recording (full list in ENUM_RECORDING, option_structure.hpp)

SU2_CFD/include/drivers/CDriver.hpp

Lines changed: 7 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737

3838
using namespace std;
3939

40-
class COutputLegacy;
4140
class CInterpolator;
4241
class CIteration;
4342
class COutput;
@@ -51,7 +50,6 @@ class COutput;
5150

5251
class CDriver : public CDriverBase {
5352
protected:
54-
char runtime_file_name[MAX_STRING_SIZE];
5553
su2double
5654
UsedTimeOutput; /*!< \brief Elapsed time between Start and Stop point of the timer for tracking output phase.*/
5755

@@ -66,9 +64,6 @@ class CDriver : public CDriverBase {
6664
su2double MDOFs; /*!< \brief Total number of DOFs in millions in the calculation (including ghost points).*/
6765
su2double MDOFsDomain; /*!< \brief Total number of DOFs in millions in the calculation (excluding ghost points).*/
6866

69-
ofstream** ConvHist_file; /*!< \brief Convergence history file.*/
70-
ofstream FSIHist_file; /*!< \brief FSI convergence history file.*/
71-
7267
bool StopCalc, /*!< \brief Stop computation flag.*/
7368
mixingplane, /*!< \brief mixing-plane simulation flag.*/
7469
fsi, /*!< \brief FSI simulation flag.*/
@@ -299,6 +294,13 @@ class CDriver : public CDriverBase {
299294
void PreprocessTurbomachinery(CConfig** config, CGeometry**** geometry, CSolver***** solver,
300295
CInterface*** interface);
301296

297+
/*!
298+
* \brief Ramp some simulation settings for turbomachinery problems.
299+
* \param[in] iter - Iteration for the ramp (can be outer or time depending on type of simulation).
300+
* \note TODO This is not compatible with inner iterations because they are delegated to the iteration class.
301+
*/
302+
void RampTurbomachineryValues(unsigned long iter);
303+
302304
/*!
303305
* \brief A virtual member.
304306
* \param[in] donorZone - zone in which the displacements will be predicted.
@@ -575,52 +577,6 @@ class CFluidDriver : public CDriver {
575577
void DynamicMeshUpdate(unsigned long TimeIter) override;
576578
};
577579

578-
/*!
579-
* \class CTurbomachineryDriver
580-
* \ingroup Drivers
581-
* \brief Class for driving an iteration for turbomachinery flow analysis.
582-
* \author S. Vitale
583-
*/
584-
class CTurbomachineryDriver : public CFluidDriver {
585-
private:
586-
COutputLegacy* output_legacy;
587-
588-
/*!
589-
* \brief Set Mixing Plane interface within multiple zones.
590-
*/
591-
void SetMixingPlane(unsigned short iZone);
592-
593-
/*!
594-
* \brief Set Mixing Plane interface within multiple zones.
595-
*/
596-
void SetTurboPerformance(unsigned short targetZone);
597-
598-
public:
599-
/*!
600-
* \brief Constructor of the class.
601-
* \param[in] confFile - Configuration file name.
602-
* \param[in] val_nZone - Total number of zones.
603-
* \param[in] MPICommunicator - MPI communicator for SU2.
604-
*/
605-
CTurbomachineryDriver(char* confFile, unsigned short val_nZone, SU2_Comm MPICommunicator);
606-
607-
/*!
608-
* \brief Destructor of the class.
609-
*/
610-
~CTurbomachineryDriver(void) override;
611-
612-
/*!
613-
* \brief Run a single iteration of the physics within multiple zones.
614-
*/
615-
616-
void Run() override;
617-
618-
/*!
619-
* \brief Monitor the computation.
620-
*/
621-
bool Monitor(unsigned long TimeIter) override;
622-
};
623-
624580
/*!
625581
* \class CHBDriver
626582
* \ingroup Drivers
@@ -629,7 +585,6 @@ class CTurbomachineryDriver : public CFluidDriver {
629585
*/
630586
class CHBDriver : public CFluidDriver {
631587
private:
632-
COutputLegacy* output_legacy;
633588
unsigned short nInstHB;
634589
su2double** D; /*!< \brief Harmonic Balance operator. */
635590

SU2_CFD/include/drivers/CMultizoneDriver.hpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,19 @@ class CMultizoneDriver : public CDriver {
8383
*/
8484
bool TransferData(unsigned short donorZone, unsigned short targetZone);
8585

86+
/*!
87+
* \brief Set Mixing Plane interface within multiple zones.
88+
*/
89+
void SetMixingPlane(unsigned short donorZone);
90+
91+
/*!
92+
* \brief Transfer the local turboperfomance quantities (for each blade row) from all the donorZones to the
93+
* targetZone (ZONE_0).
94+
* \note IMPORTANT: This approach of multi-zone performances rely upon the fact that turbomachinery markers follow
95+
* the natural (stator-rotor) development of the real machine.
96+
*/
97+
void SetTurboPerformance();
98+
8699
/*!
87100
* \brief Check the convergence at the outer level.
88101
*/

SU2_CFD/include/output/COutputFactory.hpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929

3030
class COutput;
3131
class CConfig;
32-
class COutputLegacy;
3332

3433
class COutputFactory{
3534

@@ -57,11 +56,4 @@ class COutputFactory{
5756
* \return - Pointer to the allocated multizone output
5857
*/
5958
static COutput* CreateMultizoneOutput(CConfig *driverConfig, CConfig** config_container, int nDim);
60-
61-
/*!
62-
* \brief Create legacy output
63-
* \param config - Pointer to the config
64-
* \return - Pointer to the allocated legacy output
65-
*/
66-
static COutputLegacy* CreateLegacyOutput(CConfig *config);
6759
};

0 commit comments

Comments
 (0)