9 IAlgebraicMng *alg_mng = createAlgebraicMng(m_parallel_mng);
12 IndexedSpace space = alg_mng->createSpace(
"Nom",
13 index_manager->global_size());
17 Matrix m_a(space,space);
21 MatrixEditor edit_a(m_a, index_manager);
27 edit_a(icell,icell) = fij(icell, icell);
29 edit_a(icell, isubcell) += fij(icell, isubcell);
35 edit_a(inode, isubcell) += fij(inode, isubcell);
45 VectorEditor ve_b (v_b, index_manager);
48 ve_b(icell) = var_cell[icell];
51 ve_b(inode) = var_node[inode];
56 Solver solver = solverMng->createSolver(alg_mng, options);
57 v_x = solver.solve(m_a, v_b);
59 if (!solver.failed()) {
60 Fatal(
"Unable to solve Ax=b");
64 Vector v_residual = v_b - m_a*v_x;
66 info() <<
"Residual norm_2 = " << norm2(v_residual);