Documentation 6b54b78464
Loading...
Searching...
No Matches
CBaselineSolver_FEM.hpp
Go to the documentation of this file.
1/*!
2 * \file CBaslineSolver_FEM.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
30/*!
31 * \class CBaselineSolver_FEM
32 * \brief Main class for defining a baseline solution from a restart file for the DG-FEM solver output.
33 * \author T. Economon.
34 * \version 8.5.0 "Harrier"
35 */
36class CBaselineSolver_FEM final : public CSolver {
37protected:
38
39 unsigned long nDOFsLocTot; /*!< \brief Total number of local DOFs, including halos. */
40 unsigned long nDOFsLocOwned; /*!< \brief Number of owned local DOFs. */
41 unsigned long nDOFsGlobal; /*!< \brief Number of global DOFs. */
42
43 unsigned long nVolElemTot; /*!< \brief Total number of local volume elements, including halos. */
44 unsigned long nVolElemOwned; /*!< \brief Number of owned local volume elements. */
45 CVolumeElementFEM *volElem; /*!< \brief Array of the local volume elements, including halos. */
46
47 vector<su2double> VecSolDOFs; /*!< \brief Vector, which stores the solution variables in all the DOFs. */
48
49 CVariable* GetBaseClassPointerToNodes() override {return nullptr;}
50
51public:
52
53 /*!
54 * \brief Constructor of the class.
55 */
57
58 /*!
59 * \overload
60 * \param[in] geometry - Geometrical definition of the problem.
61 * \param[in] config - Definition of the particular problem.
62 */
63 CBaselineSolver_FEM(CGeometry *geometry, CConfig *config);
64
65 /*!
66 * \brief Destructor of the class.
67 */
68 ~CBaselineSolver_FEM(void) override;
69
70 /*!
71 * \brief Set the number of variables and string names from the restart file.
72 * \param[in] config - Definition of the particular problem.
73 */
74 void SetOutputVariables(CGeometry *geometry, CConfig *config);
75
76 /*!
77 * \brief Load a solution from a restart file.
78 * \param[in] geometry - Geometrical definition of the problem.
79 * \param[in] solver - Container vector with all of the solvers.
80 * \param[in] config - Definition of the particular problem.
81 * \param[in] val_iter - Current external iteration number.
82 * \param[in] val_update_geo - Flag for updating coords and grid velocity.
83 */
84 void LoadRestart(CGeometry **geometry,
85 CSolver ***solver,
86 CConfig *config,
87 int val_iter,
88 bool val_update_geo) override;
89
90 /*!
91 * \brief Get a pointer to the vector of the solution degrees of freedom.
92 * \return Pointer to the vector of the solution degrees of freedom.
93 */
94 inline su2double* GetVecSolDOFs(void) override { return VecSolDOFs.data(); }
95
96};
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 the DG-FEM solver output.
Definition CBaselineSolver_FEM.hpp:36
su2double * GetVecSolDOFs(void) override
Get a pointer to the vector of the solution degrees of freedom.
Definition CBaselineSolver_FEM.hpp:94
unsigned long nVolElemOwned
Number of owned local volume elements.
Definition CBaselineSolver_FEM.hpp:44
unsigned long nDOFsLocOwned
Number of owned local DOFs.
Definition CBaselineSolver_FEM.hpp:40
CVariable * GetBaseClassPointerToNodes() override
Pure virtual function, all derived solvers MUST implement a method returning their "nodes".
Definition CBaselineSolver_FEM.hpp:49
~CBaselineSolver_FEM(void) override
Destructor of the class.
CBaselineSolver_FEM(void)
Constructor of the class.
Definition CBaselineSolver_FEM.cpp:32
void SetOutputVariables(CGeometry *geometry, CConfig *config)
Set the number of variables and string names from the restart file.
Definition CBaselineSolver_FEM.cpp:89
unsigned long nDOFsLocTot
Total number of local DOFs, including halos.
Definition CBaselineSolver_FEM.hpp:39
CVolumeElementFEM * volElem
Array of the local volume elements, including halos.
Definition CBaselineSolver_FEM.hpp:45
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_FEM.cpp:315
unsigned long nDOFsGlobal
Number of global DOFs.
Definition CBaselineSolver_FEM.hpp:41
vector< su2double > VecSolDOFs
Vector, which stores the solution variables in all the DOFs.
Definition CBaselineSolver_FEM.hpp:47
unsigned long nVolElemTot
Total number of local volume elements, including halos.
Definition CBaselineSolver_FEM.hpp:43
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
Class to store a volume element for the FEM solver.
Definition fem_geometry_structure.hpp:45
passivedouble su2double
Definition code_config.hpp:181