Documentation 6b54b78464
Loading...
Searching...
No Matches
CRadVariable.hpp
Go to the documentation of this file.
1/*!
2 * \file CRadVariable.hpp
3 * \brief Class for defining the variables of the radiation solver.
4 * \author Ruben Sanchez
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 "CVariable.hpp"
31
32class CRadVariable : public CVariable {
33
34private:
35
36protected:
37
39 su2vector<bool> Vol_HeatSource; /*!< \brief Volumetric heat source. */
40
41public:
42
43 /*!
44 * \brief Constructor of the class.
45 * \param[in] npoint - Number of points in the problem.
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 CRadVariable(unsigned long npoint, unsigned long ndim, unsigned long nvar, CConfig *config);
51
52 /*!
53 * \brief Destructor of the class.
54 */
55 ~CRadVariable(void) override = default;
56
57 /*!
58 * \brief Get the Radiative source term at the node
59 * \return Radiative source term for the energy equation
60 */
61 inline const su2double *GetRadiative_SourceTerm(unsigned long iPoint) const final { return Radiative_SourceTerm[iPoint];}
62
63 /*!
64 * \brief Set the Radiative source term at the node
65 * \param[in] val_RadSourceTerm - value of the radiative source term
66 */
67 inline void SetRadiative_SourceTerm(unsigned long iPoint, unsigned long iVar, su2double val_RadSourceTerm) final {
68 Radiative_SourceTerm(iPoint, iVar) = val_RadSourceTerm;
69 }
70
71 /*!
72 * \brief Get whether a volumetric heat source is to be introduced in point iPoint
73 * \return Bool, determines if this point introduces volumetric heat
74 */
75 inline bool GetVol_HeatSource(unsigned long iPoint) const final { return Vol_HeatSource(iPoint);}
76
77 /*!
78 * \brief Set as true a volumetric heat source for point iPoint
79 */
80 inline void SetVol_HeatSource(unsigned long iPoint) { Vol_HeatSource(iPoint) = true;}
81
82 /*!
83 * \brief Reset as false a volumetric heat source for all points
84 */
85 inline void ResetVol_HeatSource(void) { Vol_HeatSource = false;}
86
87};
Declaration and inlines of the parent class for defining problem variables, function definitions in f...
Main class for defining the problem; basically this class reads the configuration file,...
Definition CConfig.hpp:64
Definition CRadVariable.hpp:32
void SetRadiative_SourceTerm(unsigned long iPoint, unsigned long iVar, su2double val_RadSourceTerm) final
Set the Radiative source term at the node.
Definition CRadVariable.hpp:67
bool GetVol_HeatSource(unsigned long iPoint) const final
Get whether a volumetric heat source is to be introduced in point iPoint.
Definition CRadVariable.hpp:75
const su2double * GetRadiative_SourceTerm(unsigned long iPoint) const final
Get the Radiative source term at the node.
Definition CRadVariable.hpp:61
void ResetVol_HeatSource(void)
Reset as false a volumetric heat source for all points.
Definition CRadVariable.hpp:85
su2vector< bool > Vol_HeatSource
Volumetric heat source.
Definition CRadVariable.hpp:39
MatrixType Radiative_SourceTerm
Definition CRadVariable.hpp:38
~CRadVariable(void) override=default
Destructor of the class.
void SetVol_HeatSource(unsigned long iPoint)
Set as true a volumetric heat source for point iPoint.
Definition CRadVariable.hpp:80
Main class for defining the variables.
Definition CVariable.hpp:50
passivedouble su2double
Definition code_config.hpp:181