16 template<
class Matrix2>
20 template<
class Matrix2>
22 *
this = c;
return *
this;}
23 template<
class ContainerType1,
class ContainerType2>
24 void symv(
const ContainerType1& v1, ContainerType2& v2)
const
30 template<
class ContainerType>
37 void display( std::ostream& os = std::cout)
const
41 os <<
" dual matrix: \n";
42 os <<
" INNER MATRIX\n";
44 os <<
" OUTER MATRIX\n";
49 os <<
"single matrix: \n";
57template <
class Matrix>
85template<
class real_type>
90 dx.set_left_size( g.
n()*g.
Ny());
102template<
class real_type>
114template<
class real_type>
120 dy_inner =
dx( g1d_inner, bcy, dir);
121 dy_outer =
dx( g1d_outer, bcy, dir);
141template<
class real_type>
152template<
class real_type>
169template<
class real_type>
175 jy_inner =
jump( g1d_inner, bcy);
176 jy_outer =
jump( g1d_outer, bcy);
195template<
class real_type>
208template<
class real_type>
224template<
class real_type>
241template<
class real_type>
247 jy_inner =
jump( g1d_inner, bcy);
248 jy_outer =
jump( g1d_outer, bcy);
270template<
class real_type>
286template<
class real_type>
299template<
class real_type>
312template<
class real_type>
328template<
class real_type>
333 dx.set_left_size( g.
n()*g.
Ny()*g.
Nz());
345template<
class real_type>
357template<
class real_type>
363 dy_inner =
dx( g1d_inner, bcy, dir);
364 dy_outer =
dx( g1d_outer, bcy, dir);
386template<
class real_type>
398template<
class real_type>
403 dz.set_right_size( g.
n()*g.
n()*g.
Nx()*g.
Ny());
416template<
class real_type>
Simple 1d derivatives on X-point topology.
base X-point topology classes
void symv(MatrixType &&M, const ContainerType1 &x, ContainerType2 &y)
Definition: blas2.h:287
EllSparseBlockMat< real_type > dz(const aRealTopology3d< real_type > &g, bc bcz, direction dir=centered)
Create 3d derivative in z-direction.
Definition: derivatives.h:308
EllSparseBlockMat< real_type > dx(const aRealTopology2d< real_type > &g, bc bcx, direction dir=centered)
Create 2d derivative in x-direction.
Definition: derivatives.h:33
EllSparseBlockMat< real_type > jumpZ(const aRealTopology3d< real_type > &g, bc bcz)
Matrix that contains jump terms in Z direction in 3D.
Definition: derivatives.h:190
bc
Switch between boundary conditions.
Definition: enums.h:15
EllSparseBlockMat< real_type > jumpX(const aRealTopology2d< real_type > &g, bc bcx)
Matrix that contains 2d jump terms in X direction.
Definition: derivatives.h:95
EllSparseBlockMat< real_type > dy(const aRealTopology2d< real_type > &g, bc bcy, direction dir=centered)
Create 2d derivative in y-direction.
Definition: derivatives.h:65
direction
Direction of a discrete derivative.
Definition: enums.h:97
EllSparseBlockMat< real_type > jumpY(const aRealTopology2d< real_type > &g, bc bcy)
Matrix that contains 2d jump terms in Y direction.
Definition: derivatives.h:112
@ centered
centered derivative (cell to the left and right and current cell)
Definition: enums.h:100
EllSparseBlockMat< real_type > dx_normed(int n, int N, real_type h, bc bcx, direction dir)
Create and assemble a host Matrix for normed derivative in 1d.
Definition: dx.h:402
EllSparseBlockMat< real_type > jump(int n, int N, real_type h, bc bcx)
Create and assemble a host Matrix for the jump terms in 1d.
Definition: dx.h:310
typename TensorTraits< std::decay_t< Vector > >::value_type get_value_type
Definition: tensor_traits.h:38
This is the namespace for all functions and classes defined and used by the discontinuous Galerkin li...
Definition: derivativesX.h:14
Composite & operator=(const Composite< Matrix2 > &src)
Definition: derivativesX.h:21
bool dual
Definition: derivativesX.h:54
void symv(get_value_type< ContainerType > alpha, const ContainerType &v1, get_value_type< ContainerType > beta, ContainerType &v2) const
Definition: derivativesX.h:31
Matrix m1
Definition: derivativesX.h:53
Composite(const Matrix &m1, const Matrix &m2)
Definition: derivativesX.h:19
Composite(const Composite< Matrix2 > &src)
Definition: derivativesX.h:17
Composite()
Definition: derivativesX.h:15
void symv(const ContainerType1 &v1, ContainerType2 &v2) const
Definition: derivativesX.h:24
Matrix m2
Definition: derivativesX.h:53
void display(std::ostream &os=std::cout) const
Definition: derivativesX.h:37
Composite(const Matrix &m)
Definition: derivativesX.h:18
Ell Sparse Block Matrix format.
Definition: sparseblockmat.h:46
void set_right_size(int new_right_size)
Set right_size = new_right_size; set_default_range();
Definition: sparseblockmat.h:110
void set_left_size(int new_left_size)
Set left_size = new_left_size;
Definition: sparseblockmat.h:115
int left_size
size of the left Kronecker delta
Definition: sparseblockmat.h:134
thrust::host_vector< int > right_range
range (can be used to apply the matrix to only part of the right rows
Definition: sparseblockmat.h:129
int right_size
size of the right Kronecker delta (is e.g 1 for a x - derivative)
Definition: sparseblockmat.h:135
1D grid
Definition: grid.h:80
1D grid for X-point topology
Definition: gridX.h:68
Indicates that the type has a member function with the same name and interface (up to the matrix itse...
Definition: matrix_categories.h:26
The vector traits.
Definition: tensor_traits.h:31
NotATensorTag tensor_category
Definition: tensor_traits.h:33
void value_type
Definition: tensor_traits.h:32
A 2D grid class with X-point topology.
Definition: gridX.h:257
real_type hx() const
cell size in x
Definition: gridX.h:304
real_type y0() const
left boundary in y
Definition: gridX.h:280
bc bcy() const
boundary conditions in y
Definition: gridX.h:376
real_type y1() const
Right boundary in y.
Definition: gridX.h:286
unsigned Nx() const
number of cells in x
Definition: gridX.h:334
bc bcx() const
boundary conditions in x
Definition: gridX.h:370
unsigned inner_Nx() const
number of topological cells in x
Definition: gridX.h:340
unsigned Ny() const
number of cells in y
Definition: gridX.h:352
real_type fy() const
partition factor in y
Definition: gridX.h:322
unsigned n() const
number of polynomial coefficients in x and y
Definition: gridX.h:328
A 3D grid class with X-point topology.
Definition: gridX.h:541
bc bcx() const
boundary conditions in x
Definition: gridX.h:687
unsigned n() const
number of polynomial coefficients in x and y
Definition: gridX.h:639
real_type y1() const
right boundary in y
Definition: gridX.h:570
real_type hx() const
cell size in x
Definition: gridX.h:609
unsigned Nz() const
number of points in z
Definition: gridX.h:681
unsigned Ny() const
number of cells in y
Definition: gridX.h:663
real_type hz() const
cell size in z
Definition: gridX.h:621
unsigned Nx() const
number of points in x
Definition: gridX.h:645
bc bcy() const
boundary conditions in y
Definition: gridX.h:693
real_type y0() const
left boundary in y
Definition: gridX.h:564
unsigned inner_Nx() const
number of topological cells in x
Definition: gridX.h:651
real_type fy() const
partition factor in y
Definition: gridX.h:633
bc bcz() const
boundary conditions in z
Definition: gridX.h:699