VM2D  1.12
Vortex methods for 2D flows simulation
Point2D.cpp
Go to the documentation of this file.
1 /*--------------------------------*- VMlib -*----------------*---------------*\
2 | ## ## ## ## ## ## ## | | Version 1.12 |
3 | ## ## ### ### ## ## | VMlib: VM2D/VM3D Library | 2024/01/14 |
4 | ## ## ## # ## ## ## #### | Open Source Code *----------------*
5 | #### ## ## ## ## ## ## | https://www.github.com/vortexmethods/VM2D |
6 | ## ## ## #### ### #### | https://www.github.com/vortexmethods/VM3D |
7 | |
8 | Copyright (C) 2017-2024 Ilia Marchevsky |
9 *-----------------------------------------------------------------------------*
10 | File name: Point2D.cpp |
11 | Info: Source code of VMlib |
12 | |
13 | This file is part of VMlib. |
14 | VMLib 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 | VMlib 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 VMlib. If not, see <http://www.gnu.org/licenses/>. |
26 \*---------------------------------------------------------------------------*/
27 
28 
37 #include <stddef.h>
38 
39 #include "Point2D.h"
40 
41 using namespace VMlib;
42 
43 //MPI_Datatype Point2D::mpiPoint2D;
44 
45 
47 //Point2D::Point2D(const numvector<double, 2>& _r)
48 //{
49 // data[0] = _r[0];
50 // data[1] = _r[1];
51 //}//Point2D(...)
52 
53 
55 //Point2D::Point2D(const Point2D& _r)
56 //{
57 // data[0] = _r[0];
58 // data[1] = _r[1];
59 //}//Point2D(...)
60 
61 
62 #if !defined(__CUDACC__)
63 //Конструктор инициализации списком
64 Point2D::Point2D(const std::initializer_list<double>& z)
65 {
66  for (size_t i = 0; i < 2; ++i)
67  data[i] = *(z.begin() + i);
68 }//Point2D(...)
69 #endif
70 
72 //Point2D Point2D::rotated(const double angle) const
73 //{
74 // Point2D res;
75 // double cosa = cos(angle);
76 // double sina = sin(angle);
77 //
78 // res[0] = data[0] * cosa - data[1] * sina;
79 // res[1] = data[0] * sina + data[1] * cosa;
80 // return res;
81 //}//rotated(...)
82 
83 
84 // Cоздание MPI-описателя типа
85 //void Point2D::CreateMpiType()
86 //{
87 //
88 // int len[1] = { 2 };
89 // MPI_Aint pos[1] = { 0 };
90 // MPI_Datatype typ[1] = { MPI_DOUBLE };
91 //
92 // MPI_Type_create_struct(1, len, pos, typ, &mpiPoint2D);
93 // MPI_Type_commit(&mpiPoint2D);
94 //}//CreateMpiType()
Заголовочный файл с описанием класса Point2D.
Point2D()
Пустой конструктор
Definition: Point2D.h:85