VM2D  1.12
Vortex methods for 2D flows simulation
Sheet2D.h
Go to the documentation of this file.
1 /*--------------------------------*- VM2D -*-----------------*---------------*\
2 | ## ## ## ## #### ##### | | Version 1.12 |
3 | ## ## ### ### ## ## ## ## | VM2D: Vortex Method | 2024/01/14 |
4 | ## ## ## # ## ## ## ## | for 2D Flow Simulation *----------------*
5 | #### ## ## ## ## ## | Open Source Code |
6 | ## ## ## ###### ##### | https://www.github.com/vortexmethods/VM2D |
7 | |
8 | Copyright (C) 2017-2024 I. Marchevsky, K. Sokol, E. Ryatina, A. Kolganova |
9 *-----------------------------------------------------------------------------*
10 | File name: Sheet2D.h |
11 | Info: Source code of VM2D |
12 | |
13 | This file is part of VM2D. |
14 | VM2D is free software: you can redistribute it and/or modify it |
15 | under the terms of the GNU General Public License as published by |
16 | the Free Software Foundation, either version 3 of the License, or |
17 | (at your option) any later version. |
18 | |
19 | VM2D is distributed in the hope that it will be useful, but WITHOUT |
20 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
21 | FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
22 | for more details. |
23 | |
24 | You should have received a copy of the GNU General Public License |
25 | along with VM2D. If not, see <http://www.gnu.org/licenses/>. |
26 \*---------------------------------------------------------------------------*/
27 
28 
40 #ifndef SHEET_H
41 #define SHEET_H
42 
43 #include <vector>
44 #include <cstring>
45 #include <memory>
46 
47 namespace VM2D
48 {
49  class World2D;
50 
61  class Sheet
62  {
63  private:
65  std::vector<double> freeVortexSheet_;
66 
68  std::vector<double> attachedVortexSheet_;
69 
71  std::vector<double> attachedSourceSheet_;
72 
73  public:
75  const World2D& W;
76 
78  const int dim;
79 
84  Sheet(const World2D& W_, int dim_);
85 
87  ~Sheet() { };
88 
92  void SetLayers(size_t np);
93 
94  size_t getSheetSize() const
95  {
96  return freeVortexSheet_.size();
97  }
98 
99  const double& freeVortexSheet(size_t n, size_t moment) const
100  {
101  return freeVortexSheet_[n*dim + moment];
102  }
103 
104  const double& attachedVortexSheet(size_t n, size_t moment) const
105  {
106  return attachedVortexSheet_[n*dim + moment];
107  }
108 
109  const double& attachedSourceSheet(size_t n, size_t moment) const
110  {
111  return attachedSourceSheet_[n*dim + moment];
112  }
113 
114  double& freeVortexSheet(size_t n, size_t moment)
115  {
116  return freeVortexSheet_[n*dim + moment];
117  }
118 
119  double& attachedVortexSheet(size_t n, size_t moment)
120  {
121  return attachedVortexSheet_[n*dim + moment];
122  }
123 
124  double& attachedSourceSheet(size_t n, size_t moment)
125  {
126  return attachedSourceSheet_[n*dim + moment];
127  }
128  };
129 
130 }//namespace VM2D
131 
132 #endif
const double & freeVortexSheet(size_t n, size_t moment) const
Definition: Sheet2D.h:99
std::vector< double > freeVortexSheet_
Список из характеристик свободного вихревого слоя на панелях
Definition: Sheet2D.h:65
const double & attachedVortexSheet(size_t n, size_t moment) const
Definition: Sheet2D.h:104
~Sheet()
Деструктор
Definition: Sheet2D.h:87
double & attachedSourceSheet(size_t n, size_t moment)
Definition: Sheet2D.h:124
double & attachedVortexSheet(size_t n, size_t moment)
Definition: Sheet2D.h:119
std::vector< double > attachedSourceSheet_
Список из характеристик присоединенного слоя источников на панелях
Definition: Sheet2D.h:71
double & freeVortexSheet(size_t n, size_t moment)
Definition: Sheet2D.h:114
Класс, опеделяющий слои на поверхности обтекаемого профиля
Definition: Sheet2D.h:61
std::vector< double > attachedVortexSheet_
Список из характеристик присоединенного вихревого слоя на панелях
Definition: Sheet2D.h:68
void SetLayers(size_t np)
Установка pазмерностей всех векторов и их обнуление
Definition: Sheet2D.cpp:60
Definition: Airfoil2D.h:45
size_t getSheetSize() const
Definition: Sheet2D.h:94
const double & attachedSourceSheet(size_t n, size_t moment) const
Definition: Sheet2D.h:109
const int dim
Число параметров в описании каждого слоя
Definition: Sheet2D.h:78
Sheet(const World2D &W_, int dim_)
Конструктор
Definition: Sheet2D.cpp:55
Класс, опеделяющий текущую решаемую задачу
Definition: World2D.h:68
const World2D & W
Константная ссылка на решаемую задачу
Definition: Sheet2D.h:75