📄 dp2d_cg_mpi.cc
字号:
#include <poisson_solver/flens_impl.h>#include <dirichlet_poisson.h>using namespace flens;using namespace std;typedef DirichletPoisson2D MatType;typedef DistributedGridVector2D VecType;intmain(int argc, char **argv){ MpiCart mpiCart(argc, argv); int l = 10; int rh = (1<<l); MatType A(rh); VecType f(mpiCart, rh), u(mpiCart, rh), solution(mpiCart, rh); problem2(f, u, solution); errorStat(0, A, f, u, solution); cout << "iterations = " << cg(A, u, f) << endl; errorStat(1, A, f, u, solution);}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -