Documentation 6b54b78464
Loading...
Searching...
No Matches
CSlidingInterface.hpp
Go to the documentation of this file.
1/*!
2 * \file CSlidingInterface.hpp
3 * \brief Declaration and inlines of the class to transfer conservative variables
4 * from a generic zone into another
5 * \author G. Gori Politecnico di Milano
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 "../CInterface.hpp"
32
33/*!
34 * \brief Fluid-fluid interface.
35 * \ingroup Interfaces
36 */
38public:
39 /*!
40 * \overload
41 * \param[in] val_nVar - Number of variables that need to be transferred.
42 */
43 CSlidingInterface(unsigned short val_nVar, unsigned short val_nConst);
44
45 /*!
46 * \brief Retrieve the variable that will be sent from donor mesh to target mesh.
47 * \param[in] donor_solution - Solution from the donor mesh.
48 * \param[in] donor_geometry - Geometry of the donor mesh.
49 * \param[in] donor_config - Definition of the problem at the donor mesh.
50 * \param[in] Marker_Donor - Index of the donor marker.
51 * \param[in] Vertex_Donor - Index of the donor vertex.
52 * \param[in] Point_Donor - Index of the donor point.
53 */
54 void GetDonor_Variable(CSolver *donor_solution, CGeometry *donor_geometry, const CConfig *donor_config,
55 unsigned long Marker_Donor, unsigned long Vertex_Donor, unsigned long Point_Donor) override;
56
57 /*!
58 * \brief Rotate the velocity if rotating frame is applied.
59 * \param[in] donor_config - Definition of the problem at the donor mesh.
60 * \param[in] donor_geometry - Geometry of the donor mesh.
61 * \param[in] target_config - Definition of the problem at the target mesh.
62 * \param[in] target_geometry - Geometry of the target mesh.
63 */
64 void GetDonor_Velocity_RotatingFrame(const CConfig *donor_config, CGeometry *donor_geometry,
65 const CConfig *target_config, CGeometry *target_geometry) override;
66
67 /*!
68 * \brief A virtual member, initializes the target variable for sliding mesh.
69 * \param[in] target_solution - Solution from the target mesh.
70 * \param[in] Marker_Target - Index of the target marker.
71 * \param[in] Vertex_Target - Index of the target vertex.
72 * \param[in] nDonorPoints - Number of donor points.
73 */
74 void InitializeTarget_Variable(CSolver *target_solution, unsigned long Marker_Target,
75 unsigned long Vertex_Target, unsigned short nDonorPoints) override;
76
77 /*!
78 * \brief Recovers the target variable from the buffer of su2doubles that was broadcasted.
79 * \param[in] bcastVariable - Broadcast variable.
80 * \param[in] donorCoeff - value of the donor coefficient.
81 */
82 inline void RecoverTarget_Variable(const su2double *bcastVariable, su2double donorCoeff) override {
83 for (auto iVar = 0u; iVar < nVar; iVar++) Target_Variable[iVar] = bcastVariable[iVar];
84 Target_Variable[nVar] = donorCoeff;
85 }
86
87 /*!
88 * \brief Set the variable that has been received from the target mesh into the target mesh.
89 * \param[in] target_solution - Solution from the target mesh.
90 * \param[in] target_geometry - Geometry of the target mesh.
91 * \param[in] target_config - Definition of the problem at the target mesh.
92 * \param[in] Marker_Target - Index of the target marker.
93 * \param[in] Vertex_Target - Index of the target vertex.
94 * \param[in] Point_Target - Index of the target point.
95 */
96 void SetTarget_Variable(CSolver *target_solution, CGeometry *target_geometry, const CConfig *target_config,
97 unsigned long Marker_Target, unsigned long Vertex_Target, unsigned long Point_Target) override;
98
99};
Main class for defining the problem; basically this class reads the configuration file,...
Definition CConfig.hpp:64
Parent class for defining the geometry of the problem (complete geometry, multigrid agglomerated geom...
Definition CGeometry.hpp:75
Main class for defining the physical transfer of information.
Definition CInterface.hpp:60
unsigned short nVar
Definition CInterface.hpp:78
su2double * Target_Variable
Definition CInterface.hpp:68
Fluid-fluid interface.
Definition CSlidingInterface.hpp:37
void InitializeTarget_Variable(CSolver *target_solution, unsigned long Marker_Target, unsigned long Vertex_Target, unsigned short nDonorPoints) override
A virtual member, initializes the target variable for sliding mesh.
Definition CSlidingInterface.cpp:144
void RecoverTarget_Variable(const su2double *bcastVariable, su2double donorCoeff) override
Recovers the target variable from the buffer of su2doubles that was broadcasted.
Definition CSlidingInterface.hpp:82
void SetTarget_Variable(CSolver *target_solution, CGeometry *target_geometry, const CConfig *target_config, unsigned long Marker_Target, unsigned long Vertex_Target, unsigned long Point_Target) override
Set the variable that has been received from the target mesh into the target mesh.
Definition CSlidingInterface.cpp:153
void GetDonor_Velocity_RotatingFrame(const CConfig *donor_config, CGeometry *donor_geometry, const CConfig *target_config, CGeometry *target_geometry) override
Rotate the velocity if rotating frame is applied.
Definition CSlidingInterface.cpp:48
void GetDonor_Variable(CSolver *donor_solution, CGeometry *donor_geometry, const CConfig *donor_config, unsigned long Marker_Donor, unsigned long Vertex_Donor, unsigned long Point_Donor) override
Retrieve the variable that will be sent from donor mesh to target mesh.
Definition CSlidingInterface.cpp:124
Definition CSolver.hpp:71
passivedouble su2double
Definition code_config.hpp:181