OpenFPM_pdata  4.1.0
Project that contain the implementation of distributed structures
EqnsStructFD.hpp
1 //
2 // Created by Abhinav Singh on 17.04.20.
3 //
4 
5 #ifndef OPENFPM_PDATA_EQNSSTRUCT_HPP
6 #define OPENFPM_PDATA_EQNSSTRUCT_HPP
7 
8 #include "Solvers/umfpack_solver.hpp"
9 #include "Solvers/petsc_solver.hpp"
10 
12 struct equations2d1 {
13 
15  static const unsigned int dims=2;
17  static const unsigned int nvar=1;
18 
20  static const bool boundary[];
21 
23  typedef double stype;
24 
27 
30 
33 
35 };
36 
37 const bool equations2d1::boundary[] = {NON_PERIODIC,NON_PERIODIC};
38 
39 struct equations2d2 {
41  static const unsigned int dims = 2;
43  static const unsigned int nvar = 2;
44 
46  static const bool boundary[];
47 
49  typedef double stype;
50 
53 
56 
59 
61 };
62 const bool equations2d2::boundary[]={NON_PERIODIC,NON_PERIODIC};
63 
64 struct equations2d1p {
66  static const unsigned int dims = 2;
68  static const unsigned int nvar = 1;
69 
71  static const bool boundary[];
72 
74  typedef double stype;
75 
78 
81 
84 
86 };
87 const bool equations2d1p::boundary[]={PERIODIC,PERIODIC};
88 
89 struct equations2d2p {
91  static const unsigned int dims = 2;
93  static const unsigned int nvar = 2;
94 
96  static const bool boundary[];
97 
99  typedef double stype;
100 
103 
106 
109 
111 };
112 const bool equations2d2p::boundary[]={PERIODIC,PERIODIC};
113 
114 struct equations2d3p {
116  static const unsigned int dims = 2;
118  static const unsigned int nvar = 3;
119 
121  static const bool boundary[];
122 
124  typedef double stype;
125 
128 
131 
134 
136 };
137 const bool equations2d3p::boundary[]={PERIODIC,PERIODIC};
138 
139 
140 struct equations2d3 {
142  static const unsigned int dims = 2;
144  static const unsigned int nvar = 3;
145 
147  static const bool boundary[];
148 
150  typedef double stype;
151 
154 
157 
160 
162 };
163 const bool equations2d3::boundary[]={NON_PERIODIC,NON_PERIODIC};
164 
165 struct equations2d4 {
167  static const unsigned int dims = 2;
169  static const unsigned int nvar = 4;
170 
172  static const bool boundary[];
173 
175  typedef double stype;
176 
179 
182 
185 
187 };
188 const bool equations2d4::boundary[]={NON_PERIODIC,NON_PERIODIC};
189 
190 
191 struct equations3d3 {
193  static const unsigned int dims = 3;
195  static const unsigned int nvar = 3;
196 
198  static const bool boundary[];
199 
201  typedef double stype;
202 
205 
208 
211 
213 };
214 const bool equations3d3::boundary[]={NON_PERIODIC,NON_PERIODIC,NON_PERIODIC};
215 
216 struct equations3d1 {
218  static const unsigned int dims = 3;
220  static const unsigned int nvar = 1;
221 
223  static const bool boundary[];
224 
226  typedef double stype;
227 
230 
233 
236 
238 };
239 const bool equations3d1::boundary[]={NON_PERIODIC,NON_PERIODIC,NON_PERIODIC};
240 
241 
243 struct equations2d1E {
244 
246  static const unsigned int dims=2;
248  static const unsigned int nvar=1;
249 
251  static const bool boundary[];
252 
254  typedef double stype;
255 
258 
261 
264 
266 };
267 const bool equations2d1E::boundary[]={NON_PERIODIC,NON_PERIODIC};
268 
269 struct equations2d2E {
271  static const unsigned int dims = 2;
273  static const unsigned int nvar = 2;
274 
276  static const bool boundary[];
277 
279  typedef double stype;
280 
283 
286 
289 
291 };
292 const bool equations2d2E::boundary[]={NON_PERIODIC,NON_PERIODIC};
293 
294 struct equations2d3E {
296  static const unsigned int dims = 2;
298  static const unsigned int nvar = 3;
299 
301  static const bool boundary[];
302 
304  typedef double stype;
305 
308 
311 
314 
316 };
317 const bool equations2d3E::boundary[]={NON_PERIODIC,NON_PERIODIC};
318 
319 struct equations2d4E {
321  static const unsigned int dims = 2;
323  static const unsigned int nvar = 4;
324 
326  static const bool boundary[];
327 
329  typedef double stype;
330 
333 
336 
339 
341 };
342 const bool equations2d4E::boundary[]={NON_PERIODIC,NON_PERIODIC};
343 
344 
345 
346 struct equations2d1pE {
348  static const unsigned int dims = 2;
350  static const unsigned int nvar = 1;
351 
353  static const bool boundary[];
354 
356  typedef double stype;
357 
360 
363 
366 
368 };
369 const bool equations2d1pE::boundary[]={PERIODIC,PERIODIC};
370 
371 
372 struct equations2d2pE {
374  static const unsigned int dims = 2;
376  static const unsigned int nvar = 2;
377 
379  static const bool boundary[];
380 
382  typedef double stype;
383 
386 
389 
392 
394 };
395 
396 const bool equations2d2pE::boundary[]={PERIODIC,PERIODIC};
397 
398 
399 struct equations2d3pE {
401  static const unsigned int dims = 2;
403  static const unsigned int nvar = 3;
404 
406  static const bool boundary[];
407 
409  typedef double stype;
410 
413 
416 
419 
421 };
422 const bool equations2d3pE::boundary[]={PERIODIC,PERIODIC,PERIODIC};
423 
424 
425 struct equations3d3E {
427  static const unsigned int dims = 3;
429  static const unsigned int nvar = 3;
430 
432  static const bool boundary[];
433 
435  typedef double stype;
436 
439 
442 
445 
447 };
448 
449 const bool equations3d3E::boundary[]={NON_PERIODIC, NON_PERIODIC,NON_PERIODIC};
450 
451 struct equations3d1E {
453  static const unsigned int dims = 3;
455  static const unsigned int nvar = 1;
456 
458  static const bool boundary[];
459 
461  typedef double stype;
462 
465 
468 
471 
473 };
474 const bool equations3d1E::boundary[]={NON_PERIODIC, NON_PERIODIC,NON_PERIODIC};
475 
476 
479 
481  static const unsigned int dims=2;
483  static const unsigned int nvar=1;
484 
486  static const bool boundary[];
487 
489  typedef double stype;
490 
493 
496 
499 
501 };
502 
503 const bool equations2d1_stag::boundary[] = {NON_PERIODIC,NON_PERIODIC};
504 
505 
506 #endif //OPENFPM_PDATA_EQNSSTRUCT_HPP
static const unsigned int dims
dimensionaly of the equation ( 3D problem ...)
Definition: EqnsStruct.hpp:430
grid_dist_id< dims, double, aggregate< double > > b_part
type of base particles
static constexpr bool boundary[]
boundary at X and Y
Definition: EqnsStruct.hpp:45
static const unsigned int dims
dimensionaly of the equation ( 3D problem ...)
Definition: EqnsStruct.hpp:454
Vector< double > Vector_type
type of Vector for the linear solver
staggered_grid_dist< dims, double, aggregate< double, double, double > > b_part
type of base particles
Specify the general characteristic of system to solve.
SparseMatrix< double, int, EIGEN_BASE > SparseMatrix_type
type of SparseMatrix for the linear solver
static const unsigned int nvar
number of fields in the system
Definition: EqnsStruct.hpp:577
Vector< double > Vector_type
type of Vector for the linear solver
Vector< double, PETSC_BASE > Vector_type
type of Vector for the linear solver
Vector< double, PETSC_BASE > Vector_type
type of Vector for the linear solver
SparseMatrix< double, int, EIGEN_BASE > SparseMatrix_type
type of SparseMatrix for the linear solver
static constexpr bool boundary[]
boundary at X and Y
Definition: EqnsStruct.hpp:119
grid_dist_id< dims, double, aggregate< double > > b_part
type of base particles
Sparse Matrix implementation stub object when OpenFPM is compiled with no linear algebra support.
Definition: Vector.hpp:39
static const unsigned int nvar
number of fields in the system
Definition: EqnsStruct.hpp:42
Specify the general characteristic of system to solve.
Definition: EqnsStruct.hpp:13
SparseMatrix< double, int, EIGEN_BASE > SparseMatrix_type
type of SparseMatrix for the linear solver
static const unsigned int dims
dimensionaly of the equation ( 3D problem ...)
Definition: EqnsStruct.hpp:211
double stype
type of space float, double, ...
grid_dist_id< dims, double, aggregate< double > > b_part
type of base particles
grid_dist_id< dims, double, aggregate< double > > b_part
type of base particles
SparseMatrix< double, int, EIGEN_BASE > SparseMatrix_type
type of SparseMatrix for the linear solver
double stype
type of space float, double, ...
static const unsigned int dims
dimensionaly of the equation ( 3D problem ...)
Definition: EqnsStruct.hpp:479
Specify the general characteristic of system to solve.
Definition: EqnsStruct.hpp:379
static const bool boundary[]
boundary at X and Y
static const unsigned int nvar
number of fields in the system
Definition: EqnsStruct.hpp:384
static constexpr bool boundary[]
boundary at X and Y
Definition: EqnsStruct.hpp:435
static const unsigned int dims
dimensionaly of the equation ( 3D problem ...)
Definition: EqnsStruct.hpp:89
grid_dist_id< dims, double, aggregate< double > > b_part
type of base particles
static constexpr bool boundary[]
boundary at X and Y
Definition: EqnsStruct.hpp:556
static const unsigned int nvar
number of fields in the system
Definition: EqnsStruct.hpp:213
static const unsigned int dims
dimensionaly of the equation ( 3D problem ...)
Definition: EqnsStruct.hpp:575
static const unsigned int nvar
number of fields in the system
Definition: EqnsStruct.hpp:529
static const unsigned int nvar
number of fields in the system
Definition: EqnsStruct.hpp:481
SparseMatrix< double, int, EIGEN_BASE > SparseMatrix_type
type of SparseMatrix for the linear solver
static const unsigned int dims
dimensionaly of the equation ( 3D problem ...)
Definition: EqnsStruct.hpp:406
stub when library compiled without eigen
grid_dist_id< dims, double, aggregate< double > > b_part
type of base particles
SparseMatrix< double, int, PETSC_BASE > SparseMatrix_type
type of SparseMatrix for the linear solver
static const unsigned int dims
dimensionaly of the equation ( 3D problem ...)
Definition: EqnsStruct.hpp:551
Vector< double, PETSC_BASE > Vector_type
type of Vector for the linear solver
static const unsigned int nvar
number of fields in the system
Definition: EqnsStruct.hpp:164
Vector< double > Vector_type
type of Vector for the linear solver
SparseMatrix< double, int, EIGEN_BASE > SparseMatrix_type
type of SparseMatrix for the linear solver
grid_dist_id< dims, double, aggregate< double > > b_part
type of base particles
static constexpr bool boundary[]
boundary at X and Y
Definition: EqnsStruct.hpp:532
static const unsigned int nvar
number of fields in the system
Vector< double > Vector_type
type of Vector for the linear solver
grid_dist_id< dims, double, aggregate< double > > b_part
type of base particles
double stype
type of space float, double, ...
Vector< double, PETSC_BASE > Vector_type
type of Vector for the linear solver
static const unsigned int nvar
number of fields in the system
Definition: EqnsStruct.hpp:505
static const unsigned int dims
dimensionaly of the equation ( 3D problem ...)
Definition: EqnsStruct.hpp:162
SparseMatrix< double, int, PETSC_BASE > SparseMatrix_type
type of SparseMatrix for the linear solver
double stype
type of space float, double, ...
static constexpr bool boundary[]
boundary at X and Y
Definition: EqnsStruct.hpp:580
double stype
type of space float, double, ...
double stype
type of space float, double, ...
double stype
type of space float, double, ...
static const unsigned int nvar
number of fields in the system
Definition: EqnsStruct.hpp:408
Sparse Matrix implementation.
This is a distributed grid.
static const unsigned int dims
dimensionaly of the equation ( 3D problem ...)
Definition: EqnsStruct.hpp:382
double stype
type of space float, double, ...
Implementation of the staggered grid.
static const unsigned int dims
dimensionaly of the equation ( 3D problem ...)
Definition: EqnsStruct.hpp:114
grid_dist_id< dims, double, aggregate< double > > b_part
type of base particles
static const unsigned int nvar
number of fields in the system
Definition: EqnsStruct.hpp:456
SparseMatrix< double, int, EIGEN_BASE > SparseMatrix_type
type of SparseMatrix for the linear solver
grid_dist_id< dims, double, aggregate< double > > b_part
type of base particles
Vector< double, PETSC_BASE > Vector_type
type of Vector for the linear solver
double stype
type of space float, double, ...
static const unsigned int dims
dimensionaly of the equation ( 3D problem ...)
Definition: EqnsStruct.hpp:527
static constexpr bool boundary[]
boundary at X and Y
Definition: EqnsStruct.hpp:167
Vector< double > Vector_type
type of Vector for the linear solver
static const unsigned int dims
dimensionaly of the equation ( 3D problem ...)
Definition: EqnsStruct.hpp:16
This class is able to do Matrix inversion in parallel with PETSC solvers.
grid_dist_id< dims, double, aggregate< double > > b_part
type of base particles
static const unsigned int dims
dimensionaly of the equation ( 3D problem ...)
Definition: EqnsStruct.hpp:503
static constexpr bool boundary[]
boundary at X and Y
Definition: EqnsStruct.hpp:387
static const unsigned int dims
dimensionaly of the equation ( 3D problem ...)
static const unsigned int nvar
number of fields in the system
Definition: EqnsStruct.hpp:116
static constexpr bool boundary[]
boundary at X and Y
Definition: EqnsStruct.hpp:94
grid_dist_id< dims, double, aggregate< double > > b_part
type of base particles
double stype
type of space float, double, ...
SparseMatrix< double, int, PETSC_BASE > SparseMatrix_type
type of SparseMatrix for the linear solver
double stype
type of space float, double, ...
static constexpr bool boundary[]
boundary at X and Y
Definition: EqnsStruct.hpp:484
Vector< double, PETSC_BASE > Vector_type
type of Vector for the linear solver
static const unsigned int nvar
number of fields in the system
Definition: EqnsStruct.hpp:67
Vector< double > Vector_type
type of Vector for the linear solver
double stype
type of space float, double, ..
SparseMatrix< double, int, PETSC_BASE > SparseMatrix_type
type of SparseMatrix for the linear solver
static const unsigned int dims
dimensionaly of the equation ( 3D problem ...)
Definition: EqnsStruct.hpp:187
grid_dist_id< dims, double, aggregate< double, double, double > > b_part
type of base particles
static constexpr bool boundary[]
boundary at X and Y
Definition: EqnsStruct.hpp:192
grid_dist_id< dims, double, aggregate< double > > b_part
type of base particles
SparseMatrix< double, int, PETSC_BASE > SparseMatrix_type
type of SparseMatrix for the linear solver
double stype
type of space float, double, ...
SparseMatrix< double, int, PETSC_BASE > SparseMatrix_type
type of SparseMatrix for the linear solver
static const unsigned int dims
dimensionaly of the equation ( 3D problem ...)
Definition: EqnsStruct.hpp:65
SparseMatrix< double, int, EIGEN_BASE > SparseMatrix_type
type of SparseMatrix for the linear solver
double stype
type of space float, double, ..
static const unsigned int dims
dimensionaly of the equation ( 3D problem ...)
Definition: EqnsStruct.hpp:138
double stype
type of space float, double, ...
Vector< double, PETSC_BASE > Vector_type
type of Vector for the linear solver
grid_dist_id< dims, double, aggregate< double > > b_part
type of base particles
double stype
type of space float, double, ...
SparseMatrix< double, int, EIGEN_BASE > SparseMatrix_type
type of SparseMatrix for the linear solver
double stype
type of space float, double, ...
double stype
type of space float, double, ...
static const unsigned int nvar
number of fields in the system
Definition: EqnsStruct.hpp:189
Vector< double > Vector_type
type of Vector for the linear solver
static const unsigned int nvar
number of fields in the system
Definition: EqnsStruct.hpp:140
static constexpr bool boundary[]
boundary at X and Y
Definition: EqnsStruct.hpp:21
static const unsigned int nvar
number of fields in the system
Definition: EqnsStruct.hpp:553
static constexpr bool boundary[]
boundary at X and Y
Definition: EqnsStruct.hpp:508
Vector< double, PETSC_BASE > Vector_type
type of Vector for the linear solver
SparseMatrix< double, int, PETSC_BASE > SparseMatrix_type
type of SparseMatrix for the linear solver
SparseMatrix< double, int, PETSC_BASE > SparseMatrix_type
type of SparseMatrix for the linear solver
static constexpr bool boundary[]
boundary at X and Y
Definition: EqnsStruct.hpp:216
grid_dist_id< dims, double, aggregate< double > > b_part
type of base particles
static constexpr bool boundary[]
boundary at X and Y
Definition: EqnsStruct.hpp:411
static const unsigned int nvar
number of fields in the system
Definition: EqnsStruct.hpp:432
static constexpr bool boundary[]
boundary at X and Y
Definition: EqnsStruct.hpp:459
grid_dist_id< dims, double, aggregate< double > > b_part
type of base particles
Vector< double > Vector_type
type of Vector for the linear solver
grid_dist_id< dims, double, aggregate< double > > b_part
type of base particles
SparseMatrix< double, int, PETSC_BASE > SparseMatrix_type
type of SparseMatrix for the linear solver
static const unsigned int nvar
number of fields in the system
Definition: EqnsStruct.hpp:91
double stype
type of space float, double, ...
static constexpr bool boundary[]
boundary at X and Y
Definition: EqnsStruct.hpp:70
static const unsigned int nvar
number of fields in the system
Definition: EqnsStruct.hpp:18
Vector< double, PETSC_BASE > Vector_type
type of Vector for the linear solver
Vector< double, PETSC_BASE > Vector_type
type of Vector for the linear solver
SparseMatrix< double, int, PETSC_BASE > SparseMatrix_type
type of SparseMatrix for the linear solver
Vector< double > Vector_type
type of Vector for the linear solver
static const unsigned int dims
dimensionaly of the equation ( 3D problem ...)
Definition: EqnsStruct.hpp:40
static constexpr bool boundary[]
boundary at X and Y
Definition: EqnsStruct.hpp:143