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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -100,3 +100,6 @@ ninja

# Ignore SU2 pre-configuration timestamp created by preconfigure.py
su2preconfig.timestamp

# Clangd server files
.cache
2 changes: 1 addition & 1 deletion SU2_CFD/include/drivers/CDriver.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ class CDriver : public CDriverBase {
/*!
* \brief Deallocation routine
*/
void Postprocessing();
void Finalize();

/*!
* \brief A virtual member.
Expand Down
4 changes: 2 additions & 2 deletions SU2_CFD/include/drivers/CDriverBase.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ class CDriverBase {
/*!
* \brief A virtual member.
*/
virtual void Postprocessing(){}
virtual void Finalize(){}

/// \addtogroup PySU2
/// @{
Expand Down Expand Up @@ -446,7 +446,7 @@ class CDriverBase {
/*!
* \brief Delete containers.
*/
void CommonPostprocessing();
void CommonFinalize();

/*!
* \brief Read in the config and mesh files.
Expand Down
4 changes: 2 additions & 2 deletions SU2_CFD/src/SU2_CFD.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,9 @@ int main(int argc, char *argv[]) {

driver->StartSolver();

/*--- Postprocess all the containers, close history file, exit SU2. ---*/
/*--- Finalize solver, delete all the containers, close history file, exit SU2. ---*/

driver->Postprocessing();
driver->Finalize();

delete driver;

Expand Down
4 changes: 2 additions & 2 deletions SU2_CFD/src/drivers/CDriver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ void CDriver::SetContainers_Null(){
}


void CDriver::Postprocessing() {
void CDriver::Finalize() {

const bool wrt_perf = config_container[ZONE_0]->GetWrt_Performance();

Expand All @@ -363,7 +363,7 @@ void CDriver::Postprocessing() {
}

if (rank == MASTER_NODE)
cout << endl <<"------------------------- Solver Postprocessing -------------------------" << endl;
cout << endl <<"------------------------- Finalizing Solver -------------------------" << endl;

for (iZone = 0; iZone < nZone; iZone++) {
for (iInst = 0; iInst < nInst[iZone]; iInst++){
Expand Down
2 changes: 1 addition & 1 deletion SU2_CFD/src/drivers/CDriverBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ void CDriverBase::SetContainers_Null() {
}
}

void CDriverBase::CommonPostprocessing() {
void CDriverBase::CommonFinalize() {

if (numerics_container != nullptr) {
for (iZone = 0; iZone < nZone; iZone++) {
Expand Down
2 changes: 1 addition & 1 deletion SU2_DEF/include/drivers/CDeformationDriver.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class CDeformationDriver : public CDriverBase {
/*!
* \brief Deallocation routine.
*/
void Postprocessing();
void Finalize();

/*!
* \brief Communicate boundary mesh displacements.
Expand Down
2 changes: 1 addition & 1 deletion SU2_DEF/include/drivers/CDiscAdjDeformationDriver.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class CDiscAdjDeformationDriver : public CDriverBase {
/*!
* \brief Deallocation routine.
*/
void Postprocessing();
void Finalize();

protected:
/*!
Expand Down
2 changes: 1 addition & 1 deletion SU2_DEF/src/SU2_DEF.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ int main(int argc, char* argv[]) {

/*--- Postprocess all the containers, close history file, and exit SU2. ---*/

driver.Postprocessing();
driver.Finalize();

/*--- Finalize MPI parallelization. ---*/

Expand Down
11 changes: 5 additions & 6 deletions SU2_DEF/src/drivers/CDeformationDriver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -535,9 +535,8 @@ void CDeformationDriver::Output() {
}
}

void CDeformationDriver::Postprocessing() {
if (rank == MASTER_NODE)
cout << "\n------------------------- Solver Postprocessing -------------------------" << endl;
void CDeformationDriver::Finalize() {
if (rank == MASTER_NODE) cout << "\n------------------------- Finalize Solver -------------------------" << endl;

if (driver_config->GetDeform_Mesh()) {
for (iZone = 0; iZone < nZone; iZone++) {
Expand All @@ -550,7 +549,7 @@ void CDeformationDriver::Postprocessing() {
delete[] numerics_container[iZone][INST_0][MESH_0];
delete[] numerics_container[iZone][INST_0];
}
/*--- The remaining levels in the container are deleted in CommonPostprocessing ---*/
/*--- The remaining levels in the container are deleted in CommonFinalize ---*/
}

for (iZone = 0; iZone < nZone; iZone++) {
Expand All @@ -559,11 +558,11 @@ void CDeformationDriver::Postprocessing() {
delete[] solver_container[iZone][INST_0][MESH_0];
delete[] solver_container[iZone][INST_0];
}
/*--- The remaining levels in the container are deleted in CommonPostprocessing ---*/
/*--- The remaining levels in the container are deleted in CommonFinalize ---*/
}
}

CommonPostprocessing();
CommonFinalize();

/*--- Exit the solver cleanly. ---*/

Expand Down
7 changes: 3 additions & 4 deletions SU2_DEF/src/drivers/CDiscAdjDeformationDriver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -367,16 +367,15 @@ void CDiscAdjDeformationDriver::Run() {
OutputGradient(Gradient, config_container[ZONE_0], Gradient_file);
}

void CDiscAdjDeformationDriver::Postprocessing() {
void CDiscAdjDeformationDriver::Finalize() {
for (auto iDV = 0u; iDV < config_container[ZONE_0]->GetnDV(); iDV++) {
delete[] Gradient[iDV];
}
delete[] Gradient;

if (rank == MASTER_NODE)
cout << "\n------------------------- Solver Postprocessing -------------------------" << endl;
if (rank == MASTER_NODE) cout << "\n------------------------- Finalize Solver -------------------------" << endl;

CommonPostprocessing();
CommonFinalize();

/*--- Exit the solver cleanly. ---*/

Expand Down
2 changes: 1 addition & 1 deletion SU2_DOT/src/SU2_DOT.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ int main(int argc, char* argv[]) {

/*--- Postprocess all the containers, close history file, and exit SU2. ---*/

driver.Postprocessing();
driver.Finalize();

/*--- Finalize AD. ---*/

Expand Down
2 changes: 1 addition & 1 deletion SU2_GEO/src/SU2_GEO.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1429,7 +1429,7 @@ int main(int argc, char* argv[]) {
}

if (rank == MASTER_NODE)
cout << endl << "------------------------- Solver Postprocessing -------------------------" << endl;
cout << endl << "------------------------- Finalize Solver -------------------------" << endl;

delete[] Xcoord_Airfoil;
delete[] Ycoord_Airfoil;
Expand Down
4 changes: 2 additions & 2 deletions SU2_PY/SU2_CFD.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,8 @@ def main():
# Launch the solver for the entire computation
SU2Driver.StartSolver()

# Postprocess the solver and exit cleanly
SU2Driver.Postprocessing()
# Finalize the solver and exit cleanly
SU2Driver.Finalize()

if SU2Driver != None:
del SU2Driver
Expand Down
2 changes: 1 addition & 1 deletion SU2_PY/fsi_computation.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ def main():
comm.barrier()

# --- Exit cleanly the fluid and solid solvers --- #
FluidSolver.Postprocessing()
FluidSolver.Finalize()
if myid == rootProcess:
SolidSolver.exit()

Expand Down
2 changes: 1 addition & 1 deletion SU2_SOL/src/SU2_SOL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -685,7 +685,7 @@ int main(int argc, char* argv[]) {
config = nullptr;

if (rank == MASTER_NODE)
cout << endl << "------------------------- Solver Postprocessing -------------------------" << endl;
cout << endl << "------------------------- Finalize Solver -------------------------" << endl;

if (geometry_container != nullptr) {
for (iZone = 0; iZone < nZone; iZone++) {
Expand Down
4 changes: 2 additions & 2 deletions TestCases/py_wrapper/deforming_bump_in_channel/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ def main():
TimeIter += 1
time += deltaT

# Postprocess the solver and exit cleanly
SU2Driver.Postprocessing()
# Finalize the solver and exit cleanly
SU2Driver.Finalize()


# Imposed deformation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ def main():
print("Sens[0]\tSens[1]\tDisp[0]\tDisp[1]\t")
print(100, 100, sens[0][0], sens[0][1], disp[0][0], disp[0][1])

# Postprocess the solver and exit cleanly
SU2Driver.Postprocessing()
# Finalize the solver and exit cleanly
SU2Driver.Finalize()

if SU2Driver != None:
del SU2Driver
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ def main():
if (iVertex == 30) and rank == 0:
print(1000,1000,iVertex, sensX, sensY, sensZ)

# Postprocess the solver and exit cleanly
SU2Driver.Postprocessing()
# Finalize the solver and exit cleanly
SU2Driver.Finalize()

if SU2Driver != None:
del SU2Driver
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,8 @@ def main():
TimeIter += 1
time += deltaT

# Postprocess the solver and exit cleanly
SU2Driver.Postprocessing()
# Finalize the solver and exit cleanly
SU2Driver.Finalize()

if SU2Driver != None:
del SU2Driver
Expand Down