Cyclops Tensor Framework
parallel arithmetic on multidimensional arrays
algebraic_multigrid

Benchmark for smoothed algebraic multgrid. More...

Collaboration diagram for algebraic_multigrid:

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)
 

Detailed Description

Benchmark for smoothed algebraic multgrid.

Typedef Documentation

typedef float REAL

Definition at line 11 of file algebraic_multigrid.cxx.

Function Documentation

char* getCmdOption ( char **  begin,
char **  end,
const std::string &  option 
)

Definition at line 440 of file algebraic_multigrid.cxx.

Referenced by main().

void setup ( Matrix< REAL > &  A,
Matrix< REAL > *  T,
int  N,
int  nlevel,
Matrix< REAL > *  P,
Matrix< REAL > *  PTAP 
)
void setup_3d_Poisson ( int64_t  n,
int  nlvl,
int  ndiv,
Matrix< REAL > &  A,
Matrix< REAL > *&  P,
Matrix< REAL > *&  PTAP,
World dw 
)
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 
)
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 
)