Remove the legacy output classes by pcarruscag · Pull Request #2003 · su2code/SU2 · GitHub
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions Common/include/CConfig.hpp
6 changes: 0 additions & 6 deletions Common/include/option_structure.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1875,9 +1875,6 @@ enum ENUM_OBJECTIVE {
SURFACE_SPECIES_0 = 58, /*!< \brief Surface Avg. Species_0 objective function definition. */
SURFACE_SPECIES_VARIANCE = 59,/*!< \brief Species Variance objective function definition. */
CUSTOM_OBJFUNC = 31, /*!< \brief Custom objective function definition. */
FLOW_ANGLE_OUT = 46,
MASS_FLOW_IN = 47,
ENTROPY_GENERATION = 50,
REFERENCE_GEOMETRY = 60, /*!< \brief Norm of displacements with respect to target geometry. */
REFERENCE_NODE = 61, /*!< \brief Objective function defined as the difference of a particular node respect to a reference position. */
VOLUME_FRACTION = 62, /*!< \brief Volume average physical density, for material-based topology optimization applications. */
Expand Down Expand Up @@ -1920,9 +1917,6 @@ static const MapType<std::string, ENUM_OBJECTIVE> Objective_Map = {
MakePair("SURFACE_SPECIES_0", SURFACE_SPECIES_0)
MakePair("SURFACE_SPECIES_VARIANCE", SURFACE_SPECIES_VARIANCE)
MakePair("CUSTOM_OBJFUNC", CUSTOM_OBJFUNC)
MakePair("FLOW_ANGLE_OUT", FLOW_ANGLE_OUT)
MakePair("MASS_FLOW_IN", MASS_FLOW_IN)
MakePair("ENTROPY_GENERATION", ENTROPY_GENERATION)
MakePair("REFERENCE_GEOMETRY", REFERENCE_GEOMETRY)
MakePair("REFERENCE_NODE", REFERENCE_NODE)
MakePair("VOLUME_FRACTION", VOLUME_FRACTION)
Expand Down
55 changes: 2 additions & 53 deletions Common/src/CConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2513,8 +2513,6 @@ void CConfig::SetConfig_Options() {
addDoubleOption("TIME_STEP", Time_Step, 0.0);
/* 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, true);
/* DESCRIPTION: Determines if the special output is written out */
addBoolOption("SPECIAL_OUTPUT", SpecialOutput, false);

Expand Down Expand Up @@ -2987,52 +2985,8 @@ void CConfig::SetConfig_Parsing(istream& config_buffer){
newString.append(": invalid option name");
newString.append(". Check current SU2 options in config_template.cfg.");
newString.append("\n");
if (!option_name.compare("RELAXATION_FACTOR_ADJFLOW"))
newString.append("Option RELAXATION_FACTOR_ADJFLOW is now RELAXATION_FACTOR_ADJOINT, "
"and it also applies to discrete adjoint problems.\n\n");
else if (!option_name.compare("WRT_MESH_QUALITY"))
newString.append("WRT_MESH_QUALITY is deprecated. Use VOLUME_OUTPUT= (MESH_QUALITY, ...) instead.\n\n");
else if (!option_name.compare("VISUALIZE_SURFACE_DEF"))
newString.append("VISUALIZE_SURFACE_DEF is deprecated. Simply add a surface format to OUTPUT_FILES.\n\n");
else if (!option_name.compare("VISUALIZE_VOLUME_DEF"))
newString.append("VISUALIZE_VOLUME_DEF is deprecated. Simply add a volume format to OUTPUT_FILES.\n\n");
else if (!option_name.compare("WRT_BINARY_RESTART"))
newString.append("WRT_BINARY_RESTART is deprecated. The type of restart is determined from the OUTPUT_FILES list.\n\n");
else if (!option_name.compare("WRT_RESIDUALS"))
newString.append("WRT_RESIDUALS is deprecated. Use VOLUME_OUTPUT= ( RESIDUAL, ... ) instead.\n\n");
else if (!option_name.compare("WRT_LIMITERS"))
newString.append("WRT_LIMITERS is deprecated. Use VOLUME_OUTPUT= ( LIMITER, ... ) instead.\n\n");
else if (!option_name.compare("WRT_CON_FREQ"))
newString.append("WRT_CON_FREQ is deprecated. Use SCREEN_WRT_FREQ_INNER or SCREEN_WRT_FREQ_OUTER for multizone cases instead.\n\n");
else if (!option_name.compare("WRT_CON_FREQ_DUALTIME"))
newString.append("WRT_CON_FREQ_DUALTIME is deprecated. Use SCREEN_WRT_FREQ_TIME instead.\n\n");
else if (!option_name.compare("WRT_SRF_SOL"))
newString.append("WRT_SRF_SOL is deprecated. Simply add a surface format to OUTPUT_FILES.\n\n");
else if (!option_name.compare("WRT_CSV_SOL"))
newString.append("WRT_CSV_SOL is deprecated. Simply add a CSV format to OUTPUT_FILES.\n\n");
else if (!option_name.compare("WRT_SOL_FREQ"))
newString.append("WRT_SOL_FREQ is deprecated. Use OUTPUT_WRT_FREQ instead.\n\n");
else if (!option_name.compare("WRT_SOL_FREQ_DUALTIME"))
newString.append("WRT_SOL_FREQ_DUALTIME is deprecated. Use OUTPUT_WRT_FREQ instead.\n\n");
else if (!option_name.compare("UNST_RESTART_ITER"))
newString.append("UNST_RESTART_ITER is deprecated. Use RESTART_ITER instead.\n\n");
else if (!option_name.compare("DYN_RESTART_ITER"))
newString.append("DYN_RESTART_ITER is deprecated. Use RESTART_ITER instead.\n\n");
else if (!option_name.compare("CONV_CRITERIA"))
newString.append("CONV_CRITERIA is deprecated. SU2 will choose the criteria automatically based on the CONV_FIELD.\n"
"RESIDUAL for any RMS_* BGS_* value. CAUCHY for coefficients like DRAG etc.\n\n");
else if (!option_name.compare("THERMAL_DIFFUSIVITY"))
newString.append("THERMAL_DIFFUSIVITY is deprecated. See the INC_ENERGY_EQUATION options instead.\n\n");
else if (!option_name.compare("THERMAL_DIFFUSIVITY_SOLID"))
newString.append("THERMAL_DIFFUSIVITY_SOLID is deprecated. Set THERMAL_CONDUCTIVITY_CONSTANT, MATERIAL_DENSITY and SPECIFIC_HEAT_CP instead.\n\n");
else if (!option_name.compare("SOLID_THERMAL_CONDUCTIVITY"))
newString.append("SOLID_THERMAL_CONDUCTIVITY is deprecated. Use THERMAL_CONDUCTIVITY_CONSTANT instead.\n\n");
else if (!option_name.compare("SOLID_DENSITY"))
newString.append("SOLID_DENSITY is deprecated. Use MATERIAL_DENSITY instead.\n\n");
else if (!option_name.compare("SOLID_TEMPERATURE_INIT"))
newString.append("SOLID_TEMPERATURE_INIT is deprecated. Use FREESTREAM_TEMPERATURE instead.\n\n");
else if (!option_name.compare("SA_QCR"))
newString.append("SA_QCR is deprecated. Use SA_OPTIONS=QCR2000 instead.\n\n");
if (!option_name.compare("SINGLEZONE_DRIVER"))
newString.append("Option SINGLEZONE_DRIVER is deprecated, it does not have a replacement.\n\n");
else {
/*--- Find the most likely candidate for the unrecognized option, based on the length
of start and end character sequences shared by candidates and the option. ---*/
Expand Down Expand Up @@ -3299,8 +3253,6 @@ void CConfig::SetnZone(){
SU2_MPI::Error("Number of markers in MARKER_ZONE_INTERFACE must be a multiple of 2", CURRENT_FUNCTION);
}

SinglezoneDriver = NO;

if (Multizone_Mesh){

/*--- Get the number of zones from the mesh file --- */
Expand Down Expand Up @@ -8291,9 +8243,6 @@ string CConfig::GetObjFunc_Extension(string val_filename) const {
case SURFACE_SPECIES_VARIANCE: AdjExt = "_specvar"; break;
case SURFACE_MACH: AdjExt = "_mach"; break;
case CUSTOM_OBJFUNC: AdjExt = "_custom"; break;
case FLOW_ANGLE_OUT: AdjExt = "_fao"; break;
case MASS_FLOW_IN: AdjExt = "_mfi"; break;
case ENTROPY_GENERATION: AdjExt = "_entg"; break;
case REFERENCE_GEOMETRY: AdjExt = "_refgeom"; break;
case REFERENCE_NODE: AdjExt = "_refnode"; break;
case VOLUME_FRACTION: AdjExt = "_volfrac"; break;
Expand Down
2 changes: 0 additions & 2 deletions SU2_CFD/include/drivers/CDiscAdjSinglezoneDriver.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,6 @@ class CDiscAdjSinglezoneDriver : public CSinglezoneDriver {
COutput *direct_output;
CNumerics ***numerics; /*!< \brief Container vector with all the numerics. */

COutputLegacy* output_legacy;

/*!
* \brief Record one iteration of a flow iteration in within multiple zones.
* \param[in] kind_recording - Type of recording (full list in ENUM_RECORDING, option_structure.hpp)
Expand Down
59 changes: 7 additions & 52 deletions SU2_CFD/include/drivers/CDriver.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@

using namespace std;

class COutputLegacy;
class CInterpolator;
class CIteration;
class COutput;
Expand All @@ -51,7 +50,6 @@ class COutput;

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

Expand All @@ -66,9 +64,6 @@ class CDriver : public CDriverBase {
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).*/

ofstream** ConvHist_file; /*!< \brief Convergence history file.*/
ofstream FSIHist_file; /*!< \brief FSI convergence history file.*/

bool StopCalc, /*!< \brief Stop computation flag.*/
mixingplane, /*!< \brief mixing-plane simulation flag.*/
fsi, /*!< \brief FSI simulation flag.*/
Expand Down Expand Up @@ -299,6 +294,13 @@ class CDriver : public CDriverBase {
void PreprocessTurbomachinery(CConfig** config, CGeometry**** geometry, CSolver***** solver,
CInterface*** interface);

/*!
* \brief Ramp some simulation settings for turbomachinery problems.
* \param[in] iter - Iteration for the ramp (can be outer or time depending on type of simulation).
* \note TODO This is not compatible with inner iterations because they are delegated to the iteration class.
*/
void RampTurbomachineryValues(unsigned long iter);

/*!
* \brief A virtual member.
* \param[in] donorZone - zone in which the displacements will be predicted.
Expand Down Expand Up @@ -575,52 +577,6 @@ class CFluidDriver : public CDriver {
void DynamicMeshUpdate(unsigned long TimeIter) override;
};

/*!
* \class CTurbomachineryDriver
* \ingroup Drivers
* \brief Class for driving an iteration for turbomachinery flow analysis.
* \author S. Vitale
*/
class CTurbomachineryDriver : public CFluidDriver {
private:
COutputLegacy* output_legacy;

/*!
* \brief Set Mixing Plane interface within multiple zones.
*/
void SetMixingPlane(unsigned short iZone);

/*!
* \brief Set Mixing Plane interface within multiple zones.
*/
void SetTurboPerformance(unsigned short targetZone);

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.
*/
CTurbomachineryDriver(char* confFile, unsigned short val_nZone, SU2_Comm MPICommunicator);

/*!
* \brief Destructor of the class.
*/
~CTurbomachineryDriver(void) override;

/*!
* \brief Run a single iteration of the physics within multiple zones.
*/

void Run() override;

/*!
* \brief Monitor the computation.
*/
bool Monitor(unsigned long TimeIter) override;
};

/*!
* \class CHBDriver
* \ingroup Drivers
Expand All @@ -629,7 +585,6 @@ class CTurbomachineryDriver : public CFluidDriver {
*/
class CHBDriver : public CFluidDriver {
private:
COutputLegacy* output_legacy;
unsigned short nInstHB;
su2double** D; /*!< \brief Harmonic Balance operator. */

Expand Down
13 changes: 13 additions & 0 deletions SU2_CFD/include/drivers/CMultizoneDriver.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,19 @@ class CMultizoneDriver : public CDriver {
*/
bool TransferData(unsigned short donorZone, unsigned short targetZone);

/*!
* \brief Set Mixing Plane interface within multiple zones.
*/
void SetMixingPlane(unsigned short donorZone);

/*!
* \brief Transfer the local turboperfomance quantities (for each blade row) from all the donorZones to the
* targetZone (ZONE_0).
* \note IMPORTANT: This approach of multi-zone performances rely upon the fact that turbomachinery markers follow
* the natural (stator-rotor) development of the real machine.
*/
void SetTurboPerformance();

/*!
* \brief Check the convergence at the outer level.
*/
Expand Down
8 changes: 0 additions & 8 deletions SU2_CFD/include/output/COutputFactory.hpp
Loading