Change solver in Nonlinear iteration

Numerical methods and mathematical models of Elmer
Post Reply
Franz Pichler
Posts: 196
Joined: 29 Sep 2011, 12:25
Antispam: Yes

Change solver in Nonlinear iteration

Post by Franz Pichler »

Hello dear elmer community,

i currently struggling with a solver where i can easily get a solution with MUMPs in parallel, but most of the iterative solver have a problem because of the partitionoing. (No hypre available)

My problem with the mumps solution is that i worry about its exactness.
Now i can remember a numerical strategy, i heard about once, where first a direct solver like mumps is applied, and then afterwards an iterative solver is applied that imrproves the quality of the solution.

Is somethingl ike this possible in elmer?
Using one solver and tehn use another ?
as in use mumps for teh first nonlinear iteratino and use for example cg in the 2nd?
Without actually changing the system of equations (but i guesss that doesnt matter to much here)

thanks for any tips and ideas

best regards

Franz Pichler
raback
Site Admin
Posts: 4812
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: Change solver in Nonlinear iteration

Post by raback »

Hi Franz

Based on your idea I made a small addition to the code that utilizes the namespaces. It is now committed to devel branch. There is a test case "LinearSystemNamespace".

This is copy-paste from the test case:

Code: Select all

! Given real number is mapped to nearest integer
! The linear system strategy should then be given with namespace 'linsysI:', where I=1,2,3,...
! Negative and zero results to empty namespace. 
  Linear System Namespace Number = Variable "nonlin iter"
    Real
     1 1
     2 2
     3 2 
    End 

  linsys1: Linear System Solver = "direct"
  linsys1: Linear System Direct Method = "umfpack"

  linsys2: Linear System Solver = "Iterative"
  linsys2: Linear System Iterative Method = "BiCGStab"
  ...
There could be some problems when combining the namespace with other linear solver modes (eigensolve, harmonic, multigrid etc.). Also I don't guarantee total freedom between in changing the strategy since some initializations could be conflicting among different strategies.

-Peter
Franz Pichler
Posts: 196
Joined: 29 Sep 2011, 12:25
Antispam: Yes

Re: Change solver in Nonlinear iteration

Post by Franz Pichler »

Oh Wow!
nice
that was fast!

i will check that out.

thanks peter!
Post Reply