Extension: Matrix functions
#include "dg/matrix/matrix.h"
|
Classes for Krylov space approximations of a Matrix-Vector product. More...
Namespaces | |
namespace | blas1 |
namespace | blas2 |
namespace | create |
namespace | detail |
namespace | mat |
namespace | tensor |
namespace | x |
Enumerations | |
enum | bc |
enum | direction |
enum | space |
enum | coo2d { x , y } |
enum | coo3d { x , y , z } |
enum | multistep_identifier |
enum | to { exact , at_least } |
enum | tableau_identifier |
enum | multistep_identifier |
enum | to { to::exact , to::at_least } |
enum | tableau_identifier |
enum | bc |
enum | direction |
enum | space |
enum | coo2d { coo2d::x , coo2d::y } |
enum | coo3d { coo3d::x , coo3d::y , coo3d::z } |
Functions | |
auto | asDenseMatrix (const std::vector< const ContainerType * > &in) |
auto | asDenseMatrix (const std::vector< const ContainerType * > &in, unsigned size) |
std::vector< const ContainerType * > | asPointers (const std::vector< ContainerType > &in) |
void | abort_program (int code=-1) |
void | mpi_init (int argc, char *argv[]) |
std::vector< T > | mpi_read_as (unsigned num, MPI_Comm comm, std::istream &is=std::cin) |
void | mpi_read_grid (unsigned &n, std::vector< unsigned > &N, MPI_Comm comm, std::istream &is=std::cin, bool verbose=true, std::ostream &os=std::cout) |
void | mpi_read_grid (unsigned &n, std::vector< unsigned * > N, MPI_Comm comm, std::istream &is=std::cin, bool verbose=true, std::ostream &os=std::cout) |
MPI_Comm | mpi_cart_create (MPI_Comm comm_old, std::vector< int > dims, std::vector< int > periods, bool reorder=true) |
MPI_Comm | mpi_cart_create (std::vector< dg::bc > bcs, std::istream &is=std::cin, MPI_Comm comm_old=MPI_COMM_WORLD, bool reorder=true, bool verbose=true, std::ostream &os=std::cout) |
void | mpi_init1d (dg::bc bcx, MPI_Comm &comm, std::istream &is=std::cin, bool verbose=true) |
void | mpi_init2d (dg::bc bcx, dg::bc bcy, MPI_Comm &comm, std::istream &is=std::cin, bool verbose=true) |
void | mpi_init3d (dg::bc bcx, dg::bc bcy, dg::bc bcz, MPI_Comm &comm, std::istream &is=std::cin, bool verbose=true) |
void | mpi_init1d (dg::bc bcx, unsigned &n, unsigned &N, MPI_Comm &comm, std::istream &is=std::cin, bool verbose=true) |
void | mpi_init2d (dg::bc bcx, dg::bc bcy, unsigned &n, unsigned &Nx, unsigned &Ny, MPI_Comm &comm, std::istream &is=std::cin, bool verbose=true) |
void | mpi_init3d (dg::bc bcx, dg::bc bcy, dg::bc bcz, unsigned &n, unsigned &Nx, unsigned &Ny, unsigned &Nz, MPI_Comm &comm, std::istream &is=std::cin, bool verbose=true) |
MPI_Comm | mpi_cart_sub (MPI_Comm comm, std::vector< int > remain_dims, bool duplicate=false) |
MPI_Comm | mpi_cart_kron (std::vector< MPI_Comm > comms) |
MPI_Comm | mpi_cart_kron (Vector comms) |
std::vector< MPI_Comm > | mpi_cart_split (MPI_Comm comm) |
std::array< MPI_Comm, Nd > | mpi_cart_split_as (MPI_Comm comm) |
auto | make_mpi_sparseblockmat (const EllSparseBlockMat< real_type, thrust::host_vector > &src, const ConversionPolicyRows &g_rows, const ConversionPolicyCols &g_cols) |
std::map< int, MessageType > | mpi_permute (const std::map< int, MessageType > &messages, MPI_Comm comm) |
void | mpi_gather (const thrust::host_vector< std::array< int, 2 > > &gather_map, const ContainerType &gatherFrom, ContainerType &result, MPI_Comm comm) |
void | mpi_scatter (const thrust::host_vector< std::array< int, 2 > > &scatter_map, const ContainerType &toScatter, ContainerType &result, MPI_Comm comm, bool resize_result=false) |
thrust::host_vector< std::array< Integer, 2 > > | mpi_invert_permutation (const thrust::host_vector< std::array< Integer, 2 > > &p, MPI_Comm comm) |
void | ell_cpu_multiply_kernel (value_type alpha, value_type beta, const real_type *RESTRICT data, const int *RESTRICT cols_idx, const int *RESTRICT data_idx, const int num_rows, const int num_cols, const int blocks_per_line, const int n, const int left_size, const int right_size, const int *RESTRICT right_range, const value_type *RESTRICT x, value_type *RESTRICT y) |
void | ell_cpu_multiply_kernel (value_type alpha, value_type beta, const real_type *RESTRICT data, const int *RESTRICT cols_idx, const int *RESTRICT data_idx, const int num_rows, const int num_cols, const int left_size, const int right_size, const int *RESTRICT right_range, const value_type *RESTRICT x, value_type *RESTRICT y) |
void | call_ell_cpu_multiply_kernel (value_type alpha, value_type beta, const real_type *RESTRICT data_ptr, const int *RESTRICT cols_ptr, const int *RESTRICT block_ptr, const int num_rows, const int num_cols, const int blocks_per_line, const int left_size, const int right_size, const int *RESTRICT right_range_ptr, const value_type *RESTRICT x_ptr, value_type *RESTRICT y_ptr) |
void | coo_cpu_multiply_kernel (value_type alpha, const value_type **x, value_type beta, value_type *RESTRICT y, const CooSparseBlockMat< real_type, Vector > &m) |
auto | evaluate (Functor &&f, const Topology &g) |
thrust::host_vector< real_type > | integrate (const thrust::host_vector< real_type > &in, const RealGrid< real_type, 1 > &g, dg::direction dir=dg::forward) |
thrust::host_vector< real_type > | integrate (UnaryOp f, const RealGrid< real_type, 1 > &g, dg::direction dir=dg::forward) |
Topology::host_vector | forward_transform (const typename Topology::host_vector &in, const Topology &g) |
DG_DEVICE T | zero (T x, Ts ...xs) |
DG_DEVICE T | one (T x, Ts ...xs) |
DG_DEVICE double | cooX1d (double x) |
DG_DEVICE double | cooX2d (double x, double y) |
DG_DEVICE double | cooX3d (double x, double y, double z) |
DG_DEVICE double | cooY2d (double x, double y) |
DG_DEVICE double | cooY3d (double x, double y, double z) |
DG_DEVICE double | cooZ3d (double x, double y, double z) |
DG_DEVICE double | cooRZP2X (double R, double Z, double P) |
DG_DEVICE double | cooRZP2Y (double R, double Z, double P) |
DG_DEVICE double | cooRZP2Z (double R, double Z, double P) |
real_type | interpolate (dg::space sp, const host_vector &v, real_type x, const RealGrid1d< real_type > &g, dg::bc bcx=dg::NEU) |
real_type | interpolate (dg::space sp, const host_vector &v, real_type x, real_type y, const aRealTopology< real_type, 2 > &g, dg::bc bcx=dg::NEU, dg::bc bcy=dg::NEU) |
real_type | interpolate (dg::space sp, const thrust::host_vector< real_type > &v, real_type x, real_type y, const aRealTopologyX2d< real_type > &g, dg::bc bcx=dg::NEU, dg::bc bcy=dg::NEU) |
MPI_Vector< thrust::host_vector< real_type > > | global2local (const thrust::host_vector< real_type > &global, const MPITopology &g) |
dg::MIHMatrix_t< real_type > | make_mpi_matrix (const dg::IHMatrix_t< real_type > &global_cols, const ConversionPolicy &col_policy) |
dg::IHMatrix_t< real_type > | convertGlobal2LocalRows (const dg::IHMatrix_t< real_type > &global, const ConversionPolicy &row_policy) |
void | convertLocal2GlobalCols (dg::IHMatrix_t< real_type > &local, const ConversionPolicy &policy) |
void | lu_solve (const dg::SquareMatrix< T > &lu, const std::vector< unsigned > &p, std::vector< T > &b) |
dg::SquareMatrix< T > | invert (const dg::SquareMatrix< T > &in) |
SquareMatrix< T > | tensorproduct (const SquareMatrix< T > &op1, const SquareMatrix< T > &op2) |
dg::SparseMatrix< int, T, thrust::host_vector > | tensorproduct (unsigned N, const SquareMatrix< T > &op) |
dg::SparseMatrix< int, T, thrust::host_vector > | sandwich (const SquareMatrix< T > &left, const dg::SparseMatrix< int, T, thrust::host_vector > &m, const SquareMatrix< T > &right) |
T | gcd (T a, T b) |
T | lcm (T a, T b) |
void | split (SharedContainer &in, std::vector< View< SharedContainer > > &out, const aRealTopology3d< real_type > &grid) |
std::vector< View< SharedContainer > > | split (SharedContainer &in, const aRealTopology3d< real_type > &grid) |
void | assign3dfrom2d (const host_vector &in2d, Container &out, const Topology &grid) |
void | split (MPIContainer &in, std::vector< get_mpi_view_type< MPIContainer > > &out, const aRealMPITopology3d< real_type > &grid) |
std::vector< get_mpi_view_type< MPIContainer > > | split (MPIContainer &in, const aRealMPITopology3d< real_type > &grid) |
Geometry::host_vector | pullback (const Functor &f, const Geometry &g) |
void | pushForwardPerp (const Functor1 &vR, const Functor2 &vZ, container &vx, container &vy, const Geometry &g) |
void | pushForward (const Functor1 &vR, const Functor2 &vZ, const Functor3 &vPhi, container &vx, container &vy, container &vz, const Geometry &g) |
void | pushForwardPerp (const FunctorRR &chiRR, const FunctorRZ &chiRZ, const FunctorZZ &chiZZ, SparseTensor< container > &chi, const Geometry &g) |
dg::SparseMatrix< int, T, thrust::host_vector > | tensorproduct (const dg::SparseMatrix< int, T, thrust::host_vector > &lhs, const dg::SparseMatrix< int, T, thrust::host_vector > &rhs) |
dg::SparseMatrix< int, T, thrust::host_vector > | tensorproduct_cols (const dg::SparseMatrix< int, T, thrust::host_vector > &lhs, const dg::SparseMatrix< int, T, thrust::host_vector > &rhs) |
void | assign (const from_ContainerType &from, ContainerType &to, Params &&... ps) |
ContainerType | construct (const from_ContainerType &from, Params &&... ps) |
auto | kronecker (Functor &&f, const ContainerType &x0, const ContainerTypes &... xs) |
void | apply (get_value_type< ContainerType1 > alpha, MatrixType &&M, const ContainerType1 &x, get_value_type< ContainerType1 > beta, ContainerType2 &y) |
void | apply (MatrixType &&M, const ContainerType1 &x, ContainerType2 &y) |
std::string | bc2str (bc bcx) |
bc | str2bc (std::string s) |
bc | inverse (bc bound) |
direction | str2direction (std::string s) |
std::string | direction2str (enum direction dir) |
direction | inverse (direction dir) |
std::vector< double > | least_squares (const std::vector< ContainerType0 > &bs, const ContainerType1 &b, const ContainerType2 &weights) |
std::vector< double > | least_squares (const std::vector< ContainerType0 > &bs, const ContainerType1 &b) |
void | nested_iterations (std::vector< MatrixType0 > &ops, ContainerType0 &x, const ContainerType1 &b, std::vector< MatrixType1 > &inverse_ops, NestedGrids &nested_grids) |
void | multigrid_cycle (std::vector< MatrixType0 > &ops, std::vector< MatrixType1 > &inverse_ops_down, std::vector< MatrixType2 > &inverse_ops_up, NestedGrids &nested_grids, unsigned gamma, unsigned p) |
void | full_multigrid (std::vector< MatrixType0 > &ops, ContainerType0 &x, const ContainerType1 &b, std::vector< MatrixType1 > &inverse_ops_down, std::vector< MatrixType2 > &inverse_ops_up, NestedGrids &nested_grids, unsigned gamma, unsigned mu) |
void | fmg_solve (std::vector< MatrixType0 > &ops, ContainerType0 &x, const ContainerType1 &b, std::vector< MatrixType1 > &inverse_ops_down, std::vector< MatrixType2 > &inverse_ops_up, NestedGrids &nested_grids, const ContainerType2 &weights, double eps, unsigned gamma) |
int | bisection1d (UnaryOp &&op, double &x_min, double &x_max, const double eps) |
std::string | to2str (enum to mode) |
bool | is_same (double x, double y, double eps=1e-15) |
bool | is_same (float x, float y, float eps=1e-6) |
bool | is_same (T x, T y) |
bool | is_divisable (double a, double b, double eps=1e-15) |
bool | is_divisable (float a, float b, float eps=1e-6) |
auto | compose (UnaryOp f, Functor g) |
auto | compose (UnaryOp f0, Functors... fs) |
void | assign (const from_ContainerType &from, ContainerType &to, Params &&... ps) |
ContainerType | construct (const from_ContainerType &from, Params &&... ps) |
auto | kronecker (Functor &&f, const ContainerType &x0, const ContainerTypes &... xs) |
void | apply (get_value_type< ContainerType1 > alpha, MatrixType &&M, const ContainerType1 &x, get_value_type< ContainerType1 > beta, ContainerType2 &y) |
void | apply (MatrixType &&M, const ContainerType1 &x, ContainerType2 &y) |
auto | make_mpi_sparseblockmat (const EllSparseBlockMat< real_type, thrust::host_vector > &src, const ConversionPolicyRows &g_rows, const ConversionPolicyCols &g_cols) |
dg::MIHMatrix_t< real_type > | make_mpi_matrix (const dg::IHMatrix_t< real_type > &global_cols, const ConversionPolicy &col_policy) |
dg::IHMatrix_t< real_type > | convertGlobal2LocalRows (const dg::IHMatrix_t< real_type > &global, const ConversionPolicy &row_policy) |
void | convertLocal2GlobalCols (dg::IHMatrix_t< real_type > &local, const ConversionPolicy &policy) |
std::map< int, MessageType > | mpi_permute (const std::map< int, MessageType > &messages, MPI_Comm comm) |
void | mpi_gather (const thrust::host_vector< std::array< int, 2 > > &gather_map, const ContainerType &gatherFrom, ContainerType &result, MPI_Comm comm) |
void | mpi_scatter (const thrust::host_vector< std::array< int, 2 > > &scatter_map, const ContainerType &toScatter, ContainerType &result, MPI_Comm comm, bool resize_result=false) |
thrust::host_vector< std::array< Integer, 2 > > | mpi_invert_permutation (const thrust::host_vector< std::array< Integer, 2 > > &p, MPI_Comm comm) |
auto | asDenseMatrix (const std::vector< const ContainerType * > &in) |
auto | asDenseMatrix (const std::vector< const ContainerType * > &in, unsigned size) |
std::vector< const ContainerType * > | asPointers (const std::vector< ContainerType > &in) |
std::string | to2str (enum to mode) |
std::vector< double > | least_squares (const std::vector< ContainerType0 > &bs, const ContainerType1 &b, const ContainerType2 &weights) |
std::vector< double > | least_squares (const std::vector< ContainerType0 > &bs, const ContainerType1 &b) |
void | lu_solve (const dg::SquareMatrix< T > &lu, const std::vector< unsigned > &p, std::vector< T > &b) |
dg::SquareMatrix< T > | invert (const dg::SquareMatrix< T > &in) |
int | bisection1d (UnaryOp &&op, double &x_min, double &x_max, const double eps) |
auto | evaluate (Functor &&f, const Topology &g) |
thrust::host_vector< real_type > | integrate (const thrust::host_vector< real_type > &in, const RealGrid< real_type, 1 > &g, dg::direction dir=dg::forward) |
thrust::host_vector< real_type > | integrate (UnaryOp f, const RealGrid< real_type, 1 > &g, dg::direction dir=dg::forward) |
std::string | bc2str (bc bcx) |
bc | str2bc (std::string s) |
bc | inverse (bc bound) |
direction | str2direction (std::string s) |
std::string | direction2str (enum direction dir) |
direction | inverse (direction dir) |
Topology::host_vector | forward_transform (const typename Topology::host_vector &in, const Topology &g) |
real_type | interpolate (dg::space sp, const host_vector &v, real_type x, const RealGrid1d< real_type > &g, dg::bc bcx=dg::NEU) |
real_type | interpolate (dg::space sp, const host_vector &v, real_type x, real_type y, const aRealTopology< real_type, 2 > &g, dg::bc bcx=dg::NEU, dg::bc bcy=dg::NEU) |
real_type | interpolate (dg::space sp, const thrust::host_vector< real_type > &v, real_type x, real_type y, const aRealTopologyX2d< real_type > &g, dg::bc bcx=dg::NEU, dg::bc bcy=dg::NEU) |
MPI_Vector< thrust::host_vector< real_type > > | global2local (const thrust::host_vector< real_type > &global, const MPITopology &g) |
void | split (SharedContainer &in, std::vector< View< SharedContainer > > &out, const aRealTopology3d< real_type > &grid) |
std::vector< View< SharedContainer > > | split (SharedContainer &in, const aRealTopology3d< real_type > &grid) |
void | assign3dfrom2d (const host_vector &in2d, Container &out, const Topology &grid) |
void | split (MPIContainer &in, std::vector< get_mpi_view_type< MPIContainer > > &out, const aRealMPITopology3d< real_type > &grid) |
std::vector< get_mpi_view_type< MPIContainer > > | split (MPIContainer &in, const aRealMPITopology3d< real_type > &grid) |
Geometry::host_vector | pullback (const Functor &f, const Geometry &g) |
void | pushForwardPerp (const Functor1 &vR, const Functor2 &vZ, container &vx, container &vy, const Geometry &g) |
void | pushForward (const Functor1 &vR, const Functor2 &vZ, const Functor3 &vPhi, container &vx, container &vy, container &vz, const Geometry &g) |
void | pushForwardPerp (const FunctorRR &chiRR, const FunctorRZ &chiRZ, const FunctorZZ &chiZZ, SparseTensor< container > &chi, const Geometry &g) |
void | nested_iterations (std::vector< MatrixType0 > &ops, ContainerType0 &x, const ContainerType1 &b, std::vector< MatrixType1 > &inverse_ops, NestedGrids &nested_grids) |
void | multigrid_cycle (std::vector< MatrixType0 > &ops, std::vector< MatrixType1 > &inverse_ops_down, std::vector< MatrixType2 > &inverse_ops_up, NestedGrids &nested_grids, unsigned gamma, unsigned p) |
void | full_multigrid (std::vector< MatrixType0 > &ops, ContainerType0 &x, const ContainerType1 &b, std::vector< MatrixType1 > &inverse_ops_down, std::vector< MatrixType2 > &inverse_ops_up, NestedGrids &nested_grids, unsigned gamma, unsigned mu) |
void | fmg_solve (std::vector< MatrixType0 > &ops, ContainerType0 &x, const ContainerType1 &b, std::vector< MatrixType1 > &inverse_ops_down, std::vector< MatrixType2 > &inverse_ops_up, NestedGrids &nested_grids, const ContainerType2 &weights, double eps, unsigned gamma) |
void | abort_program (int code=-1) |
DG_DEVICE T | zero (T x, Ts ...xs) |
DG_DEVICE T | one (T x, Ts ...xs) |
DG_DEVICE double | cooX1d (double x) |
DG_DEVICE double | cooX2d (double x, double y) |
DG_DEVICE double | cooX3d (double x, double y, double z) |
DG_DEVICE double | cooY2d (double x, double y) |
DG_DEVICE double | cooY3d (double x, double y, double z) |
DG_DEVICE double | cooZ3d (double x, double y, double z) |
DG_DEVICE double | cooRZP2X (double R, double Z, double P) |
DG_DEVICE double | cooRZP2Y (double R, double Z, double P) |
DG_DEVICE double | cooRZP2Z (double R, double Z, double P) |
T | gcd (T a, T b) |
T | lcm (T a, T b) |
bool | is_same (double x, double y, double eps=1e-15) |
bool | is_same (float x, float y, float eps=1e-6) |
bool | is_same (T x, T y) |
bool | is_divisable (double a, double b, double eps=1e-15) |
bool | is_divisable (float a, float b, float eps=1e-6) |
auto | compose (UnaryOp f, Functor g) |
auto | compose (UnaryOp f0, Functors... fs) |
void | mpi_init (int argc, char *argv[]) |
std::vector< T > | mpi_read_as (unsigned num, MPI_Comm comm, std::istream &is=std::cin) |
void | mpi_read_grid (unsigned &n, std::vector< unsigned > &N, MPI_Comm comm, std::istream &is=std::cin, bool verbose=true, std::ostream &os=std::cout) |
void | mpi_read_grid (unsigned &n, std::vector< unsigned * > N, MPI_Comm comm, std::istream &is=std::cin, bool verbose=true, std::ostream &os=std::cout) |
MPI_Comm | mpi_cart_create (MPI_Comm comm_old, std::vector< int > dims, std::vector< int > periods, bool reorder=true) |
MPI_Comm | mpi_cart_create (std::vector< dg::bc > bcs, std::istream &is=std::cin, MPI_Comm comm_old=MPI_COMM_WORLD, bool reorder=true, bool verbose=true, std::ostream &os=std::cout) |
MPI_Comm | mpi_cart_sub (MPI_Comm comm, std::vector< int > remain_dims, bool duplicate=false) |
MPI_Comm | mpi_cart_kron (std::vector< MPI_Comm > comms) |
MPI_Comm | mpi_cart_kron (Vector comms) |
std::vector< MPI_Comm > | mpi_cart_split (MPI_Comm comm) |
std::array< MPI_Comm, Nd > | mpi_cart_split_as (MPI_Comm comm) |
void | mpi_init1d (dg::bc bcx, MPI_Comm &comm, std::istream &is=std::cin, bool verbose=true) |
void | mpi_init2d (dg::bc bcx, dg::bc bcy, MPI_Comm &comm, std::istream &is=std::cin, bool verbose=true) |
void | mpi_init3d (dg::bc bcx, dg::bc bcy, dg::bc bcz, MPI_Comm &comm, std::istream &is=std::cin, bool verbose=true) |
void | mpi_init1d (dg::bc bcx, unsigned &n, unsigned &N, MPI_Comm &comm, std::istream &is=std::cin, bool verbose=true) |
void | mpi_init2d (dg::bc bcx, dg::bc bcy, unsigned &n, unsigned &Nx, unsigned &Ny, MPI_Comm &comm, std::istream &is=std::cin, bool verbose=true) |
void | mpi_init3d (dg::bc bcx, dg::bc bcy, dg::bc bcz, unsigned &n, unsigned &Nx, unsigned &Ny, unsigned &Nz, MPI_Comm &comm, std::istream &is=std::cin, bool verbose=true) |
SquareMatrix< T > | tensorproduct (const SquareMatrix< T > &op1, const SquareMatrix< T > &op2) |
dg::SparseMatrix< int, T, thrust::host_vector > | tensorproduct (unsigned N, const SquareMatrix< T > &op) |
dg::SparseMatrix< int, T, thrust::host_vector > | sandwich (const SquareMatrix< T > &left, const dg::SparseMatrix< int, T, thrust::host_vector > &m, const SquareMatrix< T > &right) |
dg::SparseMatrix< int, T, thrust::host_vector > | tensorproduct (const dg::SparseMatrix< int, T, thrust::host_vector > &lhs, const dg::SparseMatrix< int, T, thrust::host_vector > &rhs) |
dg::SparseMatrix< int, T, thrust::host_vector > | tensorproduct_cols (const dg::SparseMatrix< int, T, thrust::host_vector > &lhs, const dg::SparseMatrix< int, T, thrust::host_vector > &rhs) |
Classes for Krylov space approximations of a Matrix-Vector product.
Classes for Matrix function-Vector product computation via the ODE method.
Classes for square root Matrix-Vector product computation via the Cauchy integral.