Re: [petsc-dev] getting norm type or pc side after resetting ksp type
It looks like when we change a KSP type, we need to reset the PC_SIDE and KSP_NORM back to the defaults. Is there an argument against this? Matt On Mon, Mar 26, 2012 at 10:02 AM, Lisandro Dalcin <[email protected]> wrote:
Please look at the following example. The error is really unexpected for me, but I'm not sure how to fix it:
In [1]: from petsc4py import PETSc
In [2]: ksp = PETSc.KSP().create()
In [3]: ksp.setType('gmres')
In [4]: ksp.getNormType() Out[4]: 1
In [5]: ksp.setType('fgmres') # changing ksp type
In [6]: ksp.getNormType() --------------------------------------------------------------------------- Error Traceback (most recent call last) /Users/dalcinl/Devel/PetIGA/demo/<ipython-input-6-40949252afeb> in <module>() ----> 1 ksp.getNormType()
/Users/dalcinl/Library/Python/2.7/lib/python/site-packages/petsc4py/lib/arch-darwin-c-debug/PETSc.so in petsc4py.PETSc.KSP.getNormType (src/petsc4py.PETSc.c:106669)()
Error: error code 56 [0] KSPGetNormType() line 317 in /Users/dalcinl/Devel/petsc-3.2/src/ksp/ksp/interface/itcreate.c [0] KSPSetUpNorms_Private() line 284 in /Users/dalcinl/Devel/petsc-3.2/src/ksp/ksp/interface/itcreate.c [0] No support for this operation for this object type [0] KSP fgmres does not support PRECONDITIONED with LEFT
-- Lisandro Dalcin --------------- CIMEC (INTEC/CONICET-UNL) Predio CONICET-Santa Fe Colectora RN 168 Km 472, Paraje El Pozo 3000 Santa Fe, Argentina Tel: +54-342-4511594 (ext 1011) Tel/Fax: +54-342-4511169
-- 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
participants (1)
-
Matthew Knepley