VM2D 1.14
Vortex methods for 2D flows simulation
Loading...
Searching...
No Matches
Vortex2D.h
Go to the documentation of this file.
1/*--------------------------------*- VM2D -*-----------------*---------------*\
2| ## ## ## ## #### ##### | | Version 1.14 |
3| ## ## ### ### ## ## ## ## | VM2D: Vortex Method | 2026/03/06 |
4| ## ## ## # ## ## ## ## | for 2D Flow Simulation *----------------*
5| #### ## ## ## ## ## | Open Source Code |
6| ## ## ## ###### ##### | https://www.github.com/vortexmethods/VM2D |
7| |
8| Copyright (C) 2017-2026 I. Marchevsky, K. Sokol, E. Ryatina, A. Kolganova |
9*-----------------------------------------------------------------------------*
10| File name: Vortex2D.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 VORTEX2D_H_
41#define VORTEX2D_H_
42
43#include "Point2D.h"
44
45namespace VMlib
46{
59 {
60 private:
63
65 double gam;
66
67 public:
68
69 static size_t offsPos;
70 static size_t offsGam;
71
73 Vortex2D() = default;
74
79 HD Vortex2D(const Point2D& _r, const double _g)
80 : pos(_r), gam(_g) {};
81
84
87 HD Point2D& r() { return pos; }
88
91 HD const Point2D& r() const { return pos; }
92
95 HD double& g() { return gam; }
96
99 HD const double& g() const { return gam; }
100
101 HD operator Point2D& () { return pos; }
102 HD operator const Point2D& () const { return pos; }
103
104 };
105
108
109}//namespace VMlib
110
111using VMlib::Vortex2D;
112#endif
113
Заголовочный файл с описанием класса Point2D.
Класс, опеделяющий двумерный вихревой элемент
Definition Vortex2D.h:59
Point2D pos
Радиус-вектор вихря
Definition Vortex2D.h:62
static size_t offsPos
Definition Vortex2D.h:69
double gam
Циркуляция вихря
Definition Vortex2D.h:65
Vortex2D()=default
Пустой конструктор
static size_t offsGam
Definition Vortex2D.h:70
HD ~Vortex2D()
Деструктор
Definition Vortex2D.h:83
HD const double & g() const
Функция для доступа для чтения к циркуляции вихря
Definition Vortex2D.h:99
HD Point2D & r()
Функция для доступа к радиус-вектору вихря
Definition Vortex2D.h:87
HD Vortex2D(const Point2D &_r, const double _g)
Конструктор инициализации
Definition Vortex2D.h:79
HD const Point2D & r() const
Функция для доступа для чтения к радиус-вектору вихря
Definition Vortex2D.h:91
HD double & g()
Функция для доступа к циркуляции вихря
Definition Vortex2D.h:95
Vortex2D Source2D
Определение типа данных - источника, имеющего ту же структуру, что и вихрь
Definition Vortex2D.h:107
#define HD
Definition numvector.h:63