[aspect-devel] "Not converge" problem with variable viscosity.

Wolfgang Bangerth bangerth at tamu.edu
Tue Sep 1 09:02:35 PDT 2015


> maybe we should take over
> https://github.com/tjhei/aspect/commit/b5dbe7440b25df57b1b01cb3c057742fc30cb1d1
> into master for analyzing situations like this? The patch dumps the
> solver history to a file when the solver doesn't converge.

Yes, I think something along these lines is useful.

You don't need the member variable of the class, nor the member 
function. Something of the kind

   namespace {
     void record_solver_state (const unsigned int iteration,
                const double        check_value,
                const LinearAlgebra::BlockVector       &current_iterate,
                std::vector<double> &solver_history)
     { ...as before... }
   }

should work, if you connect it via

   solver.connect(std_cxx11::bind (&record_solver_state,
                                   std_cxx11::_1,
                                   std_cxx11::_2,
                                   std_cxx11::_3,
                                   std_cxx11::ref(solver_history)));

This way, solver_history can simply be a local variable to the function 
you're in.

The problem Shangxin is seeing is of course that not only does it not 
converge, it simply never terminates either. Though presumably one could 
make it terminate by setting the maximal number of iterations to 
something reasonable, and if it exceeds that, see it fail.


> We have been fighting with convergence issues of the (extended) Stokes
> system on the melt transport too and noticed:
> 1. Sometimes the preconditioner introduces large changes in the
> residual which is in fact in the pressure null space (adding a
> constant to every entry). This screws up the convergence. One hack is
> to fix a pressure unknown but in reality one would like to make sure
> that applying the preconditioner stays in the same subspace. Not sure
> what the best way to do this is (maybe we need to compute the null
> space vector, depending on the pressure element used, and remove that
> part in the preconditioner application). I had one example where I
> went from thousands to ~10 iterations but it might be more related to
> melt transport. Worth investigating. Here is the hack on the branch:
> https://github.com/tjhei/aspect/commit/b631ce5d425178eb2e4e953d04e684a44d9b9af2

I think that might generally be useful (but don't you have to restrict 
it to the incompressible case?). We normalize the pressure later anyway.


> 2. I had to play with restart lengths of GMRES which sometimes made a
> large difference (no convergence after thousands of iterations vs a
> couple hundred). Hack:
> https://github.com/tjhei/aspect/commit/743d86bf02b3fbe4e91e877df81b81c70a9bef65
> Of course this might become really expensive (how to benchmark that?).
> I am hesitant to introduce dozens of solver parameters, but maybe we
> need to look into it some more.

Yes, I think it would be worthwhile playing with this.

Best
  W.


-- 
------------------------------------------------------------------------
Wolfgang Bangerth               email:            bangerth at math.tamu.edu
                                 www: http://www.math.tamu.edu/~bangerth/



More information about the Aspect-devel mailing list