VM2D  1.12
Vortex methods for 2D flows simulation
PairInt.h
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: PairInt.h |
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 
46 #ifndef PAIRINT_H_
47 #define PAIRINT_H_
48 
49 #include "numvector.h"
50 
51 namespace VMlib
52 {
53 
68  class PairInt : public numvector<int, 2>
69  {
70  public:
71 // /// MPI-описатель типа
72 // static MPI_Datatype mpiPairInt;
73 
75  PairInt() { };
76 
80  PairInt(const numvector<int, 2>& _r);
81 
85  PairInt(const PairInt& _r);
86 
87 #if !defined(__CUDACC__)
88  PairInt(const std::initializer_list<int>& z);
93 #endif
94 
96  ~PairInt() { };
97 
98 // /// Cоздание MPI-описателя типа
99 // static void CreateMpiType();
100  };
101 
102 
103  inline std::pair<PairInt, PairInt>& operator+=(std::pair<PairInt, PairInt>& a, const std::pair<PairInt, PairInt>& b)
104  {
105  a.first += b.first;
106  a.second += b.second;
107  return a;
108  }//operator+=(...)
109 
110 }//namespace VMlib
111 
112 using VMlib::PairInt;
113 
114 #endif
115 
Шаблонный класс, определяющий вектор фиксированной длины Фактически представляет собой массив...
Definition: numvector.h:95
Описание класса numvector.
Класс, опеделяющий пару целых чисел
Definition: PairInt.h:68
numvector< int, n > & operator+=(const numvector< P, n > &y)
Оператор "+=" прибавления другого вектора
Definition: numvector.h:204
~PairInt()
Деструктор
Definition: PairInt.h:96
PairInt()
Пустой конструктор
Definition: PairInt.h:75