1. petsc
  2. PETSc
  3. petsc

Commits

BarryFSmith  committed 4336a9e

In both petsc-3.1-p8 and petsc-dev, it looks like you can't choose
cycle type W for boomerAMG. Is this by design?

static const char *HYPREBoomerAMGCycleType[] = {"","V","W"};

(....snip...)

PetscOptionsEList("-pc_hypre_boomeramg_cycle_type","Cycle
type","None",HYPREBoomerAMGCycleType,2,HYPREBoomerAMGCycleType[jac->cycletype],&indx,&flg);

HYPREBoomerAMGCycleType is length 3, but the length passed to
PetscOptionsEList is 2, so cycle type "W" can't be chosen.

Hg-commit: d16789af6f37cfe5e8f44d7cc43441b7dae31958

  • Participants
  • Parent commits bad7cb1
  • Branches master

Comments (0)

Files changed (1)

File src/ksp/pc/impls/hypre/hypre.c

View file
 
   PetscFunctionBegin;
   ierr = PetscOptionsHead("HYPRE BoomerAMG Options");CHKERRQ(ierr);
-  ierr = PetscOptionsEList("-pc_hypre_boomeramg_cycle_type","Cycle type","None",HYPREBoomerAMGCycleType,2,HYPREBoomerAMGCycleType[jac->cycletype],&indx,&flg);CHKERRQ(ierr);
+  ierr = PetscOptionsEList("-pc_hypre_boomeramg_cycle_type","Cycle type","None",HYPREBoomerAMGCycleType+1,2,HYPREBoomerAMGCycleType[jac->cycletype],&indx,&flg);CHKERRQ(ierr);
   if (flg) {
-    jac->cycletype = indx;
+    jac->cycletype = indx+1;
     PetscStackCallHypre(0,HYPRE_BoomerAMGSetCycleType,(jac->hsolver,jac->cycletype)); 
   }
   ierr = PetscOptionsInt("-pc_hypre_boomeramg_max_levels","Number of levels (of grids) allowed","None",jac->maxlevels,&jac->maxlevels,&flg);CHKERRQ(ierr);