VM2D 1.14
Vortex methods for 2D flows simulation
Loading...
Searching...
No Matches
MeasureVP2D.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: MeasureVP2D.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 MEASUREVP2D_H
41#define MEASUREVP2D_H
42
43#include <memory>
44
45#include "defs.h"
46
47namespace VM2D
48{
49 class WakeDataBase;
50 class World2D;
51
65 {
66 private:
68 std::vector<Point2D> initialPoints;
69
71 std::vector<Point2D> historyPoints;
72
74 std::vector<std::ostringstream> sstr;
77
78
79 public:
81 std::vector<Point2D> elasticPoints;
82
83 //private:
86 std::unique_ptr<WakeDataBase> wakeVP;
87
89 std::vector<Point2D> velocity;
90
92 std::vector<double> domainRadius;
93
95 std::vector<double> pressure;
96
98 //const double pInf = 1.0;
99
100 protected:
102 const World2D& W;
103
104 public:
108 MeasureVP(const World2D& W_);
109
112
116 void ReadPointsFromFile(const std::string& dir);
117 void SetPoints(const std::vector<Point2D>& points, const std::vector<Point2D>& history);
118
121 void Initialization();
122
124 void CalcPressure();
125#ifdef USE_CUDA
126 void GPUCalcPressure();
127#endif
128
130 void SaveVP();
131
133 std::vector<std::pair<Point2D, double>> GetVPinElasticPoints();
134
138 const WakeDataBase& getWakeVP() const { return *wakeVP; };
139
143 const std::vector<Point2D>& getVelocity() const { return velocity; };
144
148 std::vector<Point2D>& getNonConstVelocity() { return velocity; };
149
153 const std::vector<double>& getDomainRadius() const { return domainRadius; };
154
158 std::vector<double>& getNonConstDomainRadius() { return domainRadius; };
159
160 size_t getTotalNumberOfRealPoints() const { return initialPoints.size() + historyPoints.size(); };
161
162#if defined(USE_CUDA)
164 mutable double* devPressurePtr;
165#endif
166 };
167
168}//namespace VM2D
169
170#endif
Класс, отвечающий за вычисление поля скорости и давления в заданых точках для вывода
Definition MeasureVP2D.h:65
std::vector< Point2D > initialPoints
Точки, которые считываются из файла (давление пишется в vtk-файлы)
Definition MeasureVP2D.h:68
std::vector< double > pressure
Давление в нужных точках
Definition MeasureVP2D.h:95
void ReadPointsFromFile(const std::string &dir)
Чтение точек, в которых нужно посчитать давление и скорость
void SaveVP()
Сохранение в файл вычисленных скоростей и давлений
const World2D & W
Константная ссылка на решаемую задачу
std::vector< Point2D > historyPoints
Точки, которые считываются из файла (давление пишется в vtk и csv-файлы)
Definition MeasureVP2D.h:71
const WakeDataBase & getWakeVP() const
Возврат wakeVP.
std::unique_ptr< WakeDataBase > wakeVP
Умный указатель на точки, в которых нужно вычислять в данный момент времени Хранятся в виде "мнимой" ...
Definition MeasureVP2D.h:86
std::vector< Point2D > elasticPoints
Точки, в которых давление нужно вычислять в служебных целях (для задач гидроупругости),...
Definition MeasureVP2D.h:81
std::vector< double > domainRadius
Радиусы вихрей в нужных точках
Definition MeasureVP2D.h:92
size_t getTotalNumberOfRealPoints() const
std::vector< Point2D > & getNonConstVelocity()
Возврат velocity.
void Initialization()
Инициализация векторов для вычисления скоростей и давлений Вызывается только на тех шагах расчета,...
void SetPoints(const std::vector< Point2D > &points, const std::vector< Point2D > &history)
std::vector< std::pair< Point2D, double > > GetVPinElasticPoints()
Возврат давления в "гидроупругих" точках
const std::vector< Point2D > & getVelocity() const
Возврат velocity.
const std::vector< double > & getDomainRadius() const
Возврат domainRadius.
~MeasureVP()
Деструктор
void CalcPressure()
Расчет поля давления
std::vector< double > & getNonConstDomainRadius()
Возврат domainRadius.
std::vector< Point2D > velocity
Скорости в нужных точках
Definition MeasureVP2D.h:89
std::vector< std::ostringstream > sstr
Буферы для накопления временнОй истории сил в соответствующих точках
Definition MeasureVP2D.h:74
Класс, опеделяющий набор вихрей
Класс, опеделяющий текущую решаемую задачу
Definition World2D.h:77