OpenFPM  5.2.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
Sparse Matrix implementation.
Sparse Matrix implementation stub object when OpenFPM is compiled with no linear algebra support.
Definition: Vector.hpp:40
This is a distributed grid.
This class is able to do Matrix inversion in parallel with PETSC solvers.
Implementation of the staggered grid.
stub when library compiled without eigen
Specify the general characteristic of system to solve.
Definition: EqnsStruct.hpp:648
Vector< double > Vector_type
type of Vector for the linear solver
static constexpr bool boundary[]
boundary at X and Y
Definition: EqnsStruct.hpp:656
static const unsigned int nvar
number of fields in the system
Definition: EqnsStruct.hpp:653
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 const unsigned int dims
dimensionaly of the equation ( 3D problem ...)
Definition: EqnsStruct.hpp:651
double stype
type of space float, double, ...
Specify the general characteristic of system to solve.
static const bool boundary[]
boundary at X and Y
staggered_grid_dist< dims, double, aggregate< double, double, 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 dims
dimensionaly of the equation ( 3D problem ...)
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
Specify the general characteristic of system to solve.
Definition: EqnsStruct.hpp:14
double stype
type of space float, double, ...
static constexpr bool boundary[]
boundary at X and Y
Definition: EqnsStruct.hpp:22
static const unsigned int dims
dimensionaly of the equation ( 3D problem ...)
Definition: EqnsStruct.hpp:17
grid_dist_id< dims, double, aggregate< double, double, double > > b_part
type of base particles
SparseMatrix< double, int, PETSC_BASE > SparseMatrix_type
type of SparseMatrix for the linear solver
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:19
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:748
Vector< double > Vector_type
type of Vector for the linear solver
static constexpr bool boundary[]
boundary at X and Y
Definition: EqnsStruct.hpp:753
double stype
type of space float, double, ...
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:750
SparseMatrix< double, int, PETSC_BASE > SparseMatrix_type
type of SparseMatrix for the linear solver
Vector< double, PETSC_BASE > Vector_type
type of Vector for the linear solver
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:67
static const unsigned int dims
dimensionaly of the equation ( 3D problem ...)
Definition: EqnsStruct.hpp:65
double stype
type of space float, double, ...
grid_dist_id< dims, double, aggregate< double > > b_part
type of base particles
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
static constexpr bool boundary[]
boundary at X and Y
Definition: EqnsStruct.hpp:680
double stype
type of space float, double, ...
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:677
static const unsigned int dims
dimensionaly of the equation ( 3D problem ...)
Definition: EqnsStruct.hpp:675
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:43
static constexpr bool boundary[]
boundary at X and Y
Definition: EqnsStruct.hpp:46
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:41
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:772
static const unsigned int nvar
number of fields in the system
Definition: EqnsStruct.hpp:774
static constexpr bool boundary[]
boundary at X and Y
Definition: EqnsStruct.hpp:777
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, ...
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:94
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
static const unsigned int nvar
number of fields in the system
Definition: EqnsStruct.hpp:91
static const unsigned int dims
dimensionaly of the equation ( 3D problem ...)
Definition: EqnsStruct.hpp:89
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:701
Vector< double > Vector_type
type of Vector for the linear solver
static constexpr bool boundary[]
boundary at X and Y
Definition: EqnsStruct.hpp:704
double stype
type of space float, double, ...
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 const unsigned int dims
dimensionaly of the equation ( 3D problem ...)
Definition: EqnsStruct.hpp:699
static const unsigned int dims
dimensionaly of the equation ( 3D problem ...)
Definition: EqnsStruct.hpp:138
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:143
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
Vector< double, PETSC_BASE > Vector_type
type of Vector for the linear solver
static constexpr bool boundary[]
boundary at X and Y
Definition: EqnsStruct.hpp:801
double stype
type of space float, double, ...
grid_dist_id< dims, double, aggregate< double > > b_part
type of base particles
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:798
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:796
Vector< double, PETSC_BASE > Vector_type
type of Vector for the linear solver
static const unsigned int dims
dimensionaly of the equation ( 3D problem ...)
Definition: EqnsStruct.hpp:114
double stype
type of space float, double, ...
static constexpr bool boundary[]
boundary at X and Y
Definition: EqnsStruct.hpp:119
static const unsigned int nvar
number of fields in the system
Definition: EqnsStruct.hpp:116
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, ...
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:728
static const unsigned int nvar
number of fields in the system
Definition: EqnsStruct.hpp:725
static const unsigned int dims
dimensionaly of the equation ( 3D problem ...)
Definition: EqnsStruct.hpp:723
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
static const unsigned int dims
dimensionaly of the equation ( 3D problem ...)
Definition: EqnsStruct.hpp:162
static constexpr bool boundary[]
boundary at X and Y
Definition: EqnsStruct.hpp:167
SparseMatrix< double, int, PETSC_BASE > SparseMatrix_type
type of SparseMatrix for the linear solver
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, ...
static const unsigned int nvar
number of fields in the system
Definition: EqnsStruct.hpp:164
static const unsigned int dims
dimensionaly of the equation ( 3D problem ...)
Definition: EqnsStruct.hpp:844
static constexpr bool boundary[]
boundary at X and Y
Definition: EqnsStruct.hpp:849
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
static const unsigned int nvar
number of fields in the system
Definition: EqnsStruct.hpp:846
double stype
type of space float, double, ...
Vector< double > Vector_type
type of Vector for the linear solver
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:215
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:210
static const unsigned int nvar
number of fields in the system
Definition: EqnsStruct.hpp:212
Vector< double, PETSC_BASE > Vector_type
type of Vector for the linear solver
static const unsigned int dims
dimensionaly of the equation ( 3D problem ...)
Definition: EqnsStruct.hpp:820
static const unsigned int nvar
number of fields in the system
Definition: EqnsStruct.hpp:822
grid_dist_id< dims, double, aggregate< double > > b_part
type of base particles
double stype
type of space float, double, ..
static constexpr bool boundary[]
boundary at X and Y
Definition: EqnsStruct.hpp:825
SparseMatrix< double, int, EIGEN_BASE > SparseMatrix_type
type of SparseMatrix for the linear solver
Vector< double > Vector_type
type of Vector for the linear solver
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:188
double stype
type of space float, double, ..
static constexpr bool boundary[]
boundary at X and Y
Definition: EqnsStruct.hpp:191
static const unsigned int dims
dimensionaly of the equation ( 3D problem ...)
Definition: EqnsStruct.hpp:186
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