// -*- FreeFem++ -*- // Sample of SaveHB mesh Th = square(3,3); macro Grad(u) [dx(u),dy(u)] // EOM fespace Vh(Th,P1); varf vP(u,v) = int2d(Th)(Grad(u)'*Grad(v)) + int2d(Th)(v) + on(1,u=1); matrix A = vP(Vh,Vh); complex[int] rhs = vP(0,Vh); load "SaveHB" int ret = SaveHB("sample_z.hb", A, rhs, "sample of SaveHB"); cout << " A = " << A << endl; cout << " rhs = " << rhs << endl; assert(ret == 0); // End of file