Skip to content

Commit 967b62c

Browse files
authored
Merge pull request #1015 from su2code/iteration_class
Dividing Iteration Classes
2 parents da12538 + f79770e commit 967b62c

44 files changed

Lines changed: 4737 additions & 5264 deletions

Some content is hidden

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

Common/include/interface_interpolation/CInterpolatorFactory.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ namespace CInterpolatorFactory {
4444
* \param[in] verbose - If true, print information to screen.
4545
* \return Pointer to interpolator on the heap, caller is responsible for deletion.
4646
*/
47-
CInterpolator* createInterpolator(CGeometry ****geometry_container,
47+
CInterpolator* CreateInterpolator(CGeometry ****geometry_container,
4848
const CConfig* const* config,
4949
unsigned iZone, unsigned jZone,
5050
bool verbose = true);

Common/src/interface_interpolation/CInterpolatorFactory.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
#include "../../include/interface_interpolation/CSlidingMesh.hpp"
3535

3636
namespace CInterpolatorFactory {
37-
CInterpolator* createInterpolator(CGeometry ****geometry_container,
37+
CInterpolator* CreateInterpolator(CGeometry ****geometry_container,
3838
const CConfig* const* config,
3939
unsigned iZone, unsigned jZone, bool verbose) {
4040

SU2_CFD/include/SU2_CFD.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@
4343
#include "../../Common/include/grid_movement_structure.hpp"
4444
#include "../../Common/include/CConfig.hpp"
4545
#include "../include/definition_structure.hpp"
46-
#include "../include/iteration_structure.hpp"
4746
#include "../include/interfaces/CInterface.hpp"
4847

4948
using namespace std;

SU2_CFD/include/drivers/CDriver.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030

3131
#include "../../../Common/include/mpi_structure.hpp"
3232

33-
#include "../iteration_structure.hpp"
3433
#include "../integration/CIntegration.hpp"
3534
#include "../solvers/CSolver.hpp"
3635
#include "../interfaces/CInterface.hpp"
@@ -42,6 +41,8 @@ using namespace std;
4241

4342
class COutputLegacy;
4443
class CInterpolator;
44+
class CIteration;
45+
class COutput;
4546

4647
/*!
4748
* \class CDriver

SU2_CFD/include/drivers/CMultizoneDriver.hpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,5 @@ class CMultizoneDriver : public CDriver {
135135
* \brief Returns whether all specified windowed-time-averaged ouputs have been converged
136136
* \return Boolean indicating whether the problem is converged.
137137
*/
138-
inline virtual bool GetTimeConvergence() const{
139-
return driver_output->GetTimeConvergence();
140-
}
138+
virtual bool GetTimeConvergence() const;
141139
};

SU2_CFD/include/drivers/CSinglezoneDriver.hpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,10 +102,7 @@ class CSinglezoneDriver : public CDriver {
102102
* \brief Returns whether all specified windowed-time-averaged ouputs have been converged
103103
* \return Boolean indicating whether the problem is converged.
104104
*/
105-
inline virtual bool GetTimeConvergence() const{
106-
return output_container[ZONE_0]->GetTimeConvergence();
107-
}
108-
105+
virtual bool GetTimeConvergence() const;
109106

110107
/*!
111108
* \brief Runtime_Parsing

SU2_CFD/include/integration/CIntegrationFactory.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,13 @@ class CIntegrationFactory{
4646
* \param[in] solver_container - The solver container
4747
* \return - Pointer to the allocated integration container
4848
*/
49-
static CIntegration** createIntegrationContainer(ENUM_MAIN_SOLVER kindSolver, const CSolver * const *solver_container);
49+
static CIntegration** CreateIntegrationContainer(ENUM_MAIN_SOLVER kindSolver, const CSolver * const *solver_container);
5050

5151
/*!
5252
* \brief Create a new integration instance based on the current sub solver
5353
* \param[in] integrationType - The integration type
5454
* \return - Pointer to the allocated integration instance
5555
*/
56-
static CIntegration* createIntegration(INTEGRATION_TYPE integrationType);
56+
static CIntegration* CreateIntegration(INTEGRATION_TYPE integrationType);
5757

5858
};
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
/*!
2+
* \file CAdjFluidIteration.hpp
3+
* \brief Headers of the iteration classes used by SU2_CFD.
4+
* Each CIteration class represents an available physics package.
5+
* \author F. Palacios, T. Economon
6+
* \version 7.0.5 "Blackbird"
7+
*
8+
* SU2 Project Website: https://su2code.github.io
9+
*
10+
* The SU2 Project is maintained by the SU2 Foundation
11+
* (http://su2foundation.org)
12+
*
13+
* Copyright 2012-2020, SU2 Contributors (cf. AUTHORS.md)
14+
*
15+
* SU2 is free software; you can redistribute it and/or
16+
* modify it under the terms of the GNU Lesser General Public
17+
* License as published by the Free Software Foundation; either
18+
* version 2.1 of the License, or (at your option) any later version.
19+
*
20+
* SU2 is distributed in the hope that it will be useful,
21+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
22+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
23+
* Lesser General Public License for more details.
24+
*
25+
* You should have received a copy of the GNU Lesser General Public
26+
* License along with SU2. If not, see <http://www.gnu.org/licenses/>.
27+
*/
28+
29+
#pragma once
30+
31+
#include "CFluidIteration.hpp"
32+
33+
/*!
34+
* \class CAdjFluidIteration
35+
* \brief Class for driving an iteration of the adjoint fluid system.
36+
* \author T. Economon
37+
*/
38+
class CAdjFluidIteration : public CFluidIteration {
39+
public:
40+
/*!
41+
* \brief Constructor of the class.
42+
* \param[in] config - Definition of the particular problem.
43+
*/
44+
explicit CAdjFluidIteration(const CConfig *config) : CFluidIteration(config) {}
45+
46+
/*!
47+
* \brief Preprocessing to prepare for an iteration of the physics.
48+
* \param[in] ??? - Description here.
49+
*/
50+
void Preprocess(COutput* output, CIntegration**** integration, CGeometry**** geometry, CSolver***** solver,
51+
CNumerics****** numerics, CConfig** config, CSurfaceMovement** surface_movement,
52+
CVolumetricMovement*** grid_movement, CFreeFormDefBox*** FFDBox, unsigned short val_iZone,
53+
unsigned short val_iInst) override;
54+
55+
/*!
56+
* \brief Perform a single iteration of the adjoint fluid system.
57+
* \param[in] output - Pointer to the COutput class.
58+
* \param[in] integration - Container vector with all the integration methods.
59+
* \param[in] geometry - Geometrical definition of the problem.
60+
* \param[in] solver - Container vector with all the solutions.
61+
* \param[in] numerics - Description of the numerical method (the way in which the equations are solved).
62+
* \param[in] config - Definition of the particular problem.
63+
* \param[in] surface_movement - Surface movement classes of the problem.
64+
* \param[in] grid_movement - Volume grid movement classes of the problem.
65+
* \param[in] FFDBox - FFD FFDBoxes of the problem.
66+
*/
67+
void Iterate(COutput* output, CIntegration**** integration, CGeometry**** geometry, CSolver***** solver,
68+
CNumerics****** numerics, CConfig** config, CSurfaceMovement** surface_movement,
69+
CVolumetricMovement*** grid_movement, CFreeFormDefBox*** FFDBox, unsigned short val_iZone,
70+
unsigned short val_iInst) override;
71+
72+
/*!
73+
* \brief Updates the containers for the adjoint fluid system.
74+
* \param[in] ??? - Description here.
75+
*/
76+
void Update(COutput* output, CIntegration**** integration, CGeometry**** geometry, CSolver***** solver,
77+
CNumerics****** numerics, CConfig** config, CSurfaceMovement** surface_movement,
78+
CVolumetricMovement*** grid_movement, CFreeFormDefBox*** FFDBox, unsigned short val_iZone,
79+
unsigned short val_iInst) override;
80+
};
81+

0 commit comments

Comments
 (0)