Documentation 6b54b78464
Loading...
Searching...
No Matches
CAdjNSVariable.hpp
Go to the documentation of this file.
1/*!
2 * \file CAdjNSVariable.hpp
3 * \brief Main class for defining the variables of the adjoint Navier-Stokes solver.
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#pragma once
29
30#include "CAdjEulerVariable.hpp"
31
32/*!
33 * \class CAdjNSVariable
34 * \brief Main class for defining the variables of the adjoint Navier-Stokes solver.
35 * \ingroup Navier_Stokes_Equations
36 * \author F. Palacios
37 */
38class CAdjNSVariable final : public CAdjEulerVariable {
39public:
40 /*!
41 * \brief Constructor of the class.
42 * \param[in] psirho - Value of the adjoint density (initialization value).
43 * \param[in] phi - Value of the adjoint velocity (initialization value).
44 * \param[in] psie - Value of the adjoint energy (initialization value).
45 * \param[in] npoint - Number of points/nodes/vertices in the domain.
46 * \param[in] ndim - Number of dimensions of the problem.
47 * \param[in] nvar - Number of variables of the problem.
48 * \param[in] config - Definition of the particular problem.
49 */
50 CAdjNSVariable(su2double psirho, const su2double *phi, su2double psie,
51 unsigned long npoint, unsigned long ndim, unsigned long nvar, CConfig *config);
52
53 /*!
54 * \brief Destructor of the class.
55 */
56 ~CAdjNSVariable() override = default;
57
58 /*!
59 * \brief Set the value of the force projection vector on the old solution vector.
60 */
61 inline void SetVelSolutionDVector(unsigned long iPoint) override {
62 for (unsigned long iDim = 0; iDim < nDim; iDim++) Solution(iPoint,iDim+1) = ForceProj_Vector(iPoint,iDim);
63 }
64
65};
Main class for defining the variables of the adjoint Euler solver.
Main class for defining the variables of the adjoint Euler solver.
Definition CAdjEulerVariable.hpp:38
MatrixType ForceProj_Vector
Vector d.
Definition CAdjEulerVariable.hpp:41
Main class for defining the variables of the adjoint Navier-Stokes solver.
Definition CAdjNSVariable.hpp:38
~CAdjNSVariable() override=default
Destructor of the class.
void SetVelSolutionDVector(unsigned long iPoint) override
Set the value of the force projection vector on the old solution vector.
Definition CAdjNSVariable.hpp:61
Main class for defining the problem; basically this class reads the configuration file,...
Definition CConfig.hpp:64
MatrixType Solution
Solution of the problem.
Definition CVariable.hpp:55
unsigned long nDim
Number of dimension of the problem.
Definition CVariable.hpp:107
passivedouble su2double
Definition code_config.hpp:181