[petsc-users] Setting GAMG options C code

Young, Matthew, Adam may at bu.edu
Tue Jul 4 12:04:12 CDT 2017


I couldn't resist. Please forgive me.


________________________________
From: petsc-users-bounces at mcs.anl.gov <petsc-users-bounces at mcs.anl.gov> on behalf of Matthew Knepley <knepley at gmail.com>
Sent: Tuesday, July 4, 2017 10:10:38 AM
To: Harshad Sahasrabudhe
Cc: PETSc
Subject: Re: [petsc-users] Setting GAMG options C code

On Tue, Jul 4, 2017 at 9:06 AM, Harshad Sahasrabudhe <hsahasra at purdue.edu<mailto:hsahasra at purdue.edu>> wrote:
          ierr = PetscOptionsSetValue(NULL, "-st_mg_levels_ksp_type", "chebyshev");
          chkerr(ierr);
          ierr = PetscOptionsSetValue(NULL, "-st_mg_levels_pc_type", "jacobi");
          chkerr(ierr);
          ierr = PetscOptionsSetValue(NULL, "-st_mg_levels_ksp_max_it", "8");
          chkerr(ierr);
          ierr = PetscOptionsSetValue(NULL, "-st_pc_gamg_threshold", "0.01");
          chkerr(ierr);

I have a different opinion than Jose. I think the above lines are a better way to lock in the setup.

1) It is very difficult to get the order correct when you use the API

2) For deeply nested solvers it can be either inflexible (you assume a structure) or laborious (since
you check for certain structures at each level)

  Thanks,

    Matt

Thanks Matt! I will use it by setting options. I have one question though: What happens if there are 2 conflicting options?

Last one wins, just like sports.

   Matt

--
What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.
-- Norbert Wiener

http://www.caam.rice.edu/~mk51/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20170704/a7b2a8f3/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: knepley_sports.jpg
Type: image/jpeg
Size: 30070 bytes
Desc: knepley_sports.jpg
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20170704/a7b2a8f3/attachment-0001.jpg>


More information about the petsc-users mailing list