Documentation a537f1bdf2
Loading...
Searching...
No Matches
CDiscAdjHeatIteration.hpp
Go to the documentation of this file.
1/*!
2 * \file CDiscAdjHeatIteration.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 8.5.0 "Harrier"
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-2026, 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 "CIteration.hpp"
32
33/*!
34 * \class CDiscAdjHeatIteration
35 * \ingroup DiscAdj
36 * \brief Class for driving an iteration of the discrete adjoint heat equation.
37 * \author O. Burghardt
38 */
39class CDiscAdjHeatIteration final : public CIteration {
40
41 /*!
42 * \brief load unsteady solution for unsteady problems
43 * \param[in] geometry - Geometrical definition of the problem.
44 * \param[in] solver - Container vector with all the solutions.
45 * \param[in] config - Definition of the particular problem.
46 * \param[in] val_iZone - Index of the zone.
47 * \param[in] val_iInst - Index of the instance layer.
48 * \param[in] val_DirectIter - Direct iteration to load.
49 */
50 void LoadUnsteady_Solution(CGeometry**** geometry, CSolver***** solver, CConfig** config, unsigned short val_iZone,
51 unsigned short val_iInst, int val_DirectIter);
52
53 public:
54 /*!
55 * \brief Constructor of the class.
56 * \param[in] config - Definition of the particular problem.
57 */
58 explicit CDiscAdjHeatIteration(const CConfig *config) : CIteration(config) {}
59
60 /*!
61 * \brief Perform a single iteration of the adjoint heat problem.
62 * \param[in] output - Pointer to the COutput class.
63 * \param[in] integration - Container vector with all the integration methods.
64 * \param[in] geometry - Geometrical definition of the problem.
65 * \param[in] solver - Container vector with all the solutions.
66 * \param[in] numerics - Description of the numerical method (the way in which the equations are solved).
67 * \param[in] config - Definition of the particular problem.
68 * \param[in] surface_movement - Surface movement classes of the problem.
69 * \param[in] grid_movement - Volume grid movement classes of the problem.
70 * \param[in] FFDBox - FFD FFDBoxes of the problem.
71 * \param[in] val_iZone - Index of the zone.
72 * \param[in] val_iInst - Index of the instance layer.
73 */
74 void Preprocess(COutput* output, CIntegration**** integration, CGeometry**** geometry, CSolver***** solver,
75 CNumerics****** numerics, CConfig** config, CSurfaceMovement** surface_movement,
76 CVolumetricMovement*** grid_movement, CFreeFormDefBox*** FFDBox, unsigned short val_iZone,
77 unsigned short val_iInst) override;
78
79 /*!
80 * \brief Perform a single iteration of the adjoint heat problem.
81 * \param[in] geometry - Geometrical definition of the problem.
82 * \param[in] solver - Container vector with all the solutions.
83 * \param[in] config - Definition of the particular problem.
84 * \param[in] val_iZone - Index of the zone.
85 * \param[in] val_iInst - Index of the instance.
86 * \param[in] CrossTerm - Boolean for CrossTerm.
87 */
88 void IterateDiscAdj(CGeometry**** geometry, CSolver***** solver, CConfig** config,
89 unsigned short val_iZone, unsigned short val_iInst, bool CrossTerm) override;
90
91 /*!
92 * \brief Monitors the convergence and other metrics for the discrete adjoint heat problem.
93 */
94 bool Monitor(COutput* output, CIntegration**** integration, CGeometry**** geometry, CSolver***** solver,
95 CNumerics****** numerics, CConfig** config, CSurfaceMovement** surface_movement,
96 CVolumetricMovement*** grid_movement, CFreeFormDefBox*** FFDBox, unsigned short val_iZone,
97 unsigned short val_iInst) override;
98
99 /*!
100 * \brief Registers all input variables of the fluid iteration.
101 * \param[in] solver - Container vector with all the solutions.
102 * \param[in] geometry - Geometrical definition of the problem.
103 * \param[in] config - Definition of the particular problem.
104 * \param[in] iZone - Index of the zone.
105 * \param[in] val_iInst - Index of the instance layer.
106 */
107 void InitializeAdjoint(CSolver***** solver, CGeometry**** geometry, CConfig** config, unsigned short iZone,
108 unsigned short iInst) override;
109
110 /*!
111 * \brief Registers all output variables of the fluid iteration.
112 * \param[in] solver - Container vector with all the solutions.
113 * \param[in] geometry - Geometrical definition of the problem.
114 * \param[in] config - Definition of the particular problem.
115 * \param[in] iZone - Index of the zone.
116 * \param[in] val_iInst - Index of the instance layer.
117 * \param[in] kind_recording - Kind of recording.
118 */
119 void RegisterInput(CSolver***** solver, CGeometry**** geometry, CConfig** config, unsigned short iZone,
120 unsigned short iInst, RECORDING kind_recording) override;
121
122 /*!
123 * \brief Initializes the adjoints of the output variables of the fluid iteration.
124 * \param[in] solver - Container vector with all the solutions.
125 * \param[in] geometry - Geometrical definition of the problem.
126 * \param[in] config - Definition of the particular problem.
127 * \param[in] iZone - Index of the zone.
128 * \param[in] val_iInst - Index of the instance layer.
129 */
130 void RegisterOutput(CSolver***** solver, CGeometry**** geometry, CConfig** config,
131 unsigned short iZone, unsigned short iInst) override;
132
133 /*!
134 * \brief Compute necessary variables that depend on the conservative variables or the mesh node positions
135 * (e.g. turbulent variables, normals, volumes).
136 * \param[in] solver - Container vector with all the solutions.
137 * \param[in] geometry - Geometrical definition of the problem.
138 * \param[in] config - Definition of the particular problem.
139 * \param[in] iZone - Index of the zone.
140 * \param[in] val_iInst - Index of the instance layer.
141 * \param[in] kind_recording - The kind of recording.
142 */
143 void SetDependencies(CSolver***** solver, CGeometry**** geometry, CNumerics****** numerics, CConfig** config,
144 unsigned short iZone, unsigned short iInst, RECORDING kind_recording) override;
145
146};
Headers of the iteration classes used by SU2_CFD. Each CIteration class represents an available physi...
Main class for defining the problem; basically this class reads the configuration file,...
Definition CConfig.hpp:64
Class for driving an iteration of the discrete adjoint heat equation.
Definition CDiscAdjHeatIteration.hpp:39
CDiscAdjHeatIteration(const CConfig *config)
Constructor of the class.
Definition CDiscAdjHeatIteration.hpp:58
void IterateDiscAdj(CGeometry ****geometry, CSolver *****solver, CConfig **config, unsigned short val_iZone, unsigned short val_iInst, bool CrossTerm) override
Perform a single iteration of the adjoint heat problem.
Definition CDiscAdjHeatIteration.cpp:151
void RegisterInput(CSolver *****solver, CGeometry ****geometry, CConfig **config, unsigned short iZone, unsigned short iInst, RECORDING kind_recording) override
Registers all output variables of the fluid iteration.
Definition CDiscAdjHeatIteration.cpp:171
bool Monitor(COutput *output, CIntegration ****integration, CGeometry ****geometry, CSolver *****solver, CNumerics ******numerics, CConfig **config, CSurfaceMovement **surface_movement, CVolumetricMovement ***grid_movement, CFreeFormDefBox ***FFDBox, unsigned short val_iZone, unsigned short val_iInst) override
Monitors the convergence and other metrics for the discrete adjoint heat problem.
Definition CDiscAdjHeatIteration.cpp:233
void RegisterOutput(CSolver *****solver, CGeometry ****geometry, CConfig **config, unsigned short iZone, unsigned short iInst) override
Initializes the adjoints of the output variables of the fluid iteration.
Definition CDiscAdjHeatIteration.cpp:226
void SetDependencies(CSolver *****solver, CGeometry ****geometry, CNumerics ******numerics, CConfig **config, unsigned short iZone, unsigned short iInst, RECORDING kind_recording) override
Compute necessary variables that depend on the conservative variables or the mesh node positions (e....
Definition CDiscAdjHeatIteration.cpp:199
void Preprocess(COutput *output, CIntegration ****integration, CGeometry ****geometry, CSolver *****solver, CNumerics ******numerics, CConfig **config, CSurfaceMovement **surface_movement, CVolumetricMovement ***grid_movement, CFreeFormDefBox ***FFDBox, unsigned short val_iZone, unsigned short val_iInst) override
Perform a single iteration of the adjoint heat problem.
Definition CDiscAdjHeatIteration.cpp:31
void InitializeAdjoint(CSolver *****solver, CGeometry ****geometry, CConfig **config, unsigned short iZone, unsigned short iInst) override
Registers all input variables of the fluid iteration.
Definition CDiscAdjHeatIteration.cpp:159
Class for defining the free form FFDBox structure.
Definition CFreeFormDefBox.hpp:38
Parent class for defining the geometry of the problem (complete geometry, multigrid agglomerated geom...
Definition CGeometry.hpp:75
Main class for doing the space integration, time integration, and monitoring of a system of Partial D...
Definition CIntegration.hpp:47
Parent class for defining a single iteration of a physics problem.
Definition CIteration.hpp:50
Class for defining the numerical methods.
Definition CNumerics.hpp:48
Class for writing the convergence history and to write solution data to file.
Definition COutput.hpp:68
Definition CSolver.hpp:71
Class for moving the surface numerical grid.
Definition CSurfaceMovement.hpp:38
Class for moving the volumetric numerical grid.
Definition CVolumetricMovement.hpp:37
RECORDING
Definition option_structure.hpp:2820