Hello all,

I'm experiencing an interesting issue with GMRES (and perhaps to some 
extent UMFPACK).

I'm solving a nonlinear, time-dependent problem with a combination of 
periodic and Dirichlet boundary conditions.

I solve the system with GMRES using a homemade preconditioner class 
(declared with Class myPreconditioner : public Subscripter):


        // Maximum 10000 iterations, relative tolerance of 1e-8.
        SolverControl solver_control(10000, system_rhs.l2_norm() * 1e-8, 
true);

        // Restart after 30 gmres iterations, using left preconditioning.
        SolverGMRES<BlockVector<double>>::AdditionalData 
additional_data(30,false);
        SolverGMRES<BlockVector<double>>  
GMRES_solver(solver_control,additional_data);
                          
 
GMRES_solver.solve(system_matrix,NSw_current_solution,system_rhs,preconditioner_with_memory_save);
            constraints.distribute(NSw_current_solution);

The solution seems to be blowing up across linear solves within each 
nonlinear solve. This does NOT happen when I use UMFPACK, so it is unlikely 
(unless I'm missing something) that either the nonlinear solver choice 
(Newton's method) or initial guess is the issue.

Additionally, and most surprisingly, even though convergence is indicated, 
the solver does not seem to be converging to the desired tolerance. Even 
more shocking, the old solve function, seems to have the same problem.

As a side question, can anyone explain why the RHS vector changes when I 
apply the affine constraints object to it, even though I assembled the 
matrix with        
 
constraints.distribute_local_to_global(local_matrix,local_rhs,local_dof_indices,system_matrix,system_rhs);
 

The poor solver behavior is the same either way, so I don't think this is 
related. To help, I am using the following diagnostic code to help me track 
down what's wrong. Here it is:

            std::cout << "Magnitude of RHS vector is " << 
system_rhs.l2_norm() << std::endl;
            constraints.distribute(system_rhs);
            BlockVector<double> tmp0(NSw_current_solution);
            solve(stepFlag); BlockVector<double> tmp(NSw_current_solution);
            system_matrix.vmult(tmp, NSw_current_solution); tmp -= 
system_rhs;
            std::cout << "Computed residual of UMFPACK solution is " << 
tmp.l2_norm() << std::endl;
            NSw_current_solution = tmp0;
            std::cout << "Magnitude of RHS vector is " << 
system_rhs.l2_norm() << std::endl;
            solve_memory_conservation(init,stepFlag);
            tmp -= NSw_current_solution;
            std::cout << "L2 norm of difference between solution methods is 
" << tmp.l2_norm() << std::endl;
            system_matrix.vmult(tmp,NSw_current_solution); tmp -= 
system_rhs;
            std::cout << "Computed residual of GMRES solution is " << 
tmp.l2_norm() << std::endl;
            std::cout << "Magnitude of RHS vector is " << 
system_rhs.l2_norm() << std::endl;

Where solve uses UMFPACK and solve_memory_conservation uses GMRES. Here is 
the relevant output for the first solve:

Magnitude of RHS vector is 8895.38
Computed residual of UMFPACK solution is 16761.5
Magnitude of RHS vector is 9341.73
The solver took 118 iterations.
L2 norm of difference between solution methods is 16583.4
Computed residual of GMRES solution is 3.96261e+06

Thanks for any help you can provide.

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/99dbc519-c857-4716-b376-5dc9613c0255n%40googlegroups.com.

Reply via email to