Documentation 6b54b78464
Loading...
Searching...
No Matches
CRadialBasisFunctionNode.hpp
Go to the documentation of this file.
1/*!
2 * \file CRadialBasisFunctionNode.hpp
3 * \brief Declaration of the RBF node class that stores nodal information for the RBF interpolation.
4 * \author F. van Steen
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#include "../code_config.hpp"
30
31/*!
32 * \class CRadialBasisFunctionNode
33 * \brief Class for defining a Radial Basis Function Node
34 * \author F. van Steen
35 */
37 protected:
38 unsigned long idx; /*!< \brief Global index. */
39 unsigned short marker_idx; /*!< \brief Marker index. */
40 unsigned long vertex_idx; /*!< \brief Vertex index. */
41
42 su2double error[3]; /*!< \brief Nodal data reduction error. */
43
44 public:
45 /*!
46 * \brief Constructor of the class.
47 * \param[in] idx_val - Local node index.
48 * \param[in] marker_val - Local marker index.
49 * \param[in] vertex_val - Local vertex index.
50 */
51 CRadialBasisFunctionNode(unsigned long idx_val, unsigned short marker_val, unsigned long vertex_val)
52 : idx(idx_val), marker_idx(marker_val), vertex_idx(vertex_val) {}
53
54 /*!
55 * \brief Returns local global index.
56 * \return Local node index.
57 */
58 inline unsigned long GetIndex() const { return idx; }
59
60 /*!
61 * \brief Returns local vertex index.
62 * \return Local vertex index.
63 */
64 inline unsigned long GetVertex() const { return vertex_idx; }
65
66 /*!
67 * \brief Returns local marker index.
68 * \return Local marker index.
69 */
70 inline unsigned short GetMarker() const { return marker_idx; }
71
72 /*!
73 * \brief Set error of the RBF node.
74 * \param val_error - Nodal error.
75 * \param nDim - Number of dimensions.
76 */
77
78 inline void SetError(const su2double* val_error, unsigned short nDim) {
79 for (auto iDim = 0u; iDim < nDim; iDim++) error[iDim] = val_error[iDim];
80 }
81
82 /*!
83 * \brief Get nodal error.
84 * \return Nodal error.
85 */
86 inline const su2double* GetError() const { return error; }
87};
Class for defining a Radial Basis Function Node.
Definition CRadialBasisFunctionNode.hpp:36
void SetError(const su2double *val_error, unsigned short nDim)
Set error of the RBF node.
Definition CRadialBasisFunctionNode.hpp:78
unsigned long idx
Global index.
Definition CRadialBasisFunctionNode.hpp:38
unsigned long vertex_idx
Vertex index.
Definition CRadialBasisFunctionNode.hpp:40
unsigned short marker_idx
Marker index.
Definition CRadialBasisFunctionNode.hpp:39
unsigned long GetVertex() const
Returns local vertex index.
Definition CRadialBasisFunctionNode.hpp:64
CRadialBasisFunctionNode(unsigned long idx_val, unsigned short marker_val, unsigned long vertex_val)
Constructor of the class.
Definition CRadialBasisFunctionNode.hpp:51
su2double error[3]
Nodal data reduction error.
Definition CRadialBasisFunctionNode.hpp:42
const su2double * GetError() const
Get nodal error.
Definition CRadialBasisFunctionNode.hpp:86
unsigned short GetMarker() const
Returns local marker index.
Definition CRadialBasisFunctionNode.hpp:70
unsigned long GetIndex() const
Returns local global index.
Definition CRadialBasisFunctionNode.hpp:58
passivedouble su2double
Definition code_config.hpp:181