blitzdg
an open-source project aiming to implement parallel discontinuous Galerkin (dg) solvers for common partial differential equations systems using blitz++ for array and tensor manipulations and MPI for distributed parallelism.
Nodes1DProvisioner.hpp
1 #pragma once
2 #include <blitz/array.h>
3 #include <SparseMatrixConverter.hpp>
4 #include <EigenSolver.hpp>
5 #include <DirectSolver.hpp>
6 
7 using namespace std;
8 using namespace blitz;
9 
11 
12  double Min_x;
13  double Max_x;
14  int NumElements;
15  int NOrder;
16 
17  Array<double, 2> * xGrid;
18  Array<double, 1> * rGrid;
19 
20  Array<double, 2> * V;
21  Array<double, 2> * Dr;
22 
23  SparseMatrixConverter * MatrixConverter;
24  EigenSolver * EigSolver;
25  DirectSolver * LinSolver;
26 
27  public:
28  Nodes1DProvisioner(int NOrder, int NumElements, double xmin, double xmax, SparseMatrixConverter & converter, EigenSolver & eigenSolver, DirectSolver & directSolver);
29 
30  void buildNodes();
31  void buildDr();
32  void buildVandermondeMatrix();
33  void computeGradVandermonde(Array<double,2> & DVr);
34 
35  Array<double, 2> & get_xGrid();
36  Array<double, 1> & get_rGrid();
37  Array<double, 2> & get_Dr();
38  Array<double, 2> & get_V();
39 
40  // these can be moved to a helper (polynomials) class or made private within this class.
41  void computeJacobiPolynomial(Array<double,1> const & x, const double alpha, const double beta, const int N, Array<double,1> & p);
42  void computeJacobiQuadWeights(double alpha, double beta, int N, Array<double,1> & x, Array<double,1> & w);
43  void computeGaussLobottoPoints(double alpha, double beta, int N, Array<double,1> & x);
44  void computeGradJacobi(Array<double,1> const & x, const double alpha, const double beta, const int N, Array<double,1> & dp);
45 
47 };
Definition: DirectSolver.hpp:7
Definition: Nodes1DProvisioner.hpp:10
Definition: EigenSolver.hpp:7
Definition: SparseMatrixConverter.hpp:8