Cyclops Tensor Framework
parallel arithmetic on multidimensional arrays
|
Benchmark for smoothed algebraic multgrid. More...
Typedefs | |
typedef float | REAL |
Functions | |
void | smooth_jacobi (Matrix< REAL > &A, Vector< REAL > &x, Vector< REAL > &b, int nsm) |
void | vcycle (Matrix< REAL > &A, Vector< REAL > &x, Vector< REAL > &b, Matrix< REAL > *P, Matrix< REAL > *PTAP, int64_t N, int nlevel, int *nsm) |
void | setup (Matrix< REAL > &A, Matrix< REAL > *T, int N, int nlevel, Matrix< REAL > *P, Matrix< REAL > *PTAP) |
int | test_alg_multigrid (int64_t N, int nlvl, int *nsm, Matrix< REAL > &A, Vector< REAL > &b, Vector< REAL > &x_init, Matrix< REAL > *P, Matrix< REAL > *PTAP) |
computes Multigrid for a 3D regular discretization More... | |
void | setup_unstructured (int64_t n, int nlvl, REAL sp_frac, int ndiv, int decay_exp, Matrix< REAL > &A, Matrix< REAL > *&P, Matrix< REAL > *&PTAP, World &dw) |
void | setup_3d_Poisson (int64_t n, int nlvl, int ndiv, Matrix< REAL > &A, Matrix< REAL > *&P, Matrix< REAL > *&PTAP, World &dw) |
char * | getCmdOption (char **begin, char **end, const std::string &option) |
int | main (int argc, char **argv) |
Benchmark for smoothed algebraic multgrid.
typedef float REAL |
Definition at line 11 of file algebraic_multigrid.cxx.
char* getCmdOption | ( | char ** | begin, |
char ** | end, | ||
const std::string & | option | ||
) |
Definition at line 440 of file algebraic_multigrid.cxx.
Referenced by main().
int main | ( | int | argc, |
char ** | argv | ||
) |
Definition at line 451 of file algebraic_multigrid.cxx.
References ctf.core::b, CTF::Tensor< dtype >::fill_random(), CTF::Tensor< dtype >::get_local_data(), getCmdOption(), CTF::Tensor< dtype >::norm2(), ctf.core::np(), CTF::World::rank, ctf.core::rank(), setup_3d_Poisson(), setup_unstructured(), test_alg_multigrid(), and CTF::Tensor< dtype >::write().
void setup | ( | Matrix< REAL > & | A, |
Matrix< REAL > * | T, | ||
int | N, | ||
int | nlevel, | ||
Matrix< REAL > * | P, | ||
Matrix< REAL > * | PTAP | ||
) |
Definition at line 173 of file algebraic_multigrid.cxx.
References CTF_int::tensor::is_sparse, CTF_int::tensor::lens, omega(), SP, CTF::Timer::start(), CTF::Timer::stop(), and CTF_int::tensor::wrld.
Referenced by setup_3d_Poisson(), and setup_unstructured().
void setup_3d_Poisson | ( | int64_t | n, |
int | nlvl, | ||
int | ndiv, | ||
Matrix< REAL > & | A, | ||
Matrix< REAL > *& | P, | ||
Matrix< REAL > *& | PTAP, | ||
World & | dw | ||
) |
Definition at line 344 of file algebraic_multigrid.cxx.
References CTF::Timer_epoch::begin(), CTF::Timer_epoch::end(), CTF_int::tensor::nnz_tot, CTF::World::np, CTF::World::rank, setup(), SP, CTF::Timer::start(), CTF::Timer::stop(), and CTF::Tensor< dtype >::write().
Referenced by main().
void setup_unstructured | ( | int64_t | n, |
int | nlvl, | ||
REAL | sp_frac, | ||
int | ndiv, | ||
int | decay_exp, | ||
Matrix< REAL > & | A, | ||
Matrix< REAL > *& | P, | ||
Matrix< REAL > *& | PTAP, | ||
World & | dw | ||
) |
Definition at line 257 of file algebraic_multigrid.cxx.
References ctf.core::abs(), CTF::Timer_epoch::begin(), CTF::Timer_epoch::end(), CTF::Tensor< dtype >::fill_sp_random(), CTF::Tensor< dtype >::get_local_data(), CTF_int::tensor::nnz_tot, CTF::World::np, CTF::World::rank, setup(), SP, CTF::Timer::start(), CTF::Timer::stop(), and CTF::Tensor< dtype >::write().
Referenced by main().
Definition at line 13 of file algebraic_multigrid.cxx.
References jacobi(), CTF::Vector< dtype >::len, CTF::Tensor< dtype >::norm2(), omega(), CTF::Tensor< dtype >::print(), CTF::World::rank, CTF::Timer::start(), CTF::Timer::stop(), and CTF_int::tensor::wrld.
Referenced by test_alg_multigrid(), and vcycle().
int test_alg_multigrid | ( | int64_t | N, |
int | nlvl, | ||
int * | nsm, | ||
Matrix< REAL > & | A, | ||
Vector< REAL > & | b, | ||
Vector< REAL > & | x_init, | ||
Matrix< REAL > * | P, | ||
Matrix< REAL > * | PTAP | ||
) |
computes Multigrid for a 3D regular discretization
Definition at line 214 of file algebraic_multigrid.cxx.
References CTF::Timer_epoch::begin(), CTF::Timer_epoch::end(), CTF::Tensor< dtype >::norm2(), CTF::World::rank, smooth_jacobi(), vcycle(), and CTF_int::tensor::wrld.
Referenced by main().
void vcycle | ( | Matrix< REAL > & | A, |
Vector< REAL > & | x, | ||
Vector< REAL > & | b, | ||
Matrix< REAL > * | P, | ||
Matrix< REAL > * | PTAP, | ||
int64_t | N, | ||
int | nlevel, | ||
int * | nsm | ||
) |
Definition at line 101 of file algebraic_multigrid.cxx.
References ctf.core::a, ctf.core::b, CTF_int::tensor::lens, CTF::Tensor< dtype >::norm2(), CTF::World::rank, smooth_jacobi(), CTF::Timer::start(), CTF::Timer::stop(), and CTF_int::tensor::wrld.
Referenced by test_alg_multigrid().