Documentation 6b54b78464
Loading...
Searching...
No Matches
CDualGrid.hpp
Go to the documentation of this file.
1/*!
2 * \file CDualGrid.hpp
3 * \brief Headers of the main subroutines for doing the complete dual grid structure.
4 * The subroutines and functions are in the <i>CDualGrid.cpp</i> file.
5 * \author F. Palacios, T. Economon
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>
32#include <iostream>
33#include <cstdlib>
34#include <vector>
35
36#include "../../CConfig.hpp"
37
38/*!
39 * \class CDualGrid
40 * \brief Class for controlling the dual volume definition. The dual volume is compose by
41 * three main elements: points, edges, and vertices.
42 * \author F. Palacios
43 */
44class CDualGrid {
45 protected:
46 static unsigned short nDim; /*!< \brief Number of dimensions of the problem. */
47
48 public:
49 /*!
50 * \brief Constructor of the class.
51 * \param[in] val_nDim - Number of dimensions of the problem.
52 */
53 CDualGrid(unsigned short val_nDim);
54
55 /*!
56 * \brief Destructor of the class.
57 */
58 virtual ~CDualGrid(void);
59
60 /*!
61 * \brief A pure virtual member.
62 */
63 virtual su2double* GetCoord(void) = 0;
64
65 /*!
66 * \brief A pure virtual member.
67 * \param[in] val_coord - Coordinate of the point.
68 */
69 virtual void SetCoord(const su2double* val_coord) = 0;
70
71 /*!
72 * \brief A pure virtual member.
73 * \param[in] val_coord_Edge_CG - Coordinates of the centre of gravity of the edge.
74 * \param[in] val_coord_FaceElem_CG - Coordinates of the centre of gravity of the face of an element.
75 * \param[in] val_coord_Elem_CG - Coordinates of the centre of gravity of the element.
76 */
77 virtual void SetNodes_Coord(const su2double* val_coord_Edge_CG, const su2double* val_coord_FaceElem_CG,
78 const su2double* val_coord_Elem_CG) = 0;
79
80 /*!
81 * \overload
82 * \param[in] val_coord_Edge_CG - Coordinates of the centre of gravity of the edge.
83 * \param[in] val_coord_Elem_CG - Coordinates of the centre of gravity of the element.
84 */
85 virtual void SetNodes_Coord(const su2double* val_coord_Edge_CG, const su2double* val_coord_Elem_CG) = 0;
86
87 /*!
88 * \brief A pure virtual member.
89 * \param[out] val_normal - Coordinates of the normal.
90 */
91 virtual void GetNormal(su2double* val_normal) const = 0;
92
93 /*!
94 * \brief A pure virtual member.
95 */
96 virtual su2double* GetNormal(void) = 0;
97
98 /*!
99 * \brief A pure virtual member.
100 * \param[in] val_face_normal - Coordinates of the normal.
101 */
102 virtual void SetNormal(const su2double* val_face_normal) = 0;
103
104 /*!
105 * \brief A pure virtual member.
106 */
107 virtual unsigned short GetnNodes(void) const = 0;
108
109 /*!
110 * \brief A pure virtual member.
111 */
112 virtual void SetZeroValues(void) = 0;
113
114 /*!
115 * \brief A pure virtual member.
116 * \param[in] val_face_normal - Normal vector to be added.
117 */
118 virtual void AddNormal(const su2double* val_face_normal) = 0;
119};
Class for controlling the dual volume definition. The dual volume is compose by three main elements: ...
Definition CDualGrid.hpp:44
virtual su2double * GetNormal(void)=0
A pure virtual member.
virtual ~CDualGrid(void)
Destructor of the class.
virtual void AddNormal(const su2double *val_face_normal)=0
A pure virtual member.
virtual void SetZeroValues(void)=0
A pure virtual member.
virtual void SetCoord(const su2double *val_coord)=0
A pure virtual member.
virtual void SetNodes_Coord(const su2double *val_coord_Edge_CG, const su2double *val_coord_Elem_CG)=0
virtual void SetNodes_Coord(const su2double *val_coord_Edge_CG, const su2double *val_coord_FaceElem_CG, const su2double *val_coord_Elem_CG)=0
A pure virtual member.
virtual void SetNormal(const su2double *val_face_normal)=0
A pure virtual member.
virtual void GetNormal(su2double *val_normal) const =0
A pure virtual member.
static unsigned short nDim
Number of dimensions of the problem.
Definition CDualGrid.hpp:46
virtual su2double * GetCoord(void)=0
A pure virtual member.
virtual unsigned short GetnNodes(void) const =0
A pure virtual member.
passivedouble su2double
Definition code_config.hpp:181