Documentation 6b54b78464
Loading...
Searching...
No Matches
CUserDefinedSolution.hpp
Go to the documentation of this file.
1/*!
2 * \file CUserDefinedSolution.hpp
3 * \brief Header file for the class CUserDefinedSolution.
4 * The implementations are in the <i>CUserDefinedSolution.cpp</i> file.
5 * \author T. Economon, E. van der Weide
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 <cmath>
33
34/*!
35 * \class CUserDefinedSolution
36 * \brief Class to define the required data for a user defined solution.
37 * \author E. van der Weide, T. Economon
38 */
40 public:
41 /*!
42 * \brief Constructor of the class.
43 */
45
46 /*!
47 * \overload
48 * \param[in] val_nDim - Number of dimensions of the problem.
49 * \param[in] val_nvar - Number of variables of the problem.
50 * \param[in] val_iMesh - Multigrid level of the solver.
51 * \param[in] config - Configuration of the particular problem.
52 */
53 CUserDefinedSolution(unsigned short val_nDim, unsigned short val_nvar, unsigned short val_iMesh, CConfig* config);
54
55 /*!
56 * \brief Destructor of the class.
57 */
58 ~CUserDefinedSolution(void) override;
59
60 /*!
61 * \brief Get the exact solution at the current position and time.
62 * \param[in] val_coords - Cartesian coordinates of the current position.
63 * \param[in] val_t - Current physical time.
64 * \param[in] val_solution - Array where the exact solution is stored.
65 */
66 void GetSolution(const su2double* val_coords, const su2double val_t, su2double* val_solution) const override;
67
68 /*!
69 * \brief Get the boundary conditions state for an exact solution.
70 * \param[in] val_coords - Cartesian coordinates of the current position.
71 * \param[in] val_t - Current physical time.
72 * \param[in] val_solution - Array where the exact solution is stored.
73 */
74 void GetBCState(const su2double* val_coords, const su2double val_t, su2double* val_solution) const override;
75
76 /*!
77 * \brief Get the source term for the manufactured solution (MMS).
78 * \param[in] val_coords - Cartesian coordinates of the current position.
79 * \param[in] val_t - Current physical time.
80 * \param[in] val_solution - Array where the exact solution is stored.
81 */
82 void GetMMSSourceTerm(const su2double* val_coords, const su2double val_t, su2double* val_source) const override;
83
84 /*!
85 * \brief Whether or not this verification solution is a manufactured solution.
86 * \return - True if this is a manufactured solution and false otherwise.
87 */
88 bool IsManufacturedSolution(void) const override;
89};
Header file for the base class CVerificationSolution. The implementations are in the CVerificationSol...
Main class for defining the problem; basically this class reads the configuration file,...
Definition CConfig.hpp:64
Class to define the required data for a user defined solution.
Definition CUserDefinedSolution.hpp:39
void GetSolution(const su2double *val_coords, const su2double val_t, su2double *val_solution) const override
Get the exact solution at the current position and time.
Definition CUserDefinedSolution.cpp:55
bool IsManufacturedSolution(void) const override
Whether or not this verification solution is a manufactured solution.
Definition CUserDefinedSolution.cpp:65
void GetMMSSourceTerm(const su2double *val_coords, const su2double val_t, su2double *val_source) const override
Get the source term for the manufactured solution (MMS).
Definition CUserDefinedSolution.cpp:60
void GetBCState(const su2double *val_coords, const su2double val_t, su2double *val_solution) const override
Get the boundary conditions state for an exact solution.
Definition CUserDefinedSolution.cpp:50
CUserDefinedSolution(void)
Constructor of the class.
Definition CUserDefinedSolution.cpp:30
~CUserDefinedSolution(void) override
Destructor of the class.
Class for holding verification PDE solutions, e.g., phi = phi(x,y,z,t), used for initial conditions,...
Definition CVerificationSolution.hpp:40
passivedouble su2double
Definition code_config.hpp:181