Documentation a537f1bdf2
Loading...
Searching...
No Matches
CBaselineSolver.hpp
Go to the documentation of this file.
1/*!
2 * \file CBaslineSolver.hpp
3 * \brief Headers of the CBaselineSolver class
4 * \author F. Palacios, T. Economon
5 * \version 8.5.0 "Harrier"
6 *
7 * SU2 Project Website: https://su2code.github.io
8 *
9 * The SU2 Project is maintained by the SU2 Foundation
10 * (http://su2foundation.org)
11 *
12 * Copyright 2012-2026, SU2 Contributors (cf. AUTHORS.md)
13 *
14 * SU2 is free software; you can redistribute it and/or
15 * modify it under the terms of the GNU Lesser General Public
16 * License as published by the Free Software Foundation; either
17 * version 2.1 of the License, or (at your option) any later version.
18 *
19 * SU2 is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22 * Lesser General Public License for more details.
23 *
24 * You should have received a copy of the GNU Lesser General Public
25 * License along with SU2. If not, see <http://www.gnu.org/licenses/>.
26 */
27
28#include "CSolver.hpp"
29#include "../variables/CBaselineVariable.hpp"
30
31/*!
32 * \class CBaselineSolver
33 * \brief Main class for defining a baseline solution from a restart file (for output).
34 * \author F. Palacios, T. Economon.
35 */
36class CBaselineSolver final : public CSolver {
37protected:
38
39 CBaselineVariable* nodes = nullptr; /*!< \brief Variables of the baseline solver. */
40
41 /*!
42 * \brief Return nodes to allow CSolver::base_nodes to be set.
43 */
44 inline CVariable* GetBaseClassPointerToNodes() override { return nodes; }
45
46public:
47
48 /*!
49 * \brief Constructor of the class.
50 */
51 CBaselineSolver(void);
52
53 /*!
54 * \overload
55 * \param[in] geometry - Geometrical definition of the problem.
56 * \param[in] config - Definition of the particular problem.
57 */
58 CBaselineSolver(CGeometry *geometry, CConfig *config);
59
60 /*!
61 * \overload
62 * \param[in] geometry - Geometrical definition of the problem.
63 * \param[in] config - Definition of the particular problem.
64 * \param[in] nVar - Number of variables.
65 * \param[in] field_names - Vector of variable names.
66 */
67 CBaselineSolver(CGeometry *geometry, CConfig *config, unsigned short val_nvar, vector<string> field_names);
68
69 /*!
70 * \brief Destructor of the class.
71 */
72 ~CBaselineSolver(void) override;
73
74 /*!
75 * \brief Load a solution from a restart file.
76 * \param[in] geometry - Geometrical definition of the problem.
77 * \param[in] solver - Container vector with all of the solvers.
78 * \param[in] config - Definition of the particular problem.
79 * \param[in] val_iter - Current external iteration number.
80 * \param[in] val_update_geo - Flag for updating coords and grid velocity.
81 */
82 void LoadRestart(CGeometry **geometry,
83 CSolver ***solver,
84 CConfig *config,
85 int val_iter,
86 bool val_update_geo) override;
87
88 /*!
89 * \brief Load a FSI solution from a restart file.
90 * \param[in] geometry - Geometrical definition of the problem.
91 * \param[in] solver - Container vector with all of the solvers.
92 * \param[in] config - Definition of the particular problem.
93 * \param[in] val_iter - Current external iteration number.
94 */
95 void LoadRestart_FSI(CGeometry *geometry, CConfig *config, int val_iter) final;
96
97 /*!
98 * \brief Set the number of variables and string names from the restart file.
99 * \param[in] config - Definition of the particular problem.
100 */
101 void SetOutputVariables(CGeometry *geometry, CConfig *config);
102
103};
Headers of the CSolver class which is inherited by all of the other solvers.
Main class for defining a baseline solution from a restart file (for output).
Definition CBaselineSolver.hpp:36
CBaselineVariable * nodes
Variables of the baseline solver.
Definition CBaselineSolver.hpp:39
CBaselineSolver(void)
Constructor of the class.
Definition CBaselineSolver.cpp:34
~CBaselineSolver(void) override
Destructor of the class.
Definition CBaselineSolver.cpp:560
CVariable * GetBaseClassPointerToNodes() override
Return nodes to allow CSolver::base_nodes to be set.
Definition CBaselineSolver.hpp:44
void LoadRestart(CGeometry **geometry, CSolver ***solver, CConfig *config, int val_iter, bool val_update_geo) override
Load a solution from a restart file.
Definition CBaselineSolver.cpp:355
void SetOutputVariables(CGeometry *geometry, CConfig *config)
Set the number of variables and string names from the restart file.
Definition CBaselineSolver.cpp:79
void LoadRestart_FSI(CGeometry *geometry, CConfig *config, int val_iter) final
Load a FSI solution from a restart file.
Definition CBaselineSolver.cpp:491
Main class for defining the variables of a baseline solution from a restart file (for output).
Definition CBaselineVariable.hpp:37
Main class for defining the problem; basically this class reads the configuration file,...
Definition CConfig.hpp:64
Parent class for defining the geometry of the problem (complete geometry, multigrid agglomerated geom...
Definition CGeometry.hpp:75
Definition CSolver.hpp:71
Main class for defining the variables.
Definition CVariable.hpp:50