laptopbig.edp
来自「FreeFem++可以生成高质量的有限元网格。可以用于流体力学」· EDP 代码 · 共 25 行
EDP
25 行
// a example to test the level of optimisation// --------------------------------------------int nn=2000;real cpu=0; mesh Th=square(nn,nn);verbosity=10; fespace Vh(Th,P1); // P1 FE space Vh uh,vh; // unkown and test function. func f=1; // right hand side function func g=0; // boundary condition function problem laplace2(uh,vh,solver=UMFPACK,tgv=1e30) = // definion of the problem int2d(Th)( dx(uh)*dx(vh) + dy(uh)*dy(vh) ) // bilinear form + int1d(Th,1)( uh*vh) + int1d(Th,1)( - vh) + int2d(Th)( -f*vh ) // linear form + on(2,3,4,uh=g) ; // boundary condition form cpu=clock(); laplace2; // solve the problem plot(uh); // to see the result cout << "-- lap UMFPACK " << nn << "x" << nn << " : " << -cpu+clock() << " s, max =" << uh[].max << endl;// plot(uh,ps="lap1-cpu.eps",value=true);
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?