[Dune] Setting and optimising AMG parameters in ISTL

Bath Uni e.mueller at bath.ac.uk
Fri Jul 27 21:43:38 CEST 2012


Thanks,

will the criterion actually make any difference if the matrix is symmetric (which it is in my case)?

Eike

On 26 Jul 2012, at 11:29, Markus Blatt wrote:

>>>> As far as I can see the coarsen criterion is only used in the
>>>> apply() method of the class ISTLBackend_AMG in backend.hh, where the
>>>> AMG object is instantiated, so I guess I could always derive a class
>>>> from ISTLBackend_AMG and overload the apply() method with the
>>>> UnSymmetricCriterion (and then also derive ISTLBackend_AMG_SSOR
>>>> etc. from this). Or even hack the ISTL_Backend_AMG class in my Dune
>>>> installation... 
>>> 
>>> Yes, but you should probably use new names for ISTLBackend_AMG_SSOR,
>>> etc. 
> 
> On second thought deriving and implementing new classes seems like
> overkill to me.
> 
> We could simply add a flag to the amg backend, to select the criterion
> and just instiate both in apply and the select the right one using a
> simple if statement:
> 
> typedef
> Dune::Amg::CoarsenCriterion<Dune::Amg::SymmetricCriterion<BCRSMat,Dune::Amg::FirstDiagonal> >
>    SCriterion;
>  typedef
>  Dune::Amg::CoarsenCriterion<Dune::Amg::UnSymmetricCriterion<BCRSMat,Dune::Amg::FirstDiagonal> >
>    UCriterion;
>  SCriterion criterion(params);
>  UCriterion ucriterion(params);
> 
>  .... 
> 
>  if (reuse==false || firstapply==true){
>    if(useUnSymmetric)
>       amg.reset(new AMG(oop, ucriterion, smootherArgs, oocc));
>    else
>       amg.reset(new AMG(oop, criterion, smootherArgs, oocc));
> 
> Markus
> -- 
> Do you need more support with DUNE or HPC in general? 
> 
> Dr. Markus Blatt - HPC-Simulation-Software & Services http://www.dr-blatt.de
> Hans-Bunte-Str. 8-10, 69123 Heidelberg, Germany
> Tel.: +49 (0) 160 97590858  Fax: +49 (0)322 1108991658 
> 
> _______________________________________________
> Dune mailing list
> Dune at dune-project.org
> http://lists.dune-project.org/mailman/listinfo/dune





More information about the Dune mailing list