VM2D
1.14
Vortex methods for 2D flows simulation
Loading...
Searching...
No Matches
Point2D.cpp
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: Point2D.cpp |
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
#include <stddef.h>
41
42
#include "
Point2D.h
"
43
44
using namespace
VMlib
;
45
46
//MPI_Datatype Point2D::mpiPoint2D;
47
48
50
//Point2D::Point2D(const numvector<double, 2>& _r)
51
//{
52
// data[0] = _r[0];
53
// data[1] = _r[1];
54
//}//Point2D(...)
55
56
58
//Point2D::Point2D(const Point2D& _r)
59
//{
60
// data[0] = _r[0];
61
// data[1] = _r[1];
62
//}//Point2D(...)
63
64
65
#if !defined(__CUDACC__)
66
//Конструктор инициализации списком
67
Point2D::Point2D
(
const
std::initializer_list<double>& z)
68
{
69
for
(
size_t
i = 0; i < 2; ++i)
70
data
[i] = *(z.begin() + i);
71
}
//Point2D(...)
72
73
74
//Конструктор инициализации списком
75
Point2Df::Point2Df
(
const
std::initializer_list<float>& z)
76
{
77
for
(
size_t
i = 0; i < 2; ++i)
78
data
[i] = *(z.begin() + i);
79
}
//Point2Df(...)
80
81
//Конструктор инициализации списком
82
Point4D::Point4D
(
const
std::initializer_list<double>& z)
83
{
84
for
(
size_t
i = 0; i < 4; ++i)
85
data
[i] = *(z.begin() + i);
86
}
//Point4D(...)
87
#endif
88
89
90
92
//Point2D Point2D::rotated(const double angle) const
93
//{
94
// Point2D res;
95
// double cosa = cos(angle);
96
// double sina = sin(angle);
97
//
98
// res[0] = data[0] * cosa - data[1] * sina;
99
// res[1] = data[0] * sina + data[1] * cosa;
100
// return res;
101
//}//rotated(...)
102
103
104
// Cоздание MPI-описателя типа
105
//void Point2D::CreateMpiType()
106
//{
107
//
108
// int len[1] = { 2 };
109
// MPI_Aint pos[1] = { 0 };
110
// MPI_Datatype typ[1] = { MPI_DOUBLE };
111
//
112
// MPI_Type_create_struct(1, len, pos, typ, &mpiPoint2D);
113
// MPI_Type_commit(&mpiPoint2D);
114
//}//CreateMpiType()
Point2D.h
Заголовочный файл с описанием класса Point2D.
VMlib::Point2D::Point2D
Point2D()
Пустой конструктор
Definition
Point2D.h:143
VMlib::Point2Df::Point2Df
Point2Df()
Definition
Point2D.h:79
VMlib::Point4D::Point4D
Point4D()=default
VMlib::numvector< double, 2 >::data
double data[n]
Definition
numvector.h:101
VMlib
Definition
Mechanics2D.h:48
VMlib
Point2D
Point2D.cpp
Generated by
1.9.8