Commits

Lisandro Dalcin committed cc96a2d

Workaround wrong PetscViewerFormats list in petsc-3.3

Comments (0)

Files changed (1)

   n -= 3;                       /* drop enum name, prefix, and null termination */
   ierr = PetscEListFind(n,enumlist,str,&evalue,&efound);CHKERRQ(ierr);
   if (efound) *value = (PetscEnum)evalue;
-  if (found) *found = efound;
+  if (found ) *found = efound;
   PetscFunctionReturn(0);
 }
 
       if (loc2_fmt && *loc2_fmt) {
         ierr = PetscEnumFind(PetscViewerFormats,loc2_fmt,(PetscEnum*)format,&flag);CHKERRQ(ierr);
         if (!flag) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_SUP,"Unknown viewer format %s",loc2_fmt);CHKERRQ(ierr);
+        if (((int)*format) >= 5) *format = (PetscViewerFormat)(((int)*format)-2); /**/
       }
       ierr = PetscViewerSetUp(*viewer);CHKERRQ(ierr);
       ierr = PetscFree(loc0_vtype);CHKERRQ(ierr);